A2A Protocol
Agent-to-Agent protocol — open standard for inter-agent communication, discovery, and task delegation.
AgentOven natively implements the Agent-to-Agent (A2A) protocol — an open standard by Google (now Linux Foundation) for inter-agent communication. Every agent registered with AgentOven automatically gets an A2A endpoint.
Agent Card
Every baked agent publishes an Agent Card at /.well-known/agent.json describing its capabilities, skills, and supported content types. This enables automatic discovery by other agents and clients.
json
{
"name": "research-bot",
"description": "Research and summarization agent",
"url": "https://oven.example.com/agents/research-bot/a2a",
"version": "1.0.0",
"capabilities": {
"streaming": true,
"pushNotifications": true
},
"skills": [
{
"id": "web-search",
"name": "Web Search",
"description": "Search the web for information"
},
{
"id": "summarization",
"name": "Summarization",
"description": "Summarize long documents"
}
]
}Task Lifecycle
Tasks flow through a well-defined state machine: submitted → working → completed (or failed / canceled). Clients can poll for status or subscribe via SSE streaming.
| State | Description |
|---|---|
submitted | Task received and queued |
working | Agent is actively processing the task |
completed | Task finished with artifacts |
failed | Task encountered an unrecoverable error |
canceled | Task was canceled by the client |
Sending a Task
Tasks are sent as JSON-RPC 2.0 messages to the agent's A2A endpoint:
terminal
$ curl -X POST https://oven.example.com/agents/research-bot/a2a \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tasks/send", "id": "1", "params": { "id": "task-001", "message": { "role": "user", "parts": [{"type":"text","text":"Summarize AI safety papers"}] } } }'
Streaming (SSE)
Use tasks/sendSubscribe to get real-time streaming responses via Server-Sent Events. The SDK handles reconnection and artifact assembly automatically.
terminal
$ curl -N -X POST https://oven.example.com/agents/research-bot/a2a \ -H "Content-Type: application/json" \ -H "Accept: text/event-stream" \ -d '{ "jsonrpc": "2.0", "method": "tasks/sendSubscribe", "id": "2", "params": { "id": "task-002", "message": { "role": "user", "parts": [{"type":"text","text":"Stream analysis of AI safety"}] } } }'
Multi-Agent Communication
A2A enables agents to discover and communicate with each other. An agent can query the Menu for available agents, read their Agent Cards, and delegate tasks — all through standard A2A protocol.
python
from agentoven import AgentOven oven = AgentOven("http://localhost:8080") # Agent discovers another agent via the Menu menu = oven.menu.list() writer = next(a for a in menu if "writing" in a.skills) # Delegate a sub-task via A2A result = oven.a2a.send_task( agent=writer.name, message="Write a blog post about these findings: ...", ) print(result.text)
Push Notifications
For long-running tasks, agents can send push notifications to a webhook URL. Configure the callback in the task params:
json
{
"jsonrpc": "2.0",
"method": "tasks/send",
"id": "3",
"params": {
"id": "task-003",
"message": {
"role": "user",
"parts": [{"type":"text","text":"Long analysis job"}]
},
"pushNotification": {
"url": "https://my-app.com/webhooks/agentoven",
"events": ["completed", "failed"]
}
}
}