Skip to main content
Google’s Agent-to-Agent Protocol (A2A) provides a standard way for agents to communicate with each other. Agno integrates with A2A, enabling Agno agents and teams to be exposed in an A2A-compatible format. The A2A interface works with the AgentOS runtime to provide this functionality.

Setup

Set a2a_interface=True when creating an AgentOS instance:
a2a_agentos.py
from agno.agent import Agent
from agno.os import AgentOS
from agno.os.interfaces.a2a import A2A

agent = Agent(name="My Agno Agent")

agent_os = AgentOS(
    agents=[agent],
    a2a_interface=True,
)
app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="a2a:app", reload=True)
By default, all agents, teams, and workflows in the AgentOS are exposed via A2A. Specific agents, teams, and workflows can be exposed by initializing the interface explicitly:
a2a-interface-initialization.py
from agno.agent import Agent
from agno.os import AgentOS
from agno.os.interfaces.a2a import A2A

agent = Agent(name="My Agno Agent")

# Initialize the A2A interface specifying the agents to expose
a2a = A2A(agents=[agent])

agent_os = AgentOS(
    agents=[agent],
    interfaces=[a2a], # Pass the A2A interface to the AgentOS using the `interfaces` parameter
)
app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="a2a-interface-initialization:app", reload=True)

A2A API

The A2A interface accepts A2A-compatible requests to run agents, teams, and workflows. Responses are returned in A2A-compatible format. See the A2A API reference for more details.

Developer Resources