The A2A (Agent-to-Agent) Tool enables standardized agent-to-agent communication following the A2A protocol. It provides capabilities for agent discovery, message passing, authentication, and interoperability with external A2A-compatible systems.
pip install a2a-sdk (or pip install 'a2a-sdk[all]' for full features)A2A: Open protocol for agent communication and interoperability
- mindXalpha/beta/gamma: mindX augmentic deployments
- SimpleCoder: Coding agent working with mindX BDI control
- mcp.agent: Google Cloud MCP server/client for agents
- ROMA: Meta-agent framework for multi-agent systems
- DeepResearchAgent: Hierarchical multi-agent research system
The A2A Tool follows mindX doctrine:
data/a2a/ with agent cards and message history.well-known/agents.json for web discoveryfrom tools.a2a_tool import A2ATool
from agents.memory_agent import MemoryAgent
memory_agent = MemoryAgent()
a2a_tool = A2ATool(memory_agent=memory_agent)
result = await a2a_tool.execute(
operation="register_agent",
agent_id="my_agent_123",
name="My Agent",
description="A helpful AI agent",
capabilities=["text_generation", "code_analysis", "data_processing"],
endpoint="https://mindx.internal/my_agent_123/a2a",
public_key="0x...",
version="1.0.0"
)
agent_card = result["agent_card"]
# Discover all agents
result = await a2a_tool.execute(operation="discover_agents")
Discover by query
result = await a2a_tool.execute(
operation="discover_agents",
query="code analysis"
)
Discover by capability
result = await a2a_tool.execute(
operation="discover_agents",
capability="text_generation"
)
result = await a2a_tool.execute(
operation="send_message",
from_agent="agent_1",
to_agent="agent_2",
message_type="request",
payload={
"action": "analyze_code",
"code": "...",
"language": "python"
}
)
message_id = result["message_id"]
result = await a2a_tool.execute(
operation="receive_message",
agent_id="agent_2"
)
message = result["message"]
result = await a2a_tool.execute(
operation="query_capabilities",
agent_id="my_agent_123"
)
capabilities = result["capabilities"]
result = await a2a_tool.execute(
operation="execute_action",
from_agent="agent_1",
to_agent="agent_2",
action="process_data",
parameters={
"data": "...",
"format": "json"
}
)
result = await a2a_tool.execute(
operation="generate_discovery_endpoint",
base_url="https://mindx.internal"
)
discovery_url = result["discovery_endpoint"]
Returns: https://mindx.internal/.well-known/agents.json
register_agent: Register an agent with A2A protocoldiscover_agents: Discover available agentssend_message: Send a message to another agentreceive_message: Receive and process a messagequery_capabilities: Query an agent's capabilitiesexecute_action: Request an action from another agentget_agent_card: Get agent card for an agentlist_agents: List all registered agentsgenerate_discovery_endpoint: Generate .well-known/agents.jsonget_external_resources: Get external A2A resources (SDK, AgenticPlace info)get_agenticplace_repos: Get AgenticPlace organization repositoriesclone_external_repo: Clone an external A2A repository via GitHub agentsync_with_agenticplace: Sync with AgenticPlace A2A repositoriesThe A2A Tool integrates with:
from tools.a2a_tool import A2ATool
from tools.github_agent_tool import GitHubAgentTool
from agents.memory_agent import MemoryAgent
memory_agent = MemoryAgent()
github_agent = GitHubAgentTool(memory_agent=memory_agent)
a2a_tool = A2ATool(memory_agent=memory_agent, github_agent=github_agent)
Get external resources
result = await a2a_tool.execute(operation="get_external_resources")
Get AgenticPlace repositories
result = await a2a_tool.execute(operation="get_agenticplace_repos")
Sync with AgenticPlace (creates backup first)
result = await a2a_tool.execute(operation="sync_with_agenticplace")
data/a2a/
├── agent_cards_registry.json # Agent cards registry
├── messages_registry.json # Message history
├── agent_cards/ # Individual agent cards
│ └── {agent_id}.json
├── messages/ # Individual messages
│ └── {message_id}.json
└── .well-known/ # Discovery endpoint
└── agents.json
{
"message_id": "msg_123",
"from_agent": "agent_1",
"to_agent": "agent_2",
"message_type": "request",
"protocol_version": "2.0",
"timestamp": "2024-01-01T00:00:00Z",
"payload": {...},
"signature": "...",
"metadata": {...}
}
{
"agent_id": "agent_123",
"name": "Agent Name",
"description": "Agent description",
"version": "1.0.0",
"capabilities": ["cap1", "cap2"],
"endpoint": "https://...",
"public_key": "0x...",
"signature": "..."
}
Claude has access to the following external resources through this tool: