A2A Protocol: Agent Discovery with agent.json
What is the A2A Protocol?#
The Agent-to-Agent (A2A) protocol, originally developed by Google and now governed by the Linux Foundation, enables AI agents to discover and communicate with each other. While MCP connects AI agents to tools and services, A2A connects AI agents to other AI agents. The core discovery mechanism is the agent card — a JSON file at /.well-known/agent.json that describes your agent's capabilities, communication protocols, and authentication requirements. When an AI agent needs a capability it does not have (like translating a document or analyzing an image), it can discover and delegate to another agent via A2A.
Creating Your Agent Card#
The agent card at /.well-known/agent.json describes your agent's identity and capabilities to other agents in the A2A network.
{
"name": "Citability Scanner Agent",
"description": "Scans domains for AI visibility compliance across 62+ protocol endpoints",
"version": "2.1",
"protocol": "a2a",
"capabilities": [
{
"name": "scan_domain",
"description": "Full AI visibility scan with ADP, MCP, UCP, ACP, and content analysis",
"input": { "domain": "string" },
"output": { "score": "number", "details": "object" }
},
{
"name": "compare_domains",
"description": "Compare AI visibility scores between two or more domains",
"input": { "domains": "string[]" },
"output": { "comparison": "object" }
}
],
"communication": {
"protocol": "https",
"endpoint": "https://api.citability.ai/a2a",
"authentication": {
"type": "api_key",
"header": "X-API-Key"
}
},
"metadata": {
"provider": "Citability",
"website": "https://citability.ai",
"documentation": "https://citability.ai/docs/a2a"
}
}A2A vs MCP#
A2A and MCP serve different purposes in the agentic ecosystem. MCP is for connecting AI agents to human-built tools and services (APIs, databases, SaaS platforms). A2A is for connecting AI agents to other AI agents. In practice, many services implement both: MCP for direct tool use and A2A for agent delegation. If your service is primarily consumed by AI agents acting on behalf of users, implement MCP. If your service is itself an AI agent that other agents might want to collaborate with, implement A2A. For maximum discoverability, implement both.
MCP connects agents to tools. A2A connects agents to agents. Most services benefit from implementing both for maximum AI ecosystem integration.
Frequently Asked Questions
No. Any service with AI-powered capabilities can publish an agent card. If your product offers functionality that another AI agent might want to use (analysis, generation, data lookup), you can make it discoverable via A2A.
agent.json (singular) at /.well-known/agent.json is the A2A agent card for agent-to-agent discovery. agents.json (plural) is a separate file for declaring agentic capabilities to human-operated AI tools. They serve different audiences.
A2A supports multiple authentication methods declared in the agent card: API keys, OAuth2, and mutual TLS. The discovering agent reads the authentication requirements from the card and authenticates accordingly before making requests.