Skip to the page

Learn · Agent access

A2A agent

Every project serves the Agent-to-Agent protocol at /a2a. Other agents can find and call the project under your access rules.

In the schema
—

Sign-in and the agent card#

Every project answers Agent-to-Agent JSON-RPC calls at /a2a, and each branch answers at /branches/{name}/a2a. Every call authenticates via Authorization: Bearer <token> and executes under that caller’s access policies. Send A2A-Version: 1.0 as a header or query parameter.

Caller-scoped extended agent cards at /a2a

The public card at /.well-known/agent-card.json exposes zero query names, while GetExtendedAgentCard returns only the deployed queries and actions the authenticated bearer may invoke as skills.

Anyone can read the public agent card at <label>.napalmdata.com/.well-known/agent-card.json, which lists the endpoint address and sign-in method without exposing any query names. For an authenticated caller, GetExtendedAgentCard returns a caller-specific card listing every deployed query and action that caller may invoke as a skill, using the query’s first-line comment as the description and typed variables as the example. Queries hidden with napalm queries offer --no-agents are omitted and refused if called.

Messages#

Include a data part or a text part in message.parts. A text part carries one EdgeQL statement, and when a message contains both, only the data part executes.

Request · curl
curl https://<label>.napalmdata.com/a2a \  -H "Authorization: Bearer $NAPALM_KEY" \  -H "A2A-Version: 1.0" \  -H "Content-Type: application/json" \  -d {    "jsonrpc": "2.0",    "id": 1,    "method": "SendMessage",    "params": {      "message": {        "messageId": "8f0c2b1e-…",        "role": "ROLE_USER",        "parts": [{ "data": {          "query": "select Note { title } filter .pinned",          "variables": {}        } }]      }    }  }

params

message.messageIdstringrequired
Unique client-generated message ID.
message.rolestringrequired
Must be ROLE_USER.
message.partsPart[]required
Each part must specify exactly one of data, text, raw or url. A data part accepts six operation shapes.
  • { "call": "<name>", "variables": { … }, "is_dry_run"?: true } invokes a deployed query by name. An action returns the handler’s response and does not accept is_dry_run.
  • { "query": "<edgeql>", "variables": { … }, "is_dry_run"?: true } runs an ad-hoc EdgeQL statement when the passthrough setting admits the caller.
  • { "search": { "type": "<Type>", "query": "<text>", "limit"?: 10, "fields"?: ["…"] } } runs semantic or hybrid search across an indexed object type.
  • { "changes": { "since" | "after": "…", "until"?: "…", "types"?: ["…"], "limit"?: 100 } } reads the change log as GET /changes does and returns the page in the data part.
  • { "ask": "<question>", "is_dry_run"?: true } answers a natural-language question when schema sharing is enabled.
  • { "describe": "schema" | "reach" } reads the branch’s schema or counts the caller’s reach in each type.

A branch takes 100 dry runs, tests, checks and plans a minute. A dry run past the limit fails with rate_limited. The error’s retry_after_seconds gives the seconds to wait.

message.contextIdstring
Optional conversation identifier echoed on the response message.

Answers and refusals#

Every call completes synchronously within one HTTP request, so SendMessage answers directly with a ROLE_AGENT message holding typed JSON rows in a data part rather than spawning background tasks to poll.

Synchronous ROLE_AGENT replies with read-your-own-writes

Peer agents send SendMessage payloads to /a2a and receive committed rows or structured AccessPolicyError diagnostics with causal read-your-own-writes consistency on every call.

Response
{  "jsonrpc": "2.0",  "id": 1,  "result": {    "message": {      "messageId": "c3a91d07-…",      "contextId": "5b7e2f90-…",      "role": "ROLE_AGENT",      "parts": [{        "data": { "data": [{ "title": "Launch checklist" }] },        "mediaType": "application/json"      }]    }  }}

When an access rule refuses a write or a statement fails to compile, the response carries the diagnostic in both a human-readable text part and a structured data part.

A refusal’s parts
"parts": [  { "text": "query_failed (AccessPolicyError): An access rule refused it. This caller may not make that change." },  { "data": { "error": { "code": "query_failed", "type": "AccessPolicyError" } },    "mediaType": "application/json" }]

The schema and your reach#

{ "describe": "schema" } returns the branch’s schema, and { "describe": "reach" } counts the rows the caller can read, update and delete per type alongside readable file bytes. Both calls require schema sharing and an admitted passthrough caller, matching MCP’s describe_reach.

Methods#

MethodBehavior
SendMessageRuns the message’s call, statement, search, change log read, question or description. Answers with a ROLE_AGENT message.
GetExtendedAgentCardAnswers the card with every deployed query and action the caller may invoke.
ListTasksAnswers no tasks ({ "tasks": [] }) because every call finishes within the request.
GetTask, CancelTaskError -32001. No such task exists.
SendStreamingMessage, SubscribeToTaskError -32004. Use SendMessage.
Push notification methodsError -32003. Push notifications are not supported.

Error codes#

Transport-level refusals return HTTP statuses before JSON-RPC parsing, including 401 when the credential is missing or revoked, 404 while the project’s API is disabled and 413 for a body over 1 MiB. A JSON-RPC notification (a request with no id) returns 202 Accepted. Every other refusal returns an A2A or JSON-RPC code.

CodeCondition
-32001GetTask or CancelTask called (no async tasks exist)
-32003Push notification method called
-32004Streaming method called
-32007GetExtendedAgentCard when no extended card exists for the caller
-32009Missing or unsupported A2A-Version (expected 1.0)
-32602Invalid method parameters or a Part containing multiple content keys
-32601Unknown JSON-RPC method
-32700Malformed JSON body
-32600Invalid JSON-RPC 2.0 envelope or batch array

Multi-agent pipelines walks through one project’s agent calling another project’s agent.

Type a word or two to search every docs page.