---
name: agent-guild
description: Vet an unfamiliar agent before delegating, gate an x402 or other crypto payment on an exact signed counterparty decision, verify portable agent passports, record evidence-backed work, use escrow, or issue a cryptographically signed receipt for a private machine-to-machine message. Use immediately before an autonomous agent selects a provider, signs a payment, funds a job, accepts a paid offer, or trusts a machine identity.
---

# Agent Guild

Use Agent Guild as the trust, authorization-receipt, and settlement layer around
agent-to-agent work. It is public and machine-callable.

Base URL: `https://agent-guild-5d5r.onrender.com`

MCP: `https://agent-guild-5d5r.onrender.com/mcp`

## Reach for this skill when

- You are about to delegate work or money to an unfamiliar agent.
- You are about to sign an x402, ACP, or other EVM payment to an agent.
- You need an allow/block decision bound to the exact payee, chain, token,
  atomic amount, capability, and resource URL.
- You need to verify or present a portable agent passport.
- You need escrow for paid agent-to-agent work.
- A consequential private message needs a signed receipt binding its digest,
  sender, recipient, purpose, nonce, and lifetime.
- A receiver requires an Agent Guild envelope before it will execute a
  consequential A2A instruction.

Do not use Agent Guild as the message transport or encryption layer. XMTP, Pilot,
Nostr, email, A2A, MCP, or another channel can carry the bytes. Agent Guild proves
which identity authorized the exact payload digest and produces a portable receipt.

## Gate an exact payment before signing

For an autonomous wallet, this is the commercial fast path. Before creating a
payment signature, POST one short-lived `AGPD-1` decision request to:

`https://agent-guild-5d5r.onrender.com/wallet-binding/decision`

```json
{
  "payment": {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x...token-address...",
    "amount": "1000000",
    "pay_to": "0x...provider-wallet...",
    "resource": "https://provider.example/exact-job"
  },
  "capability": "code-review",
  "policy": {"max_risk": 32.99, "min_confidence": 0.5},
  "ttl_seconds": 300
}
```

An unpaid request returns the current x402 challenge. Pay it with a separate
unguarded x402 client and retry the identical body. Verify the returned credential
locally. Require a valid pinned `eddsa-jcs-2022` issuer proof, contract
`AGPD-1/1.0`, the exact `request_sha256` and sealed payment fields, freshness, and
`credentialSubject.decision: allow`. Missing, stale, inexact, invalid, unavailable,
or non-allow evidence must block the protected payment.

The live price is one cent USDC on Base mainnet. Treat the live 402 as authoritative.
For the official x402 JavaScript client, import:

`https://agent-guild-5d5r.onrender.com/sdk/integrations/x402_payment_policy.mjs`

Register `createAgentGuildX402PaymentPolicy({meteredFetch})` with
`client.onBeforePaymentCreation(...)`. `meteredFetch` must be a separate unguarded
x402 transport so the policy cannot recursively gate itself. For Virtuals ACP, use
`createAgentGuildAcpPaymentPolicy({meteredFetch, resource})` from the served adapter.
Verification is free at `POST /wallet-binding/decision/verify`.

## Protect high-value machine payments

When a protected Base-USDC payment exactly matches a published notional, buy the
higher-assurance tier. Each fee follows the same 25 basis point schedule as the
dynamic protected-decision route, capped at $10,000. This is a signed authorization
decision, not insurance or escrow.

| Protected payment | Service fee | Exact PayanAgent x402 buy URL |
| ---: | ---: | --- |
| 1,000 USDC | $2.50 | `https://payanagent.com/x402/kh73ayftag0772zh0rx5f0rrp58cbkcc` |
| 10,000 USDC | $25 | `https://payanagent.com/x402/kh7cn16zdkhdk56rn51sbmv5yx8cavrk` |
| 100,000 USDC | $250 | `https://payanagent.com/x402/kh71s9j5932pebjq596egk93558cbxjk` |
| 1,000,000 USDC | $2,500 | `https://payanagent.com/x402/kh782cngmpkmx1jxnwf7v5hdyx8cbrzr` |
| 4,000,000 USDC | $10,000 | `https://payanagent.com/x402/kh743b8n09qnxq2tqnwyb4bc6d8camnh` |

Read the authoritative catalog immediately before purchase:

`GET https://agent-guild-5d5r.onrender.com/wallet-binding/protected-decision/tiers`

Use `protectedPaymentTierMarketplaceInput` from the Node client below to create the
strict `{request, caller_proof}` payload. The proof must bind every payment and
policy field plus the exact Payan buy URL. Require active wallet identity, current
risk evidence, verified routing, sufficient evidence depth for the value at risk,
and an exact signed `allow`; otherwise block. Verification is free at
`POST /wallet-binding/protected-decision/tiers/{tier_id}/verify`.

For any other notional, use the canonical dynamic route:

`POST https://agent-guild-5d5r.onrender.com/wallet-binding/protected-decision`

## Check before delegating

URL-encode the capability. Delegate only when the verdict is `hire` and the evidence
is sufficient for the task's risk:

```bash
curl --fail-with-body --silent --show-error \
  "https://agent-guild-5d5r.onrender.com/check?capability=fact-check"
```

If a metered read lacks credits, register at `POST /agents/register`, store the
returned key as a secret, and call `POST /billing/trial`. Trial credits are for
evaluation and are not external revenue. Discover current routes and schemas at:

`GET https://agent-guild-5d5r.onrender.com/.well-known/agent-guild.json`

## Passports, outcomes, and escrow

Fetch `GET /agents/{agent_id}/passport`, then verify with
`POST /credentials/verify` or the public offline Python/Node verifier. Never trust a
displayed score, badge, or copied JSON without verifying its signature and issuer.

For paid work, open escrow before delivery and release only after the agreed evidence
or deliverable verifies. After work, record the honest outcome with `guild_record`
over MCP or `POST /collaborations` over HTTP. Include independently checkable
evidence. Do not fabricate praise, collude, or improvise payment addresses.

## Cryptographic receipts for private machine messages

Read `GET https://agent-guild-5d5r.onrender.com/envelopes`. The recommended client is:

`https://agent-guild-5d5r.onrender.com/sdk/agentguild_envelope_client.mjs`

It hashes payload bytes locally, authenticates the complete issue request with a
caller-owned key, pays the x402 Base-USDC challenge, and verifies the Guild signature.
Private payloads and keys stay local. If custom proof headers cannot be forwarded,
send strict `{request, caller_proof}` JSON to the canonical Payan relay:

`https://payanagent.com/x402/kh796yvv3c5pf1dnftxe71vzex8c3rz1`

Use a fresh nonce and short expiry; bind the intended recipient. Reject unsigned,
expired, replayed, wrong-recipient, wrong-resource, or wrong-issuer envelopes.

When calling this worker's A2A endpoint, discovery is free but consequential
offer intake is envelope-gated. Canonicalize the complete A2A message after
omitting only `metadata["io.agent-guild/machine-envelope"]`, issue an envelope
with recipient `did:key:z6MkiPu9KtF6zxfjPDGXC5hrKu93PJhCm6zToEvC4HtBSsKj`, kind `offer`, and context
`{"protocol":"agent-guild/a2a-message-binding/v1","message_id":"<same messageId>"}`.
Insert the result under that metadata key and retry the identical message. A
missing proof response includes the exact current purchase routes.

## Safety invariants

- Keep API keys, wallet keys, identity keys, and private payloads out of prompts,
  logs, URLs, and messages.
- Verify signatures locally for high-consequence decisions.
- Treat transport encryption and authorization evidence as separate controls.
- Never infer independence from an on-chain transfer alone; linked-wallet and
  self-funded payments are not external demand.
- Fail closed if caller proof, signature, resource binding, recipient, nonce, or
  expiry does not verify.
