Documentation — A2A API reference
Reference · Protocols

A2A API reference

This page is the lookup reference for agentd's A2A listener: its HTTP routes, the JSON-RPC methods, headers and envelope, the order requests are checked in, every error, the wire rules, the Agent Card, principals, the command ops, the operator methods, the sign-in endpoints, the listener settings and the limits. It is for integrators building a client or a peer, and for operators checking exact behaviour. The A2A channel explains the model behind it.

agentd speaks A2A 1.0 over the JSON-RPC binding. The listener needs the a2a build feature, which the release binaries and image include.

Routes

RouteMethodServedWhat it is
/POSTalwaysthe JSON-RPC endpoint
/OPTIONSalwaysthe CORS preflight
/.well-known/agent-card.jsonGET, HEAD, OPTIONSalwaysthe public Agent Card
/oauth2/device_authorizationPOSTdevice grant onRFC 8628 §3.1: a client asks for a code
/oauth2/tokenPOSTdevice grant on, or a launcher attachedRFC 6749 §3.2, RFC 8628 §3.4: the client polls for its session
/oauth2/revokePOSTdevice grant on, or a launcher attachedRFC 7009: end a session by its token
/.well-known/oauth-authorization-serverGETdevice grant onRFC 8414 metadata; the issuer is the listener origin
/oauth2/deviceGETdevice grant onthe default verification page: plain text telling the person how an operator approves
/oauth2/launch_authorizationPOSTagentd ui attacheda launched web UI tab asks the launcher's terminal to sign it in
/.well-known/oauth-protected-resourceGETa2a.inbound_tokens names an issuerRFC 9728 metadata: the resource (a2a.resource), the authorization_servers (the issuers), bearer_methods_supported: [header], and the scopes_supported the issuers map; under a resource with a path, at that path after the well-known prefix

Every other path, and a route whose condition does not hold, is 404.

Methods

agentd answers the eleven methods A2A 1.0 defines for the JSON-RPC binding, plus the methods its operator and events extensions declare, matched by exact name. Every other name is -32601 for every caller.

MethodWhat it doesWho may call
SendMessagea conversation turn, or a command op; answers a Taskany named caller
SendStreamingMessagethe same, answered as a server-sent event streamany named caller
GetTaskone task the caller may see, with its historyany named caller, own tasks
ListTasksthe caller's tasks, filtered and pagedany named caller, own tasks
CancelTaskcancel one task in flightany named caller, own tasks
SubscribeToTaskfollow one task's updates as a streamany named caller, own tasks
CreateTaskPushNotificationConfigregister a webhook for one taskany named caller, own tasks
GetTaskPushNotificationConfigread one webhook registrationany named caller, own tasks
ListTaskPushNotificationConfigspage through one task's webhooksany named caller, own tasks
DeleteTaskPushNotificationConfigremove one webhook registrationany named caller, own tasks
GetExtendedAgentCardthe card for this callera caller named by a declared scheme
agentd.events/SubscribeToEventsthe instance-wide observation feedany named caller; declared only while a2a.events.enabled is on
agentd.operator/<op>one operator op: a read answers with its document, work with the Task it createdwhoever may run the op (Operator methods)

The operator may call every method on every task. An anonymous principal may call none. The public card is not a method; it is the document at /.well-known/agent-card.json.

Headers

HeaderDirectionRule
Content-Typerequestapplication/json, parameters allowed; anything else is 415 with an empty body
A2A-Versionrequestrequired on every POST /; 1.0 with any patch component (1.0.3); read from the header only, never the query string
A2A-Extensionsrequestcomma-separated extension URIs; may repeat; the first 32 tokens are considered, and a token over 512 bytes is ignored
A2A-Extensionsresponsethe extensions this request activated; absent when none was
AuthorizationrequestBearer <token>, scheme case-insensitive
Originrequesta browser request; must name an origin in a2a.cors.origins
WWW-Authenticateresponseon 401 and on a bearer caller's 403
Retry-Afterresponseon 429, and on the card's 503
traceparent, tracestaterequestW3C Trace Context: the work the request starts continues this trace, one span below it. One traceparent at most; a malformed one is ignored. Correlation only: never read by authentication, authorization, rate limits or deduplication
traceparentresponseon an answer that names a task (SendMessage, SendStreamingMessage, GetTask, SubscribeToTask): the span the task's work is done in, which the task-annotations traceId and spanId name too

The card, the OPTIONS preflights and the /oauth2/* endpoints take no A2A-Version: they are not JSON-RPC.

CORS. A request carrying Origin, to POST / or any /oauth2/* endpoint, is served only when that origin is listed in a2a.cors.origins, compared as an origin (scheme, host, port with its default). Anything else, Origin: null included, is 403 with no CORS headers, before the body is read. A listed origin has its own origin echoed in Access-Control-Allow-Origin, and the response exposes A2A-Extensions, Retry-After, WWW-Authenticate and traceparent. The preflight allows Content-Type, Authorization, Last-Event-ID, A2A-Extensions, A2A-Version, traceparent and tracestate. The one origin admitted unlisted is the web UI page agentd ui launches, for that process only.

The public card has its own policy: readable from any origin with Access-Control-Allow-Origin: *, never with credentials.

The request envelope

The body is one JSON-RPC 2.0 request object.

  • jsonrpc is exactly "2.0" and method a non-empty string.
  • id is required, a string or an integer. A request without one would be a notification, which is executed and never answered, so a missing or null id is -32600 "A2A requests must carry an id".
  • params, when present, is an object; otherwise -32602.
  • A batch (an array) is -32600.
  • An integer beyond ±2^53 is carried as the double the protocol holds it as.
curl -s https://agent.example.com:8443/ \
  -H 'content-type: application/json' \
  -H 'A2A-Version: 1.0' \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"ListTasks","params":{"pageSize":10}}'

The request pipeline

Every POST / runs agentd's gates in this order, then hands the request to the official A2A SDK (a2a-server-lf), whose JSON-RPC router parses it, checks its envelope and A2A-Version, decodes its params, calls agentd and writes the answer. Each gate's refusal is final and is plain application/json, never an SSE frame, and no refused request reaches the runtime. The gates read the request's id, its method and, of a send, the op its command DataPart names (and whether the message names a task), and nothing else of it. An operator method's op is its method's own.

StepCheckRefusal
1Origin, when present, is listed in a2a.cors.origins403, empty body
2a source over its failed-credential limit presents a bearer that is not a live session429, RATE_LIMITED
3Content-Type is application/json415, empty body
4who is calling, from the headers and connection (evidence)401 nobody or a failed credential; 403 a certificate no rule gives a role
5the caller's rate quota429, RATE_LIMITED
6the extensions A2A-Extensions activates; an extension method needs its extension declared and activated-32601
7the caller may call the method; the extended card needs a declared scheme's credential; a send's or an operator method's op is within the caller's reach (an instance child's reports, an inbound token's scopes, the op's floor and grants)403; 401
8the SDK: the body is JSON, the JSON-RPC envelope, A2A-Version (major 1; missing is 0.3), the method, the params-32700, -32600, -32009, -32601, -32602
9the answer: the runtime's, through the SDK — a send's message shape, the task it names and its command envelope are checked here; an operator method's params, by the runtime directlysee Errors

A method that is no route skips steps 6 and 7 and is the SDK's -32601, for an operator and a stranger alike. agentd.events/SubscribeToEvents and the agentd.operator/<op> methods are agentd's own and the SDK does not serve them: agentd reads each with the SDK's request type and holds its A2A-Version to the SDK's rule.

Errors

A peer branches on the code, never on the message, so every code means one thing. Every error is the SDK's JSON-RPC error: error.data ends with the protocol's google.rpc.ErrorInfo, whose reason is the one the code names (TASK_NOT_FOUND, INVALID_PARAMS, INTERNAL_ERROR, …) under domain a2a-protocol.org, with a timestamp in its metadata. Any other detail — a google.rpc.BadRequest naming each field — comes before it. Where agentd coined a reason of its own for the refusal, that ErrorInfo's metadata names it as agentdReason, beside the rest of agentd's metadata:

{"code": -32603, "message": "the agent is draining", "data": [
  {"@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "INTERNAL_ERROR",
   "domain": "a2a-protocol.org",
   "metadata": {"agentdReason": "DRAINING", "timestamp": "2026-11-22T01:14:26.735Z"}}]}

The two identity codes are agentd's, not the protocol's, so the listener's -31401 and -31403 carry agentd's own ErrorInfo instead: {"reason": "UNAUTHENTICATED"} or {"reason": "PERMISSION_DENIED"} under domain agentd.dev.

CodeHTTPagentdReasonMeaning
-32700200the body is not JSON
-32600200not a JSON-RPC request: a batch, a missing id, a bad jsonrpc or method
-32601200no such method
-32601200EXTENSION_NOT_DECLARED, EXTENSION_NOT_ACTIVATEDan extension method whose extension is not declared or not activated
-32602200bad params: a malformed message, a message not in the user's role, a filter the server cannot honour, a bad page size or token, a message that names a task and a different contextId
-32602200see A2A extensionsa malformed or unknown command
-32603200DRAININGthe agent is draining and takes no new work
-32603429RATE_LIMITEDa rate quota or the failed-credential limit; Retry-After and the retryAfterSeconds metadata say how long
-32001200no such task, or one the caller may not see: the same answer, so ids cannot be probed
-32002200the task is already terminal and cannot be canceled
-32003200push notifications are not enabled on this agent
-32004200the extended card where no scheme is declared; a message to a terminal task; subscribing to a task that has ended
-32004200INTROSPECTION_DISABLEDan introspection op while introspection is off
-32005200a raw or url part, or acceptedOutputModes excludes what a command answers with
-32009200A2A-Version missing (read as 0.3) or of another major than 1
-31401401who you are: no credential, or one that is invalid, expired or revoked
-31403403what you may do: a known principal whose role and grants do not reach the call
-31403403PERMISSION_DENIEDthe same, decided by the runtime: a workflow whose start does not admit the caller, an envelope its grants do not reach; with an access token, WWW-Authenticate: Bearer error="insufficient_scope"

-32007 (no extended card configured) and -32008 (a required extension not activated) are never sent. A listener either declares a scheme and serves the extended card or declares none and answers -32004, and none of agentd's extensions is required.

The identity codes. -31401 and -31403 sit outside JSON-RPC's reserved range so a client that branches on a specification code is never told the wrong thing. The listener's travel with their HTTP status so a proxy, a browser and a plain HTTP client all see them. A -31403 the runtime decides — which only it can, holding the workflows and their start roles — is the SDK's body at 403: the listener sets the HTTP status of agentd's two identity codes, and a token caller's insufficient_scope challenge, and nothing else.

ResponseWWW-Authenticateid
401, nothing presentedBearer realm="agentd"null
401, a credential presented and failedadds error="invalid_token" and a descriptionnull
403, a certificate no rule gives a rolenonenull
403, a method or op the caller may not callerror="insufficient_scope" when the caller used a bearerthe request's id
403, an inbound token whose scopes reach no skill the send asks forerror="insufficient_scope", and scope="…", the issuer's scopes that wouldthe request's id

Where the listener takes inbound access tokens, every 401 and the scope 403 also name its protected-resource metadata, resource_metadata="<origin>/.well-known/oauth-protected-resource" (RFC 9728 §5.1), which is how an OAuth client finds the authorization servers whose tokens it takes.

A browser refused only for being a browser, on a listener where the same request without Origin would have been the implicit operator, is told "browser requests must authenticate".

HTTP statuses outside JSON-RPC: 403 with an empty body (an origin not listed), 415 (not application/json), and on the card 304 and 503.

Wire format

A2A is defined in protocol buffers, and its JSON binding is proto3 JSON. agentd's tasks, messages and cards are written by the official SDK's canonical encoder.

  • Enums are the proto value names: TASK_STATE_COMPLETED, ROLE_USER.
  • Timestamps are RFC 3339 strings: "2026-08-17T13:41:27.824Z".
  • Field names are lowerCamelCase: historyLength, nextPageToken, contextId. A snake_case key is an unknown field, and an unknown field is ignored. GetTask names its task with id.
  • Every task is a Task. ListTasks returns the same object as GetTask, cut to what the listing asked for, so the state is always at status.state.
  • Required fields are always present. A listing's last page carries nextPageToken: "", an empty listing carries tasks: [] and totalSize: 0, and a deleted push config answers {}.
  • Ids are the SDK's. Task and context ids are UUIDv7s. A command result artifact is <taskId>.result.

Sending messages

SendMessage and SendStreamingMessage take the specification's send request; fields it does not define are ignored.

  • message.role must be ROLE_USER.
  • No taskId starts a new task with an id the server mints.
  • A taskId continues that task, which is how a caller answers a question the task is waiting on. A task the caller cannot see is -32001; a terminal one is -32004. A message that names a task and a different contextId is -32602.
  • contextId is the caller's own name for a conversation. For a non-operator it is bound per principal to a runtime key, so two callers' identical names are two conversations. An operator addresses conversations by the runtime's keys, which agentd.operator/status lists.
  • Parts: text parts are accepted, and a DataPart without the agentd key is read as JSON. A raw or url part refuses the whole message with -32005. A DataPart under agentd is a command (see Command ops).
  • Blocking. A unary send waits for the task to reach a terminal or interrupted state (input-required, auth-required), as A2A 1.0 §3.2.2 requires, unless configuration.returnImmediately is set. The caller's own HTTP timeout is the only bound unless the operator sets a2a.blocking_wait, after which the send answers with the task as it stands.
  • Inline push config. A push config sent with the message is checked like a registration and attached only once the message is accepted.
  • While draining, a send is -32603 with reason DRAINING.

A command always answers with a Task. A read is an operator method, whose result is its document and which creates no task.

Listing tasks

ListTasks returns the caller's own tasks; an operator sees every task. totalSize counts only what the caller may know exists.

ParamRule
contextIdthe caller's own name for a conversation; an operator may also use a runtime key
statusone task state
statusTimestampAfterRFC 3339, inclusive
pageSizeunset or 0 is 50; otherwise 1 to 100; larger is -32602
pageTokenopaque; one this server did not issue is -32602
historyLengthunset omits the history; n keeps the newest n messages
includeArtifactsartifacts are included only when true

The order is newest status first. A filter the server cannot honour is refused with -32602, never ignored. The result always carries tasks, nextPageToken, pageSize and totalSize, and nextPageToken is "" on the last page.

ListTaskPushNotificationConfigs pages the same way: pageSize 1 to 100, default 50, ordered by config id, nextPageToken always present and "" on the last page.

Finished tasks are kept until store.retention.tasks drops them; unset keeps every task. A working or input-required task is never dropped, and a settled task nobody has read back yet is kept for at least 30 seconds.

Streams

  • SendStreamingMessage answers text/event-stream: a Task frame, then status and artifact updates, closing when the task reaches a terminal state. A task waiting at a gate keeps its stream open.
  • SubscribeToTask opens with the task as it stands, then each transition, closing at a terminal state. An unknown or unseen task is -32001 and a task that has ended is -32004, both as plain JSON with no stream opened; read an ended task with GetTask.
  • Reconnecting means subscribing again. Past transitions are not replayed, and Last-Event-ID is ignored.
  • A refusal before the first frame is plain JSON with its status, never an error inside a 200 stream.

Push notifications

A caller registers a webhook for one of its tasks with CreateTaskPushNotificationConfig, and agentd posts each of that task's updates to it.

SettingDefaultEffect
a2a.push.enabledfalseaccept registrations and deliver; off, registration is -32003 and the card says pushNotifications: false
a2a.push.allow_privatefalsepermit webhook targets on private and loopback addresses
a2a.push.allow[]push targets beyond the peers' endpoints; under security.egress: closed a target must match a peer's endpoint or an entry here

Registration. The config takes url (required), token and authentication {scheme, credentials}, where credentials is optional: a scheme alone is sent as a whole credential. Deleting a config is idempotent: one already gone answers {}. A config registered without an id gets push-<ULID>. The URL must be https, or http to a loopback host, and it must pass the SSRF guard, which refuses private and loopback addresses unless allow_private is on. It is checked at registration, where a refusal is -32602 naming the reason, and again at every delivery, dialling only the address the guard vetted. Reads return the registration with the authentication scheme only, never its credentials.

Delivery. Each delivery is a POST with Content-Type: application/a2a+json, whose body is a stream response carrying the Task: its status and artifacts, without history and without task annotations. The receiver is told that the task moved and reads the conversation with GetTask.

HeaderFrom
Authorization: <scheme> <credentials>the registration's authentication (the scheme alone when it has no credentials); reads echo the scheme only
X-A2A-Notification-Tokenthe registration's token; an interop header the official a2a-python receiver reads
traceparent, tracestatethe task's trace: a span of its own per delivery, under the span the task's work is done in

Delivery is best effort: a delivery has 10 seconds, a webhook that is down does not fail the task, and a failed delivery is logged as a2a.push.failed and dropped.

The Agent Card

GET /.well-known/agent-card.json serves the public card with no credential and no A2A-Version. It carries an ETag over the served bytes and answers a matching If-None-Match with 304, and Cache-Control: public, max-age=60. When the runtime cannot produce it within 5 seconds, the answer is 503 with Retry-After: 5, never a stale or partial card.

FieldValue
nameagent.name, else agentd
descriptionagent.description, else a generic sentence
versionthe agentd build
supportedInterfacesone entry: the advertised URL, protocolBinding JSONRPC (or the unix binding URI on a unix listener), protocolVersion 1.0
capabilities.streamingtrue
capabilities.pushNotificationsa2a.push.enabled
capabilities.extendedAgentCardtrue exactly when the listener declares an authentication scheme
capabilities.extensionsthe declarations, with their public params (A2A extensions)
defaultInputModes, defaultOutputModestext/plain, application/json
skillsone, conversation
securitySchemes, securityRequirementswhat the listener enforces; absent when it declares nothing

The advertised URL is a2a.url; without it, a concrete bind advertises scheme://host:port/, and a unix listener advertises unix://<path>.

Security declarations. The card's schemes are derived from the posture the listener enforces:

ListenersecuritySchemessecurityRequirements
loopback, nothing configurednonenone
unix socketnonenone
a2a.bearer or a bearer_ref rulebearer{bearer}
a2a.device_grant.enabledbearer, device_code (OAuth 2.0 device flow){bearer}, {device_code}
a2a.tls.client_camtls, plus bearer when one is configured{mtls}, plus {mtls, bearer}
a2a.inbound_tokensone oauth2 scheme per issuer, named enterprise, enterprise-2, … or by its name{<scheme>: [its scopes]}, or {mtls, <scheme>} beside a client CA

An any rule adds the empty alternative {} on a listener without a client CA. The device_code scheme's flow names <origin>/oauth2/device_authorization and <origin>/oauth2/token, and oauth2MetadataUrl when the origin is https.

An issuer's oauth2 scheme names the metadata document it was read from as oauth2MetadataUrl, and one flow from that metadata: authorizationCode (its authorization and token endpoints, pkceRequired: true), or deviceCode with flow: device_code. Its scopes are the issuer's scopes_to_skills, each described by the skills it reaches. The scheme is declared once the issuer's metadata and key set are loaded — the moment its tokens can be checked — so the card never declares a scheme the listener cannot verify.

The extended card. GetExtendedAgentCard adds a workflow:<name> skill for each workflow the caller may run and narrows each extension's params to this caller. A2A extensions lists what each extension adds.

Principals

Every request resolves to a principal from its headers and connection, before its body is read.

OrderEvidencePrincipal
1a unix-socket peer with the daemon's uid, or rootoperator
2a bearer starting agentd_at_the session's principal; unknown, expired or revoked is 401
2any other bearer, on a listener with a bearer mechanisma2a.bearer is operator; a bearer_ref rule is its principal; neither is 401
2a JWT access token from an a2a.inbound_tokens issuer, after every static bearerthe first token_iss rule it matches; else the person, user:oidc:<iss>#<subject>; a client's own token, where require_user_token: false, agent:oidc:<iss>#<client>; a token that fails a check is 401
3a verified client certificatethe first san, sub or any rule it matches; operator while no rule exists; else 403
4none of the above, and an any rule existsthat rule's principal
5nothing presented, a loopback peer, a loopback-bound listener with no mechanism, no Originoperator (the implicit operator)
6anything else401

A bearer sent to a listener with no bearer mechanism is ignored. A presented bearer is resolved before any certificate rule.

Rules (a2a.principals[]):

KeyRule
matchexactly one of san, sub, bearer_ref, any, token_iss
match.token_issan a2a.inbound_tokens issuer, exactly; with sub, a glob over the token's subject; role user or agent, and no id or idp_subject — the token names the person
match.sana glob over the certificate's SANs and subject CN; a SPIFFE X.509-SVID's spiffe://… arrives as a URI SAN; needs a2a.tls.client_ca
match.subthe subject CN, exactly; needs a2a.tls.client_ca
match.bearer_refa secret reference, compared in constant time; may not equal a2a.bearer or another rule's secret, or start with agentd_at_
match.anytrue; never with role: operator; needs no client CA
roleoperator, user, agent or anonymous (names nobody)
idthe principal's name: 1 to 128 of A-Z a-z 0-9 . _ @ : / + -, unique across rules; required on bearer_ref and any rules
grantsop names or patterns beyond the role's defaults
labelsattributes carried into the run, the MCP request metadata and the audit line
quotas.rate<burst>/<window>, for example 20/1s or 30/1m; operators are exempt
quotas.budgeta token budget scoped to the principal (Control spend with budgets)

Certificate rules are first-match-wins, in the order written, and are not ranked by specificity: a broad rule placed early shadows every rule after it.

Principal ids. The operator role is always operator. A user or agent is <role>:<id> when the rule declares id; otherwise, for a certificate, <role>:cn=<CN> or <role>:san=<first SAN>. A device session is user:<name>. The = keeps certificate-derived ids out of the declared namespace, so a certificate whose CN equals a declared id never inherits that principal's work.

Grants. A grant names an op exactly, every op (*), or the ops that start with a prefix (workflow.*). A grant naming an operator-only op exactly on a non-operator rule is refused at load; a pattern may cover a family and grants only its members that are not operator-only. A workflow.run:<pattern> grant scopes workflow.run to the matching workflows and replaces the role's default reach for that op.

Identity registry. Device names and user-role ids share one namespace across time, since both spell user:<name>. The durable store records every claim: an approval may not use a name any rule declares or a user rule ever declared, and a user-role id that was ever approved as a device name is refused at startup (exit 2) and by a reload. Names compare with ASCII case folded.

Command ops

A command is a SendMessage or SendStreamingMessage whose message carries one DataPart {"agentd": {"op": "<op>", …arguments}}, with the command extension URI in both the A2A-Extensions header and message.extensions. A command message names no taskId. The commands are the workload: each answers with a Task whose <taskId>.result artifact carries the result.

curl -s https://agent.example.com:8443/ \
  -H 'content-type: application/json' \
  -H 'A2A-Version: 1.0' \
  -H 'A2A-Extensions: https://agentd.dev/a2a/ext/command' \
  -H "Authorization: Bearer $OPERATOR_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"SendMessage","params":{"message":{"role":"ROLE_USER","messageId":"m-1","extensions":["https://agentd.dev/a2a/ext/command"],"parts":[{"data":{"agentd":{"op":"workflow.run","workflow":"triage","inputs":{"ticket":42}}}}]}}}'
OpReplyDefault callersServedArguments
workflow.runtaskuser, agentalwaysworkflow; inputs
workflow.signaltaska grantalwaysname; run, payload
subagent.sendtaskuseralwayshandle, message
subagent.killtaska grantalwayshandle; reason

A run workflow.run starts — and one a workflow's declared command starts — is tracked by its task: GetTask and ListTasks read it, and CancelTask on it cancels the run. The task's state is coarser than the run's status: a run running, suspended, paused or pending is TASK_STATE_WORKING, and a stalled one TASK_STATE_FAILED. The run's exact status and its workflow are in agentd.operator/status's runs, which also lists the runs that have no task: scheduled, webhook- and signal-started ones.

Operator methods

The control plane and the reads are methods of the operator extension: agentd.operator/<op>, the op's arguments its params, with the operator extension URI in the A2A-Extensions header. A request that does not activate the extension — one that activates the command extension alone included — is -32601, before any authorization runs.

curl -s https://agent.example.com:8443/ \
  -H 'content-type: application/json' \
  -H 'A2A-Version: 1.0' \
  -H 'A2A-Extensions: https://agentd.dev/a2a/ext/operator' \
  -H "Authorization: Bearer $OPERATOR_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"agentd.operator/admin.drain","params":{"reason":"rolling update"}}'

A message method's result is its document. A task method's result is the Task it created, at once; its <taskId>.result artifact carries the result.

OpReplyDefault callersServedArguments
statusmessageany named calleralwaysnone
configmessageoperatoralwaysnone
workflow.canceltaskuseralwaysrun
subagent.statusmessageuseralwayshandle
subagent.logmessageoperatoralwayshandle; lines, after
plan.getmessageuseralwaysid
conversation.getmessageuserintrospection onid; limit
run.getmessageuserintrospection onrun
subagent.getmessageuserintrospection onhandle
debug.eventsmessageoperatorintrospection onafter, level, limit, prefix
admin.draintaskoperatoralwaysreason
admin.pausetaskoperatoralwaysrun, reason
admin.resumetaskoperatoralwaysrun
admin.canceltaskoperatoralwaysrun; reason
admin.settaskoperatoralwayspath, value
auth.device.pendingmessageoperatordevice grant onnone
auth.device.approvetaskoperatordevice grant onuser_code, as; scope
auth.device.denytaskoperatordevice grant onuser_code, or all: true
auth.sessionsmessageoperatora TCP listenernone
auth.sessions.revoketaskoperatora TCP listenersid, name, or all: true
payment.allowancesmessageoperatoran allowance (security.payments.allowances)none
company.statusmessageoperatora companies entrynone
company.user_id.resettaskoperatora companies entrycompany
company.sign_intaskoperatora companies entrycompany; account, scopes, new_account
company.sign_outtaskoperatora companies entrycompany; account
delegation.*message (list) or taskany named caller; forget and audit the operatoran IdP or a delegated serversee the operator extension

Arguments before a semicolon are required. "A grant" means no role reaches the op by default and a principal needs a grant naming it. The operator reaches every op. An operator-only op is the operator's whatever a grant says. A grant, a policy and an inbound token's command:<op> skill name an operator method by its op. A method behind a closed switch is -32601, except the introspection reads, which answer INTROSPECTION_DISABLED. workflow.cancel (the owner's) and admin.cancel (the operator's, whoever started the run) reach a run by id, task or not.

  • status answers each caller with what it may see: the instance's facts and the caller's own work. The operator's read adds the internals — subagents, children, timers, budget, counters, the store, the instruction — and org, the org chart in one list: this agent (kind: self, named by agent.name, titled by agent.title), every template and every peer, each {name, kind, title, reports_to}, so a client draws the hierarchy without joining lists. The lines are labels (Draw the org chart).
  • subagent.send reaches a warm flat worker and a live instance child. A warm worker's answer is its result; an instance child's, once it has one, is its reply, the newest send's, and reply_to is the id of the task this op answered that send with. subagent.status reads both.
  • subagent.log answers {handle, source, lines, cursor}: the newest lines (default 200, at most 1000) of the child's log, each one of agentd's own JSON log lines as written. An instance child's are read from the log file in its directory (source: file, at most the last 256 KiB); a flat worker's are this instance's lines about it from the in-memory log ring (source: ring, kept while a2a.introspection.enabled is on — without a ring the answer has no lines and a note). Pass cursor back as after for only the lines written since. The path is the one this instance recorded for the child, never one a caller names, and the file read there is only the one this instance opened for the child's log: a symlink, a FIFO or another file the child put in its place is refused. A line longer than the window is passed over as one {"truncated": true, "bytes": N} line, never returned in pieces.
  • admin.drain begins a graceful drain, as SIGTERM does, and returns at once; the process exits 0 when the drain completes, within lifecycle.drain_timeout.
  • admin.pause with no run holds the whole instance at a safe boundary: the listener still answers and intake still queues. With run, it pauses that run alone. admin.resume clears either.
  • admin.set sets agent.approval or a2a.introspection.enabled until the next reload re-reads the file.
  • auth.device.approve's as is the person's name: lowercase, ^[a-z0-9][a-z0-9._-]{0,63}$, not operator, anonymous, unknown, launcher, runtime or system, and not a configured principal id. The answer's existing: true says the name was approved before.
  • company.status and company.user_id.reset are served where a Company is declared (the companies feature). company.status is the company.status tool's document with why each failed Company failed; company.user_id.reset {company} forgets the User ID that Company knows the User by, and drops the Session there and the Company's MCP connections, which join again on new sessions: the Company sees a new User. With a seal key that opens none of the store's records it starts that Company over with the key (started_over: true); the others stay unavailable until each is reset. The Account Token of every account the User holds there is revoked and forgotten first. company.status lists each Company's accounts: the User's accounts there by label, each with the scopes it grants, when its token expires, how the User signed in and whether its Session is signed in — never a token.
  • company.sign_in and company.sign_out are the configured User's alone (security.companies.user): any other principal is refused with PERMISSION_DENIED, an operator who is not the User included. Each is for one of the User's accounts at the Company, by the label account gives it ([a-z0-9_-]{1,32}, agentd's own word, never sent to the Company): without one, company.sign_in signs in to the only account held, or to default while none is, and company.sign_out signs out of the only one held; with several held and none named, either fails saying which are (Several accounts). The task company.sign_in answers with is the User's sign-in gate: it goes to input-required with where to sign in, takes cancel, and ends completed with the company.sign_in tool's result, canceled, or failed saying how. An Account Token already held under the label that covers the scopes completes it without a gate. The task company.sign_out answers with ends completed with {company, account, signed_out, revoked}, or failed when nothing was taken or the revocation failed — the Account Token forgotten here in the second case.

Reserved names. _instance.result and _instance.emit are how a child instance reports to its parent; they are the operator's and are not listed in params.ops. ask_human is the model's tool and is not served over A2A. No workflow may declare a built-in op — command or operator — or a reserved name as its command.

Workflow-declared commands. A workflow whose start step is kind: a2a with command: adds that op. A caller may send it when its grants name the op (an operator always may) and the start's roles: admit its role, and the arguments are held to the start's schema. The extended card lists them in the command extension's commands param.

The normative op tables, argument and result schemas are at https://agentd.dev/a2a/ext/command and https://agentd.dev/a2a/ext/operator. Operate a running daemon shows the operator methods in use.

Device authorization grant

With a2a.device_grant.enabled, the listener origin is an OAuth 2.0 authorization server. Its endpoints take application/x-www-form-urlencoded bodies of at most 4 KiB (unknown parameters ignored, a repeated one refused), answer OAuth JSON with Cache-Control: no-store and sit behind the same origin gate as POST /.

EndpointParametersAnswer
POST /oauth2/device_authorizationclient_id (1 to 64 of A-Z a-z 0-9 . _ -); scope (user or operator, default user)device_code, user_code, verification_uri, expires_in, interval
POST /oauth2/tokengrant_type=urn:ietf:params:oauth:grant-type:device_code, device_code, client_idaccess_token, token_type: Bearer, expires_in, scope
POST /oauth2/revoketokenends the session the token names

While a code waits, a poll answers authorization_pending, and polling faster than interval answers slow_down. Other OAuth errors: access_denied (denied), expired_token (the code lapsed), invalid_grant, invalid_request, invalid_scope (a scope a2a.device_grant.scopes does not offer) and unsupported_grant_type.

{"device_code":"3f9d…6c14","expires_in":600,"interval":5,"user_code":"WJLG-DRVQ","verification_uri":"https://agent.example.com:8443/oauth2/device"}
{"access_token":"agentd_at_25f1…aa90","expires_in":28800,"scope":"user","token_type":"Bearer"}

Scopes. A session is a user unless the client asked for operator, a2a.device_grant.scopes lists it, and the approver grants it. An approver may narrow a request, never widen it. The session principal is user:<name>, or operator for an operator session.

Sessions. A session token is agentd_at_ followed by 256 random bits, held only as its SHA-256 in memory: a restart ends every session. There are no refresh tokens. No configured secret may start with agentd_at_. A session id is ds_ (device) or ls_ (launch) followed by 16 hex digits, and every audit line of the caller carries it.

Revocation. auth.sessions.revoke ends one session {sid}, every session of a name {name}, or all {all: true}; POST /oauth2/revoke ends the session whose token it is given. Revocation closes the session's open streams and refuses its waiting requests within 100 ms, and the feed ends with goodbye reason revoked, by session id, so a sibling session of the same name keeps working. Revoking never deletes what the principal owns.

Codes, tokens and user codes are never logged.

Launch grant

agentd tui and agentd ui sign their client in with the extension grant type https://agentd.dev/oauth/grant-type/launch (RFC 6749 §4.5) at /oauth2/token, while a launch is installed in the daemon's process:

  • with a code the launcher minted and handed its client: single use, valid for 60 seconds, bound to the client and, for the web UI, to the launched origin; or
  • with a request_code from POST /oauth2/launch_authorization, which a launched web UI tab makes and the person at the launcher's terminal approves by typing the code the tab shows. A request lives 2 minutes, and at most 16 wait at once.

Both are redeemed only from a loopback peer, and either buys an operator session: eight hours for a browser tab, the launcher's lifetime for the TUI. The grant is not declared on the card; the RFC 8414 metadata lists it while a launch is installed. Use the terminal and web UI describes the launcher.

The outbound client

agentd dials a peer (a2a.delegate, a2a.send, subagent.send to an instance child, a paid task's answer, agentd --login company:<name>) through the A2A project's own client, a2a-client-lf: its A2AClient over its JSON-RPC transport writes the envelope and the ProtoJSON, sends A2A-Version: 1.0 on every request, parses the SSE stream and decodes every error. agentd builds the HTTP client that transport is handed, and adds its own headers to each request:

On the HTTP clientRule
TLSagentd's own rustls configuration on ring: the bundled roots, security.tls_ca, and the peer's client_cert and client_key as the mTLS identity
unix:///paththe request goes over that socket
proxiesnone: a peer is dialled directly, whatever HTTPS_PROXY says
redirectsnone followed: a 3xx answer fails the step, naming its status and target origin; an https:// peer is dialled over TLS only
errorsthe SDK's: a reply with no JSON-RPC body (a gateway's 401 or 502 page) reads as -32603: failed to parse JSON-RPC response, without its HTTP status
connectionsone per request, none kept
bounds30 s per request (the step's time left, when less); a stream silent for 45 s, or past the step's timeout, is given up and its task polled
Header addedValue
A2A-Extensionswhat the peer's card requires, what the step offers (a2a-x402 on a step that may pay), and what the message is marked with
traceparent, tracestatethe hop's span
the peer credentialthe peer's headers and its auth bearer

The card is read with a plain GET on the same client, with the same headers, because its Cache-Control decides how long it is kept. A peer whose card says it streams is sent SendStreamingMessage; one that does not, SendMessage with returnImmediately, then polled with GetTask; a peer with no card is streamed to first. A stream refused with -32004 is sent once more, unary, as the same message. A peer that answers SendStreamingMessage with a plain JSON result instead of a stream is refused by the SDK, and the step fails with that error.

Nothing is signed per request: the client's interceptor sees the headers, not the URL or body a signature covers. An aws peer auth is refused at load, and an AAuth identity signs no A2A request.

An instance child's reports to its parent go through the channel it was handed at spawn, which has no path for the HTTP client to dial. That one request, a SendMessage carrying _instance.result or _instance.emit, is framed by agentd itself; the parent accepts nothing else from a child, and a delegation to parent is refused.

The released SDK carries a DataPart's or a metadata's numbers as doubles: a whole number goes on the wire as 7.0 (agentd's listener reads it back as 7), an integer past 2^53 is rounded, and a peer's reply that carries one past 2^53 is refused as a whole. The one exception is an x402 payment message (and its rejection): agentd frames it itself, the way it frames a report to the parent, and sends it byte for byte, so the payload's x402Version stays an integer for the peer's verifier. It goes back to the SDK once a2a-pb releases its fix (90e2876).

Listener settings

Every a2a.* key is operator-only except a2a.peers: an instruction document's :::config fragment may write only the outbound peers. Every path is also a flag (--a2a-<path>) and an environment variable (AGENTD_A2A_<PATH>); --listen is short for a2a.listen. Configuration reference lists every key.

KeyDefaultReloadMeaning
a2a.listenno listenerrestarthttps://host:port, http://host:port on loopback, or unix:///path
a2a.urlthe bind's own URLrestartthe public origin: scheme://host[:port], lowercase, no default port, https unless loopback
a2a.tls.cert, a2a.tls.keynonerestart; files re-read on changethe server identity
a2a.tls.client_canonerestart; file re-read on changerequire a client certificate of every caller
a2a.bearernonerestarta secret whose presenter is the operator
a2a.principals[]reloadthe principal rules
a2a.cors.origins[]reloadbrowser origins admitted, exactly; * and paths refused
a2a.device_grant.enabledfalserestartserve the device grant and declare it on the card
a2a.device_grant.scopes[user]restartwhat a client may request: user, operator
a2a.device_grant.token_ttl8hrestartsession lifetime, 5m to 30d
a2a.device_grant.code_ttl10mrestarthow long a code waits, 1m to 30m
a2a.device_grant.verification_urithe listener's own pagerestartwhere the approving person is sent: https://, or http:// on loopback
a2a.device_grant.rateunlimitedrestart<burst>/<window> per signed-in name
a2a.events.enabledfalserestartdeclare the events extension and serve the feed
a2a.introspection.enabledfalsereload; admin.setserve the introspection ops and audit events on the feed
a2a.push.enabledfalsereloadaccept webhook registrations and deliver
a2a.push.allow_privatefalsereloadpermit private and loopback webhook targets
a2a.push.allow[]reloadpush targets admitted under security.egress: closed beyond the peers' endpoints
a2a.peers[]reloadagents this instance dials
a2a.resourcenonerestartthe resource identifier inbound access tokens are issued for, their aud: a canonical URI on the listener's origin; needs a2a.inbound_tokens
a2a.inbound_tokens[]restartthe enterprise authorization servers whose JWT access tokens (RFC 9068) name a caller; needs a TCP listener and a2a.resource, and the a2a and oauth features

A rotated certificate is served on the next connection without a restart; a bad intermediate write keeps the last good identity. Whether client certificates are required is fixed at startup.

Peers (a2a.peers[]):

KeyRule
namerequired, unique; A-Z a-z 0-9 _ -
endpointrequired: https://host[:port], http:// to a loopback host, or unix:///path
autha credential provider: kind: static, oauth2 or spiffe (Outbound credentials); aws is refused
headersextra request headers; a credential-shaped header must be a secret reference
client_cert, client_keyan mTLS client identity; set together
ratepacing of sends to the peer, per process
timeoutthe per-request timeout to the peer

security.tls_ca adds a trust anchor for every outbound TLS connection, peers included.

Inbound token issuers (a2a.inbound_tokens[]):

KeyDefaultRule
issuerrequiredthe issuer, https:// (http:// to a loopback host); every token's iss and the metadata's issuer equal it byte for byte; unique
nameenterprise, enterprise-<n>the card's scheme name
profilegenericgeneric: RFC 9068 — typ: at+jwt, the person in sub, the client in client_id, the scopes in scope; okta: an Okta custom authorization server — no typ or at+jwt, the person in uid, the client in cid, the scopes in scp
audiences[a2a.resource]the aud values a token may carry; none may be a client
jwks_urithe metadata'sthe key set, on the issuer's origin; under okta, a custom server's {issuer}/v1/keys
algs[RS256, ES256]the algorithms a token may be signed with, of RS256, ES256, EdDSA; none and HS* are refused
typthe profile'snone, or the values a token's typ may take beside at+jwt
subject_claimthe profile'sthe claim that names the person
tenant_claimnonethe claim that names a multi-tenant issuer's tenant, put into the principal — user:oidc:<iss>#<tenant>/<subject>, so one subject in two tenants is two people; a token without it is refused
clientsrequiredthe front-end clients (azp, cid or client_id) that may call
require_user_tokentruerefuse a token issued to a client alone; false names it an agent
max_token_age1hhow old a token may be by its iat, at most 24h
max_chain_depth4how deep its act chain may nest, at most 16; deeper is refused
flowauthorization_codethe flow the card declares: authorization_code or device_code
scopes_to_skills{}each scope's skills: conversation, workflow:<name glob>, command:<op>; empty, the scopes narrow nothing

Load-time refusals

The load refuses these with exit code 2, before anything starts.

RefusedWhy
https:// listener without a2a.tls.cert and a2a.tls.keynothing to serve TLS with
non-loopback bind without a2a.bearer or a2a.tls.client_cano open control plane
http:// on a non-loopback bindplaintext is loopback only
wildcard bind (0.0.0.0, ::) without a2a.urlno address a caller can dial
a2a.url not a canonical originthe card and the OAuth issuer live at the origin root
a2a.tls on a unix:// listenerthe kernel authenticates the peer
a2a.url, cors, device_grant, events or introspection without a2a.listenthey are served on the listener
a2a.listen, webhooks.listen or a2a.peers in a build without the a2a featurenothing could serve or dial them
store.kind: none on a long-lived instancea daemon must keep its tasks
* or a path in a2a.cors.originsorigins are listed exactly
device grant without an operator credentialnobody could approve a code
device grant beside a2a.tls.client_caa device session has no certificate
device grant on a unix:// listenerthe kernel already vouches for every peer
a principal rule matching a certificate (san, sub) without a2a.tls.client_cathe listener never asks for a certificate
a rule with no matcher, or more than onea rule matches one way
any with role: operatoranyone cannot be the operator
a bearer_ref or any rule without idthe evidence names nobody
an invalid or duplicate idan id names one principal
a grant naming an operator-only op on a non-operator rulethe floor answers to the role
a malformed quotas.rate
a duplicate peer name, a bad peer endpoint, client_cert without client_key, auth.kind: aws on a peer
a workflow command that names a built-in opit would shadow the operator's control
a2a.inbound_tokens on a unix listener, or without a2a.resourcea token is presented over HTTP, for one resource
a2a.resource not canonical, or off the listener's originits metadata is served there
an issuer not https://, listed twice, with no clients, an audience that is a client, none or HS* among its algs, or a jwks_uri off its origineach would let a token through that names nobody this agent should trust
a token_iss rule naming no issuer, with other evidence, an id or an idp_subject, or a role other than user or agentthe token names the person
a2a.resource, a2a.inbound_tokens, match.token_iss or a webhook's auth.jwt in a build without a2a and oauthnothing could check a token

Limits and constants

WhatValue
Blocking SendMessage waituntil the task is terminal or interrupted; a2a.blocking_wait caps it (unset by default)
A unary request's wait on the runtime120 s
Card build5 s, then 503 with Retry-After: 5
Card cachingCache-Control: public, max-age=60, with an ETag
Observation feed streamheld 10 minutes, then goodbye with reason deadline
Observation feed replay ring1024 events
Task historythe newest 64 messages, at most 256 KiB together
History on a feed task eventthe newest 4 messages, at most 32 KiB
List page sizedefault 50, maximum 100
A2A-Extensions32 tokens considered, 512 bytes each
Failed credentials per source20, one forgiven every 3 s; 4096 sources tracked; a source is an IPv4 address or an IPv6 /64
Refusal log linesone per source and reason per 60 s; 20 at once across sources, then one per second
Revocation reaching open requests100 ms
Device codes per source5, then one per 12 s
Token polls per source30, then one per second
Waiting device codes4 per source, 16 per network (an IPv6 /48), 64 in all
Device poll interval5 s; slow_down adds 5 s
User code8 letters from BCDFGHJKLMNPQRSTVWXZ, shown as XXXX-XXXX
OAuth form body4 KiB
Launch codesingle use, 60 s
Launch request2 min; at most 16 waiting
Push delivery10 s
Settled task kept unreadat least 30 s
Task retention sweepevery second
Peer card cachethe card's max-age, at most 5 min; 1 min when it names none; 5 s for a peer on this host
Peer card fetch5 s
Peer request30 s per round trip; GetTask polls 100 ms apart, bounded by the step's timeout
Peer streamgiven up after 45 s without a byte, or at the step's timeout; its task is then polled
Peer task in AUTH_REQUIREDpolled once a second; followed auth_timeout (default 1 h) past the step's timeout
Inbound token16 KiB; times checked with 60 s of skew
An issuer's key setkept an hour; read again when a token names a key it lacks, at most every 30 s
Inbound sessions4096, each kept an hour past its token's expiry
A webhook's tokenlives at most max_lifetime (5 min, at most 15 min); 65 536 jtis remembered until they expire
Admission sign-ins3 per principal per 10 minutes; a start link opens once, within 60 s

A card read under a client certificate is not cached, and a delegation that fails drops the card it used.

Log events

EventWhen
a2a.listenthe listener bound: authority, advertised URL, TLS, mTLS, device grant, events, introspection, implicit operator
a2a.denieda request was refused: principal, rule, method, op, reason, status, session id; at most one line per source and reason per minute, with a suppressed count
a2a.unix.denieda unix-socket connection from another uid was dropped
a2a.push.registereda webhook was registered
a2a.push.faileda webhook delivery failed and was dropped
a2a.delegate, a2a.senda workflow step dialled a peer
a2a.inbound.ready, a2a.inbound.unavailablean inbound-token issuer's metadata and keys were loaded, or could not be
a2a.task.auth_requireda task waits on its caller's sign-in at admission, or its decision: signed_in, refused, not_offered
a2a.peer.auth_requireda peer's task waits on a person's sign-in, or went on (decision: resumed)

The a2a.denied reasons are auth_failures_limited, unauthenticated, invalid_credential, invalid_token (an inbound token a check refused: its issuer and why, never the token), insufficient_scope, no_role, rate_limited and not_permitted. Events and metrics reference lists every event.

Probes

These read a configuration without starting anything:

CommandPrints
agentd --capabilities --config <file>the manifest; its a2a block has methods, command_ops, extensions, events, introspection, url, cors_origins and auth (bearer, device, mtls, implicit_operator, required)
agentd --extensionsevery extension and binding URI agentd publishes
agentd --extension-schema <name>one extension's schema bundle
agentd --validate-config --config <file>the load verdict; exit 0 or 2

Next steps