> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent-to-Agent Protocol (A2A)

> A2A is an open protocol enabling AI agents to communicate and collaborate across platforms. Learn how to build and connect A2A-compatible agents.

## What is A2A?

A2A (Agent-to-Agent Protocol) is an open protocol that enables AI agents to discover and communicate with each other across different platforms and vendors. Originally launched by Google and now maintained by the Linux Foundation, A2A provides a standardized way for agents to collaborate on complex tasks.

<Info>
  **A2A vs MCP — What's the difference?**

  * **MCP** connects agents to **tools** (databases, APIs, services)
  * **A2A** connects agents to **other agents** (delegation, collaboration)

  Use both together: MCP gives your agent capabilities, A2A lets it collaborate with specialized agents.
</Info>

## Current Implementation

| Feature            | Status                                                       |
| ------------------ | ------------------------------------------------------------ |
| **Streaming**      | A2A waits for the complete response before returning results |
| **Authentication** | None or API key based                                        |
| **Discovery**      | Via `agent-card.json`                                        |

## Core Concepts

### AgentCards

Every A2A agent exposes an **AgentCard** — a JSON file at `/.well-known/agent-card.json` that describes the agent's capabilities. This enables automatic discovery.

```json theme={null}
{
  "name": "Research Assistant",
  "description": "Searches and summarizes academic papers",
  "url": "https://research-agent.example.com",
  "version": "1.0.0",
  "skills": [
    {
      "id": "paper-search",
      "name": "Paper Search",
      "description": "Search academic databases for relevant papers"
    },
    {
      "id": "summarize",
      "name": "Summarize Paper",
      "description": "Generate a concise summary of a research paper"
    }
  ]
}
```

### Communication Flow

1. **Discovery** — Client fetches `/.well-known/agent-card.json` to learn agent capabilities
2. **Task Creation** — Client sends a task request with input data
3. **Processing** — Agent processes the task and generates a complete response
4. **Response** — Agent returns the full result (no streaming)

<Tip>
  **Complete A2A Agent Example:** The [Langdock-A2A-Demo Repository](https://github.com/matsjfunke/Langdock-A2A-Demo) contains a TypeScript-based A2A agent (protocol v0.3.0) with Express server and Langdock API integration.
</Tip>

## When to Use A2A

| Use Case                                 | A2A | MCP |
| ---------------------------------------- | --- | --- |
| Query a database                         |     | ✓   |
| Call an API                              |     | ✓   |
| Delegate research to a specialized agent | ✓   |     |
| Coordinate multiple agents on a task     | ✓   |     |
| Connect to external tools/services       |     | ✓   |
| Agent-to-agent collaboration             | ✓   |     |

## Resources

<CardGroup cols={2}>
  <Card title="A2A Protocol Website" icon="globe" href="https://a2a-protocol.org">
    Official documentation and specification
  </Card>

  <Card title="A2A GitHub Repository" icon="github" href="https://github.com/a2aproject/A2A">
    Protocol specification and reference implementations
  </Card>
</CardGroup>

***

## Related Documentation

* [MCP Integration Guide](/en/using-langdock/guides/integrations/mcp/mcp) — Connect agents to tools
* [MCP Server Directory](/en/using-langdock/integrations/mcp-directory) — Verified MCP servers
* [Agent Configuration](/en/using-langdock/agents/configuration) — Configure your Langdock agents
