A2A (Agent2Agent Protocol)
PraisonAI supports the A2A Protocol for agent-to-agent communication, enabling your agents to be discovered and collaborate with other AI agents.Overview
The A2A Protocol is an open standard for inter-agent communication that enables:- Discovery: Agents publish Agent Cards for discovery by other agents
- Collaboration: Agents can delegate tasks and exchange context
- Interoperability: Works with any A2A-compatible agent system
Quick Start
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/.well-known/agent.json | GET | Agent Card for discovery |
/status | GET | Server status |
Agent Card
The Agent Card is a JSON metadata document that describes your agent’s capabilities:Configuration Options
Multi-Agent Support
You can also expose multi-agent workflows:Docker Deployment
Features
| Feature | Description |
|---|---|
| Agent Card | JSON metadata for agent discovery |
| Skills Extraction | Auto-generate skills from tools |
| Task Management | Stateful task lifecycle |
| Streaming | SSE streaming for real-time updates |
| Lazy Loading | No performance impact when not used |
A2A Protocol Concepts
Task States
Tasks in A2A go through a lifecycle:submitted- Task receivedworking- Agent is processinginput-required- Waiting for user inputcompleted- Task finished successfullyfailed- Task failedcancelled- Task was cancelled
Message Parts
A2A messages can contain different types of content:- TextPart - Plain text content
- FilePart - File references (URI or bytes)
- DataPart - Structured JSON data
Artifacts
Artifacts are outputs generated by the agent:Examples
See the examples/python/a2a directory for complete examples.Related
- MCP Protocol - Model Context Protocol for tool integration
- AG-UI Protocol - UI protocol for CopilotKit integration
- Workflows - Multi-agent workflows

