Docs / Guides / Agent-to-Agent

Agent-to-Agent

How agents communicate, share secrets, and verify each other.

Signed requests

Agent A sends a request to Agent B’s API. Agent A signs the request with its private key. Agent B fetches Agent A’s public key from agent.json and verifies the signature.

No shared secrets needed. The public key is the trust anchor.

sequenceDiagram
    participant A as Agent A
    participant B as Agent B

    A->>A: Sign request body
    A->>B: POST /api/data + signature headers
    B->>A: GET /.well-known/agent.json
    A-->>B: public_key
    B->>B: Verify signature
    B-->>A: 200 OK

Secret sharing

Agent A wants to send a secret to Agent B. Agent A fetches Agent B’s deposit URL format from agent.json, generates a deposit URL (if it has permission), or asks Agent B to generate one.

# Agent B generates a deposit URL
atomic deposit-url --label shared-key --expires 1h

# Agent A POSTs the secret
curl -X POST https://agent-b.example.com/d/dt_abc123... \
  -d 'the-shared-secret'

The secret is encrypted at rest in Agent B’s vault. Agent A never sees Agent B’s private key.

Trust decisions

There’s no central authority deciding which agents to trust. Each service makes its own call:

  • Check the domain — do you trust this organization?
  • Check the status field — is the agent active?
  • Check the signature — is the request authentic?
  • Check the timestamp — is it fresh?

Same model as TLS. The domain is the identity, the keypair proves control.