Quick Start
JSON-RPC Methods
The A2A server exposes six JSON-RPC 2.0 methods for complete task lifecycle management:| Method | Description |
|---|---|
message/send | Send a message, get task result |
message/stream | Send a message, get SSE stream |
tasks/get | Get task by ID |
tasks/list | List tasks (optionally by contextId) |
tasks/cancel | Cancel a task |
agent/getExtendedCard | Get extended agent card (auth required) |
message/send
Send a message and receive the complete task result:message/stream
Send a message and receive real-time updates via Server-Sent Events:tasks/get
Retrieve an existing task by ID:tasks/cancel
Cancel a running task:Configuration Options
| Parameter | Type | Default | Description |
|---|---|---|---|
agent | Agent | — | Single agent |
agents | AgentTeam | — | Multi-agent team |
name | str | agent name | Endpoint name |
description | str | agent role | Description |
url | str | http://localhost:8000/a2a | Endpoint URL |
version | str | "1.0.0" | Version |
prefix | str | "" | URL prefix |
auth_token | str | None | Bearer token auth |
extended_agent_card_callback | callable | None | Extended card callback |
Multi-Agent Support
Route messages to multi-agent workflows usingAgentTeam:
When both
agent and agents are provided, the single agent takes priority.Streaming Events
Event Types
| Event Type | Description |
|---|---|
task.status | Task state changes (working, completed, failed) |
task.artifact | Artifact outputs with content chunks |
done | Stream completion signal |
Agent Card
The Agent Card is automatically generated from your agent’s configuration:GET /.well-known/agent.json
Message Parts
A2A messages support multimodal content through different part types:| Part Type | A2A Field | Python Type |
|---|---|---|
TextPart | text | TextPart(text="...") |
FilePart | file.uri | FilePart(file_uri="...") |
DataPart | data | DataPart(data={...}) |
A2UI payloads
When an agent usessend_a2ui_messages, sync message/send artifacts may include a DataPart with metadata.mimeType of application/json+a2ui. Use create_a2ui_part() / is_a2ui_part() from praisonaiagents.ui.a2ui for manual wrapping.
A2A
message/stream currently emits text-only artifacts. For live A2UI during streaming, prefer AG-UI or PraisonAIUI.Authentication
Protect your A2A endpoint with bearer token authentication:Task Lifecycle
Docker Deployment
Best Practices
Protect production endpoints
Protect production endpoints
Set
auth_token on any A2A server exposed beyond localhost. The discovery card stays public per spec — keep sensitive skills and tools out of the advertised card when auth is required.Prefer streaming for long tasks
Prefer streaming for long tasks
Use
message/stream when responses may take more than a few seconds. Clients receive progress via SSE instead of blocking on a single JSON-RPC response.Use AgentTeam for multi-step work
Use AgentTeam for multi-step work
Route complex workflows through
AgentTeam rather than chaining multiple single agents. One A2A endpoint can orchestrate monitor → act → feedback loops cleanly.Publish accurate agent cards
Publish accurate agent cards
Keep
name, description, and url aligned with your deployment. External agents discover capabilities via GET /.well-known/agent.json — stale URLs break inter-agent handoffs.Related
A2UI Protocol
Declarative UI via send_a2ui_messages and DataPart artifacts
A2A Client
A2A client for connecting to other agents
MCP Lifecycle
Model Context Protocol for tool integration

