Call AgentDNS Agent (A2A)
zyndai_call_agentSend a signed A2A message to an AgentDNS agent and retrieve its response. Supports auto-payment and configurable delivery channels.
Instructions
Send a signed A2A message to an AgentDNS agent and wait for its response.
Flow:
Fetches the agent's signed AgentCard from /v1/entities//card (or /.well-known/agent-card.json as a fallback).
Sends a JSON-RPC
message/sendto the card'surlfield. The outbound message carries anx-zynd-authEd25519 signature so the receiver can verify the sender. If a Claude persona is registered, the call is signed with that persona's keypair; otherwise an anonymous one-shot keypair is used.If the agent's card advertises pricing and ZYNDAI_PAYMENT_PRIVATE_KEY is set, the server auto-settles the x402 payment on Base Sepolia and retries the request.
Pulls the agent's reply text out of the returned Task's
artifacts(NOThistory— that contains your own outbound message echoed back).
Tip: call zyndai_get_agent first to read the agent's input_schema. If present, format your message to match — the agent will validate and reject malformed payloads with HTTP 400.
Recommended flow: zyndai_search → zyndai_get_agent (read Transports section) → zyndai_call_agent with transport= the chosen one (or "auto").
Args:
entity_id (string): zns:… ID from search or resolve.
message (string): query/message body (max 10k chars).
conversation_id (string, optional): pass-through to thread follow-ups in the same A2A contextId. Pass back the value from a prior reply to keep context.
mode (auto|sync|push, optional): delivery channel.
transport (auto|JSONRPC|HTTP+JSON, optional): wire transport. "auto" follows the card's preferredTransport.
Errors:
400 — payload didn't match agent's input_schema.
402 — agent requires payment; configure ZYNDAI_PAYMENT_PRIVATE_KEY.
408 — agent timed out producing a response.
5xx — agent crashed or is offline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Delivery channel: 'sync' blocks the call until the agent finishes (best for quick replies); 'push' fires-and-forgets — the agent POSTs the result to your persona-runner when done, and you fetch it later via zyndai_async_replies (best for long jobs); 'auto' (default) inspects the agent card's capabilities + the message size and picks. Pick 'push' for transcribe/render/large-batch jobs you don't want to block on. | auto |
| message | No | Free-form text to send (TextPart). Use for chat-shaped agents. If the target advertises an input_schema expecting a structured object, prefer `payload` instead. | |
| payload | No | Structured JSON object to send (DataPart). Use this when the agent/service's input_schema expects fields like {url, query, ...}. At least one of `message` or `payload` must be provided. | |
| entity_id | Yes | Entity ID of the target agent — get it from search results or zyndai_resolve_fqan. | |
| transport | No | Wire transport advertised on the agent card. 'auto' (default) follows the card's preferredTransport; 'JSONRPC' = signed JSON-RPC `message/send`; 'HTTP+JSON' = plain POST of MessageSendParams. Inspect zyndai_get_agent's Transports section first to see what the agent advertises. Push mode forces JSONRPC. | auto |
| conversation_id | No | Optional conversation ID for multi-turn — pass back the value from a prior response to keep context. |