agentc
GitHubagentc-sh/agentc
agentc
GitHubagentc-sh/agentc
›Introduction
Get started›Concepts in 5 minutes›Build your first agent›Add your first tool›Serve and connect
Concepts›Architecture overview›The manifest›The compilation pipeline›Archetypes›The graph›Tools and capabilities›Runtime libraries›Skills›Agents and prompts›Serving and protocols›Observability
Guides›Author a manifest›Write a tool›Give your agent a filesystem›Control network egress›Connect external tools via MCP›Connect agents via A2A›Use the bash tool›Control tool access with capabilities›Write templated prompts›Manage prompts with Langfuse›Pass context from the client›Configure a model provider›Connect a CopilotKit frontend›Deploy a standalone binary›Deploy with Docker and PostgreSQL›Instrument with OpenTelemetry›Extend code generation with blocks
Reference
Manifest
Runtime
›AG-UI›A2A
›Observability

A2A

The Agent2Agent protocol add-on mounted alongside the native contract.

Overview

A2A is a standardized protocol for agent-to-agent delegation. It gives an upstream agent a task-oriented interface for discovering this agent, sending it work, streaming basic progress, retrieving a known task, and canceling that task.

This implementation is intentionally foundational. It supports the core communication loop, not the entire A2A specification.

Enable it in your manifest:

agent.acl
http_server {
  protocol {
    a2a {}
  }
}

The default base path is /a2a. You can change the base path:

protocol {
  a2a {
    path = "/custom-path"
  }
}

With a custom base path, the endpoints below are served under <path>.

Domain mapping

The A2A add-on is a protocol adapter over the same service layer as the native HTTP API.

A2A conceptagentc concept
TaskRun
ContextSession
MessageUser message input
Text partUser text content
Data partStructured input context
Task statusRun status
ArtifactAssistant output or structured final state

Agent Card

GET/a2a/.well-known/agent-card.json

Returns the Agent Card describing this A2A service.

Responses

Agent Interface

AgentInterface
url
string

The URL where this A2A interface is served.

protocolBinding
string

The transport binding for the interface.

protocolVersion
string

The A2A protocol version advertised by this interface.

Send a message

POST/a2a/message:send

Sends a message to the agent and waits for the resulting task or message response.

Request headersin: header
X-Tenant-Id
string

Optional tenant ID. If omitted, the configured default tenant ID is used.

Request bodyin: body
message
Message

The message to send to the agent.

configuration
object | null

Optional A2A send-message configuration.

metadata
object | null

Optional request metadata.

Message

Message
messageId
string

Client-provided message ID.

contextId
string | null

Optional context ID. In agentc, this maps to the session ID.

taskId
string | null

Optional task ID. In agentc, this maps to the run ID.

role
string

The sender role.

ROLE_USERROLE_AGENTROLE_UNSPECIFIED
parts
Part[]

Message content parts.

metadata
object | null

Optional message metadata.

Part

Part
text
string

A text content part.

data
object

A structured JSON content part.

filename
string | null

Optional filename metadata.

mediaType
string | null

Optional media type metadata.

metadata
object | null

Optional part metadata.

For the first implementation, text and data parts are supported. raw and url parts are not supported yet.

curl -X POST http://localhost:8080/a2a/message:send \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "messageId": "msg-1",
      "role": "ROLE_USER",
      "parts": [
        { "text": "Return a short greeting." }
      ]
    }
  }'
Responses

Task

Task
id
string

The task ID. In agentc, this is the run ID.

contextId
string

The context ID. In agentc, this is the session ID.

status
TaskStatus

The current task status.

artifacts
Artifact[] | null

Artifacts produced by the task.

history
Message[] | null

Optional task message history.

metadata
object | null

Optional task metadata.

Task Status

TaskStatus
state
string

The current task lifecycle state.

TASK_STATE_SUBMITTEDTASK_STATE_WORKINGTASK_STATE_COMPLETEDTASK_STATE_FAILEDTASK_STATE_CANCELEDTASK_STATE_INPUT_REQUIREDTASK_STATE_REJECTEDTASK_STATE_AUTH_REQUIREDTASK_STATE_UNSPECIFIED
message
Message | null

Optional status message.

timestamp
string | null

Optional timestamp for the status.

Artifact

Artifact
artifactId
string

The artifact ID.

name
string | null

Human-readable artifact name.

description
string | null

Optional artifact description.

parts
Part[]

Artifact content parts.

metadata
object | null

Optional artifact metadata.

Stream a message

POST/a2a/message:stream

Sends a message to the agent and streams task updates using Server-Sent Events.

Request headersin: header
X-Tenant-Id
string

Optional tenant ID. If omitted, the configured default tenant ID is used.

Request bodyin: body
message
Message

The message to send to the agent.

configuration
object | null

Optional A2A send-message configuration.

metadata
object | null

Optional request metadata.

Responses

Task Status Update

TaskStatusUpdateEvent
taskId
string

The task ID.

contextId
string

The context ID.

status
TaskStatus

The updated task status.

metadata
object | null

Optional update metadata.

Task Artifact Update

TaskArtifactUpdateEvent
taskId
string

The task ID.

contextId
string

The context ID.

artifact
Artifact

The artifact update.

append
boolean | null

Whether the artifact content should be appended.

lastChunk
boolean | null

Whether this is the final chunk for the artifact.

metadata
object | null

Optional update metadata.

SSE wire format

The response is a Server-Sent Events stream. Each event contains a JSON data payload.

data: {"task":{"id":"...","contextId":"...","status":{"state":"TASK_STATE_SUBMITTED"}}}

data: {"statusUpdate":{"taskId":"...","contextId":"...","status":{"state":"TASK_STATE_WORKING"}}}

data: {"artifactUpdate":{"taskId":"...","contextId":"...","artifact":{"artifactId":"response","name":"Agent Response","parts":[{"text":"Hello"}]},"append":true,"lastChunk":false}}

data: {"statusUpdate":{"taskId":"...","contextId":"...","status":{"state":"TASK_STATE_COMPLETED"}}}

Retrieve a task

GET/a2a/tasks/{id}

Retrieves the current state of a known A2A task.

Path parametersin: path
id
string

The task ID.

Request headersin: header
X-Tenant-Id
string

Optional tenant ID. If omitted, the configured default tenant ID is used.

Responses

Cancel a task

POST/a2a/tasks/{id}:cancel

Cancels an active A2A task.

Path parametersin: path
id
string

The task ID.

Request headersin: header
X-Tenant-Id
string

Optional tenant ID. If omitted, the configured default tenant ID is used.

Responses

Current scope

The current A2A add-on supports:

Agent Card discovery
Message send
Message streaming over SSE
Known task retrieval
Known task cancellation
Text input parts
Structured JSON data input parts
Text artifacts and structured `state` artifacts

It does not currently support task listing, push notifications, raw binary parts, URL parts, or the full A2A extension surface.

This page documents inbound A2A serving. To configure this agent to call other A2A servers as tools, see Connect agents via A2A.

← PreviousAG-UINext →Observability

© 2026 pogue.dev. All rights reserved.

Creative CommonsCC BY 4.0
On this pageOverviewDomain mappingAgent CardAgent InterfaceSend a messageMessagePartTaskTask StatusArtifactStream a messageTask Status UpdateTask Artifact UpdateSSE wire formatRetrieve a taskCancel a taskCurrent scope

Search docs

Search the agentc documentation