Skip to content
Changelog

Serve Agno agents over A2A v1.0 with tasks stored in your database

November 12, 20262 min read

Other frameworks can now call your Agno agents over the A2A v1.0 protocol. AgentOS runs it on the official a2a-sdk 1.x, and a2a_interface=True gives each local entity, ClaudeAgent and CodexAgent included, its own endpoint. On the calling side, A2AClient reads the Agent Card and speaks whichever version the server lists.

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
 
agent = Agent(
    id="support",
    name="Support",
    model=OpenAIResponses(id="gpt-5.6-luna"),
    db=SqliteDb(db_file="agentos.db"),
)
agent_os = AgentOS(agents=[agent], a2a_interface=True)
app = agent_os.get_app()
from agno.client.a2a import A2AClient
 
client = A2AClient("http://127.0.0.1:7777/a2a/agents/support")
result = await client.send_message("Refund order 63.")
task = await client.aget_task(result.task_id)

Each entity gets an Agent Card at /a2a/agents/{id}/.well-known/agent-card.json and one endpoint at /a2a/agents/{id}, with teams and workflows under /a2a/teams/ and /a2a/workflows/. The JSON-RPC method in the body picks the operation, and the endpoint answers send, stream, get, cancel, list and subscribe. The card lists a v1.0 and a v0.3 interface on the same URL, so a client built on a2a-sdk 0.3 keeps working with no change.

Tasks live in your database

A task is the A2A view of an Agno run and shares its id. When the entity has a database, any replica can read, list or cancel the task, and it is still there after a restart.

ListTasks returns the caller's tasks newest first and pages with pageSize, 50 by default and 100 at most. Subscribing to a task only works on the server running it. Only the user who started a task, or an admin, can reach it. Anyone else gets Task not found.

Pause for approval and continue

A run that stops for a confirmation, user input or an external tool ends its message with the task in INPUT_REQUIRED. The reply carries the requirements as data. The client fills them in and sends them back to the same task, and that continue can go to any replica.

result = await client.send_message("Refund order 63.")
data = result.data
for requirement in data["requirements"]:
    requirement["tool_execution"]["confirmed"] = True
result = await client.send_message("", task_id=result.task_id, data=data)

We ran this against a live AgentOS on uvicorn with a refund tool marked requires_confirmation=True and a SQLite database. A stand-in model copied from the release's tests calls the tool once and then answers.

Real output of one A2A task in four steps. send_message returns input-required with the refund tool waiting on order_id 63. A second send_message with the task id and confirmed requirements returns completed with the answer Order 63 has been refunded. aget_task reads the same completed task back from SQLite. ListTasks returns one task in TASK_STATE_COMPLETED.

Push notifications and the extended Agent Card are not served, and the card says so under capabilities. A crash leaves a running task working, and nothing resumes it.

See the cookbook, and learn more about the A2A interface in the documentation.

Frequently asked questions

Each Agent, Team and Workflow has its own card at /a2a/agents/{id}/.well-known/agent-card.json (or /teams/, /workflows/). Fetched through a TestClient, the card listed {"url": "http://testserver/a2a/agents/support", "protocolBinding": "JSONRPC", "protocolVersion": "1.0"} and the same URL with "protocolVersion": "0.3", plus "capabilities": {"streaming": true, "pushNotifications": false, "extendedAgentCard": false}. The card sends an ETag and answers 304 to a matching If-None-Match.

Yes. Pass interfaces=[A2A(agents=[agent], enable_v0_3_compat=False)] to AgentOS. The endpoint stops answering v0.3 method names such as message/send, and the card drops its v0.3 interface. Agno leaves the setting on by default.

An A2A task is the Agno run under the same id, so the store rebuilds it from the run row the entity already writes, with no extra table. An Agent, Team or external agent with a database runs each message in the background with the row written as PENDING first. A workflow, or an entity with no database, runs in the server process and is stored when it ends.

When the task stops in INPUT_REQUIRED, mark each requirement in the reply's data as confirmed with requirement["tool_execution"]["confirmed"] = True. Then send the data back to the same task with client.send_message("", task_id=result.task_id, data=data), from any replica. In our run, that second call returned completed with 'Order 63 has been refunded.'

Shipped around the same time