docs/guides/a2a-setup.md
Agent Zero can communicate with other Agent Zero instances using the A2A (Agent-to-Agent) protocol based on FastA2A. This guide shows you how to enable and configure A2A connectivity through the Settings UI.
A2A enables direct communication between multiple Agent Zero instances. This allows:
[!NOTE] This guide covers enabling Agent Zero as an A2A server. For API-level integration details, see the advanced connectivity documentation.
[!IMPORTANT] The API token changes when you update your Agent Zero credentials. Existing connections will need to be reconfigured with the new token.
The basic A2A connection URL follows this format:
http://YOUR_HOST:PORT/a2a/t-YOUR_API_TOKEN
To connect with a specific project active:
http://YOUR_HOST:PORT/a2a/t-YOUR_API_TOKEN/p-PROJECT_NAME
When a project is specified:
Two Agent Zero instances on the same machine:
Instance 1: http://localhost:8080/a2a/t-abc123xyz
Instance 2: http://localhost:8081/a2a/t-def456uvw
Connect to a remote Agent Zero instance:
http://agent.example.com:8080/a2a/t-remote-token
Main agent delegates frontend work to specialized agent:
http://localhost:8081/a2a/t-frontend-token/p-webapp-ui
If running Agent Zero in Docker:
host.docker.internal:PORT (macOS/Windows) or container networking (Linux)You can test A2A connectivity using curl:
curl -X POST http://localhost:8080/a2a/t-YOUR_TOKEN \
-H "Content-Type: application/json" \
-d '{"message": "Hello from another agent"}'
| Feature | A2A | MCP |
|---|---|---|
| Purpose | Agent-to-agent chat delegation | Tool/function access |
| Use Case | Long-running conversations | Specific tool calls |
| Context | Full chat context | Function parameters only |
| Best For | Workflow delegation | Tool integration |
[!TIP] Use A2A when you need another agent's reasoning and conversation capabilities. Use MCP when you just need access to specific tools or functions.
For detailed A2A protocol specifications, API examples, and integration patterns, see the Advanced Connectivity Guide.