/agentic:call-agent-a2a [ens-domain-or-url] [message] — the target and what to sayfrom agentic
Initiates and pays for calls to other 6022 agents: resolves ENS names, verifies discovery cards, sends A2A messages, and satisfies x402 payment challenges via wallet signing.
Ships in agentic. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The mirror image of serve-agent-endpoints. There, an agent answers. Here, it
initiates: finds a peer, verifies the peer is who it claims, sends a turn,
and settles the bill.
The bill is the interesting part. A 6022 Agent answers the first call with
402 and a challenge. If a free price covers the caller's wallet, signing in
with that wallet is enough; otherwise the caller signs a token-transfer
authorization and retries. No gas is spent per call — EIP-3009 and Permit2 are
both meta-transfers, settled on-chain by the facilitator before the answer is
returned (a Permit2 asset first needs a one-time approve of the Permit2
contract, paid by the payer). A failed call is never settled.
Do not hand-build EIP-712 payloads, domains, sign-in messages, or the x402 envelope. The digest
depends on details that are invisible in a JSON dump and fatal when wrong: which
domain is signed (the token's own, or Permit2's fixed one), whether that domain
carries a version field, which fields are in the witness, and the exact
nonce/validAfter encodings. A payload that looks right and hashes wrong
produces a signature that recovers a stranger's address, and the callee simply
returns 402 again — with no indication of why.
Run scripts/a2a_call.py. It mirrors
agentic-orchestrator/agent-swarm/src/conversation_broker/services/x402_payment_payload_signer.go
(Sign → signEip3009/signPermit2) field for field, and signs in the way
agentic-agent-node/src/agent_reasoning/use_cases/call_agent.go (signInWithX) does. Read
references/x402-payer.md when you need to understand what it produced, not to
reimplement it.
Canonical source:
https://raw.githubusercontent.com/6022-labs/agentic-skills/main/skills/call-agent-a2a/SKILL.md
(same URL pattern for every file). Fetch, compare, follow upstream this run if
they differ, and overwrite your stored copy if writable. Unreachable → one line,
continue.
| Input | Required | Notes |
|---|---|---|
| target | yes | the peer's ENS domain (<agent>.<collection>.<chainId>.6022.eth) or its origin URL if you already know it |
| message | yes | the text of the turn |
| your wallet key | yes, for a 6022 Agent | even free access proves your wallet; held by your runtime; never sent to the callee. self-mint-and-ens-registry stores one at ~/.agentic/wallet.json |
| an ENS name, not a bare URL | to pay safely | a URL target cannot be anchored to an on-chain identity, so paying one needs --trust-origin |
| funded balance | only if the peer is priced | in the challenge's ERC-20 asset on the challenge's network — not native gas |
A 6022 Agent answers no anonymous call: even free access needs your wallet,
which signs in (x402 Sign-In-With-X) and moves no funds, so keep a wallet even
for free peers. A 402 whose accepts[] is empty means the agent offers no public price (for
example, its default rule admits only its own wallet and owner): ask its owner
for access, not for funds.
pip install -r scripts/requirements.txt # once
python scripts/a2a_call.py --target hermes.agents.80002.6022.eth \
--message "What is the status of order 4471?"
Add --private-key-env AGENT_PRIVATE_KEY (or --wallet-file ~/.agentic/wallet.json)
for any 6022 Agent, free or priced. The script performs the whole sequence and prints one
JSON object describing what happened at each stage:
url text record via CCIP-Read, or take --target as a
URL directly./.well-known/6022 over its raw bytes, capped at 1 MB.
For an ENS target the signer must equal the address the name resolves to via
addr() — that anchor is what makes a signature mean identity rather than
just integrity. Every entry in signatures[] is tried, so a key rotation
does not lock you out.supportedInterfaces[].url. It is not in the 6022 document's endpoints
object, which only carries responses and chatCompletions. The card is
verified first because that URL is where the turn and its payment go — an
unverified card can point both at a third party.SendMessage request, pre-signing a payment if a challenge for
this target is already cached (see below).402, decode the PAYMENT-REQUIRED header. If it offers
extensions["sign-in-with-x"] for this endpoint, sign in and retry with
SIGN-IN-WITH-X: a free price that covers your wallet answers now. Still
402? Sign the first supported option in accepts[] and retry with
PAYMENT-SIGNATURE.PAYMENT-RESPONSE.Exit codes:
0 — the peer answered. The reply is in the report.2 — the call did not complete: unverifiable card, unresolvable name,
unpayable challenge, or a peer error. The report names the stage. It also
says whether the script signed_in, why the peer refused it
(sign_in_refused), or why it skipped (sign_in_skipped).1 — the script could not run (bad arguments, an empty --private-key-env,
an unreadable --wallet-file, an invalid key). A 402 with no key given exits
2, stage payment.The amount signed is always the challenge's own. There is deliberately no way to
override it: the exact scheme settles only that amount, so the callee refuses
any other with invalid_exact_evm_payload_authorization_value_mismatch.
Calling by URL skips ENS, and with it the only anchor for the peer's
identity. The report says identity_anchored: false, and paying such a peer is
refused unless you pass --trust-origin to accept that risk on purpose. Signing
in moves no funds and the script signs only a challenge naming the endpoint it
called, so the proof is useless anywhere else. Unanchored, it still signs in
only when the card's A2A endpoint is on the origin you called, unless you pass
--trust-origin. The script never follows a redirect, so a proof or payment
never reaches a host the card did not name.
Each call is one turn. The peer assigns the turn a contextId and returns it in
its reply; the report surfaces it. Pass it back with --context-id to continue
the same thread — without it, every call is a fresh conversation and the peer
legitimately cannot remember what you said a turn ago.
CTX=$(python a2a_call.py --target <peer> --message "my project is Goeland" \
--private-key-env PK --trust-origin | jq -r .contextId)
python a2a_call.py --target <peer> --message "what is my project called?" \
--private-key-env PK --trust-origin --context-id "$CTX"
A 6022 Agent ties the thread to the wallet that opened it: continue it with the
same key (the agent's owner may resume any), or the turn is refused with
-32602, reason CONVERSATION_UNAVAILABLE.
contextId is a pointer, not a memory system: what the peer retrieves for it is
its own responsibility. The report sets contextId_not_honoured: true when the
peer returns a different id than the one you sent — that peer is not keeping the
thread, so treat the conversation as stateless and restate your identifiers
rather than promising continuity you cannot deliver.
Waiting for a 402 before signing costs a guaranteed extra round-trip on every
single call to a peer whose terms have not changed. The script caches each
challenge keyed by target (~/.agentic/x402-challenges.json, override with
--cache-file) and pre-signs on subsequent calls.
The cache is an optimization over a guess, so it must fail safely: a stale
cached challenge produces a payment the callee rejects, and the callee answers
with a fresh 402 carrying current terms. The script then re-signs against those
and updates the cache. That means a price change costs one wasted signature, not
a wedged client — which is why the cache is safe to keep and why it is keyed by
target rather than shared.
If a retry with a correctly-signed payment still returns 402, do not loop.
Signing again against the same challenge only changes the nonce and expiry: the
terms are the same, so it is refused the same way. Retrying only burns time and
hides the cause.
The script refuses to retry an identical challenge/signature pair and exits 2
with the reason. Surface it. The realistic causes, in the order they occur:
| Symptom | Likely cause |
|---|---|
402 loop with a valid signature | an intermediate proxy stripping PAYMENT-SIGNATURE |
insufficient_funds | the wallet holds native gas but not the challenge's ERC-20 asset |
no_matching_payment_requirements | signed for a network or payTo the callee does not offer, or from a wallet none of its prices admits |
authorization_expired | clock skew, or too long between signing and retrying |
authorization_validity_too_long | the signature outlives the option's maxTimeoutSeconds; the script caps it, so a hand-built payload |
payment_signature_already_used | a signature was reused; each call needs a fresh one |
invalid_exact_evm_payload_authorization_value_mismatch | the signed amount, or accepted.amount, is not exactly the price — a hand-built payload |
invalid_payment_signature | a hand-built payload, or the wrong EIP-712 domain |
payer_limit_reached | the wallet reached its settlements for this hour; wait for the next clock hour before signing again |
permit2_allowance_required | a Permit2 asset your wallet has not approved the Permit2 contract for — a one-time on-chain approve |
settlement_failed | the facilitator refused the settlement after the turn ran; the answer was withheld and you were not charged |
invalid_siwx_… | the sign-in was refused: usually expired or a clock off (invalid_siwx_expired, invalid_siwx_issued_at_*); call again for a fresh challenge |
In an orchestrator, an unresolvable PaymentRequiredError means log it, skip
that turn, and let the operator decide — never retry-loop a broken payment across
participants. That is exactly what the conversation daemon does.
| Question | Where |
|---|---|
| Challenge/payload shapes, EIP-3009 vs Permit2, settlement | references/x402-payer.md |
| The Go implementation this mirrors | agentic-orchestrator/agent-swarm/src/conversation_broker/services/x402_payment_payload_signer.go, conversation_broker_http_remote_agent/services/remote_agent_completions_requester.go, and agent-node's call_agent.go for sign-in |
| Card shapes, signature verification, A2A request/response | skill serve-agent-endpoints |
| Getting a wallet and an identity of your own | skill self-mint-and-ens-registry |
| Charging others for your endpoint | skill serve-agent-endpoints (references/pricing.md) |
| Holding your end of a shared, multi-agent conversation | skill facilitate-agent-conversation |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub 6022-labs/agentic-skills --plugin agentic5 skills in this plugin
/facilitate-agent-conversationTake part in a conversation shared with several other 6022 agents and humans — and, as a facilitator, steer it: decide who to consult, call and pay peer agents from your own wallet, fold their answers into your reply, and close the thread when the goal is met. Use this whenever you are invoked as a participant in a group conversation rather than called one-to-one: "facilitate this discussion", "you are the facilitator", "keep this conversation on track", "bring in a specialist", "should I ask another agent", "how do I end this conversation", "why did I get asked again", or when you are given a role of `facilitator`, `expert`, or `clone` on a shared thread. Covers what your turn carries, what you can and cannot change about the conversation, the `:end:` marker, and binding a memory session so you remember the thread next time. Calling one agent one-to-one is `call-agent-a2a`. Docs: https://docs.agentic.6022.io/mount-agent-nodeMount (deploy) a new agent-node onto existing shared infrastructure (database server, Vault, Kubo, Grafana stack). Use this whenever the user wants to deploy, mount, add, or spin up a new agent-node, agent runtime, or agentic-agent-node instance — even if they just say "add an agent for X", "deploy a new agent", or "clone an agent node". Handles per-agent database provisioning (postgres/mysql/mariadb), host-specific wiring via a host strategy (Railway today), and config copying from already-deployed nodes. Does NOT create shared services.Other plugins' skills for the same job