Quick Start
1
Simple Agent Server
2
FastAPI Integration
JSON-RPC Methods
The A2A server exposes six JSON-RPC 2.0 methods for complete task lifecycle management: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
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
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: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

