Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions agent-os/interfaces/a2a/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: A2A
description: Expose your Agno Agent via the A2A protocol
description: Expose Agno agents via the A2A protocol
---

Google's [Agent-to-Agent Protocol (A2A)](https://a2a-protocol.org/latest/topics/what-is-a2a/) aims at creating a standard way for Agents to communicate with each other.
Google's [Agent-to-Agent Protocol (A2A)](https://a2a-protocol.org/latest/topics/what-is-a2a/) provides a standard way for agents to communicate with each other.

Agno integrates seamlessly with A2A, allowing you to expose your Agno Agent and Teams in a A2A compatible way.
Agno integrates with A2A, enabling Agno agents and teams to be exposed in an A2A-compatible format.

This is done with our `A2A` interface, which you can use with our [AgentOS](/agent-os/introduction) runtime.
The `A2A` interface works with the [AgentOS](/agent-os/introduction) runtime to provide this functionality.

## Setup

You just need to set `a2a_interface=True` when creating your `AgentOS` instance and serve it as normal:
Set `a2a_interface=True` when creating an `AgentOS` instance:

```python a2a_agentos.py
from agno.agent import Agent
Expand All @@ -30,9 +30,9 @@ if __name__ == "__main__":
agent_os.serve(app="a2a:app", reload=True)
```

By default all the Agents, Teams and Workflows in the AgentOS will be exposed via `A2A`.
By default, all agents, teams, and workflows in the AgentOS are exposed via A2A.

You can also specify which Agents, Teams and Workflows to expose:
Specific agents, teams, and workflows can be exposed by initializing the interface explicitly:

```python a2a-interface-initialization.py
from agno.agent import Agent
Expand All @@ -56,7 +56,7 @@ if __name__ == "__main__":

## A2A API

Using the A2A interface, you can run your Agents, Teams and Workflows passing A2A compatible requests. You will also receive A2A compatible responses.
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](/reference-api/schema/a2a/stream-message) for more details.

Expand Down
24 changes: 12 additions & 12 deletions agent-os/interfaces/ag-ui/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: AG-UI
description: Expose your Agno Agent via the AG-UI protocol
description: Expose Agno agents via the AG-UI protocol
---

AG-UI, the [Agent-User Interaction Protocol](https://github.com/ag-ui-protocol/ag-ui), standardizes how AI agents connect to front-end applications.
AG-UI, the [Agent-User Interaction Protocol](https://github.com/ag-ui-protocol/ag-ui), standardizes how AI agents connect to frontend applications.

<Note>
**Migration from Apps**: If you're migrating from `AGUIApp`, see the [v2 migration guide](/how-to/v2-migration#7-apps-interfaces) for complete steps.
**Migration from Apps**: For migration from `AGUIApp`, see the [v2 migration guide](/how-to/v2-migration#7-apps-interfaces) for complete steps.
</Note>

## Example usage
Expand All @@ -20,7 +20,7 @@ pip install ag-ui-protocol

</Step>
<Step title="Run the backend">
Expose an Agno Agent through the AG-UI interface using `AgentOS` and `AGUI`.
Expose an Agno agent through the AG-UI interface using `AgentOS` and `AGUI`.

```python basic.py
from agno.agent.agent import Agent
Expand Down Expand Up @@ -48,18 +48,18 @@ Use Dojo (`ag-ui`'s frontend) as an advanced, customizable interface for AG-UI a
4. Start Dojo following the instructions in the repository.

</Step>
<Step title="Chat with your Agno Agent">
<Step title="Chat with the Agno Agent">

With Dojo running, open `http://localhost:3000` and select your Agno agent.
With Dojo running, open `http://localhost:3000` and select the Agno agent.

</Step>
</Steps>

You can see more in our [cookbook examples](https://github.com/agno-agi/agno/tree/main/cookbook/agent_os/interfaces/agui/).
Additional examples are available in the [cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/agent_os/interfaces/agui/).

## Custom Events

Custom events you create in your tools are automatically delivered to AG-UI in the AG-UI custom event format.
Custom events created in tools are automatically delivered to AG-UI in the AG-UI custom event format.

**Creating custom events:**

Expand Down Expand Up @@ -97,9 +97,9 @@ See [Custom Events documentation](/basics/agents/running-agents#custom-events) f
## Core Components

- `AGUI` (interface): Wraps an Agno `Agent` or `Team` into an AG-UI compatible FastAPI router.
- `AgentOS.serve`: Serves your FastAPI app (including the AGUI router) with Uvicorn.
- `AgentOS.serve`: Serves the FastAPI app (including the AGUI router) with Uvicorn.

`AGUI` mounts protocol-compliant routes on your app.
`AGUI` mounts protocol-compliant routes on the app.

## `AGUI` interface

Expand Down Expand Up @@ -129,9 +129,9 @@ Mounted at the interface's route prefix (root by default):

Refer to `ag-ui-protocol` docs for payload details.

## Serving your AgentOS
## Serving AgentOS

Use `AgentOS.serve` to run your app with Uvicorn.
Use `AgentOS.serve` to run the app with Uvicorn.

### Parameters

Expand Down
67 changes: 67 additions & 0 deletions agent-os/interfaces/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: "Interfaces"
sidebarTitle: "Overview"
description: "Expose Agno agents through various communication protocols and platforms"
keywords: [interfaces, a2a, ag-ui, slack, whatsapp, protocols, integration]
---

Interfaces enable exposing Agno agents, teams, and workflows through various communication protocols and platforms. Each interface provides a standardized way to connect Agno agents to external systems, messaging platforms, and frontend applications.

## Available Interfaces

<CardGroup cols={2}>
<Card
title="AG-UI"
icon="desktop"
href="/agent-os/interfaces/ag-ui/introduction"
>
Connect agents to frontend applications using the Agent-User Interaction Protocol
</Card>
<Card
title="Slack"
icon="slack"
href="/agent-os/interfaces/slack/introduction"
>
Deploy agents as Slack applications for team collaboration
</Card>
<Card
title="WhatsApp"
icon="whatsapp"
href="/agent-os/interfaces/whatsapp/introduction"
>
Serve agents via WhatsApp for direct messaging interactions
</Card>
<Card
title="A2A"
icon="code"
href="/agent-os/interfaces/a2a/introduction"
>
Expose agents via the Agent-to-Agent Protocol for inter-agent communication
</Card>
</CardGroup>

## How Interfaces Work

Interfaces are FastAPI routers that mount protocol-specific endpoints on an AgentOS instance. Each interface:

- Wraps Agno agents, teams, or workflows into protocol-compatible endpoints
- Handles authentication and request validation for the target platform
- Manages session tracking and context preservation
- Streams responses back to clients in the appropriate format

## Using Interfaces

Interfaces are added to an AgentOS instance through the `interfaces` parameter:

```python
from agno.os import AgentOS
from agno.os.interfaces.slack import Slack

agent_os = AgentOS(
agents=[my_agent],
interfaces=[Slack(agent=my_agent)],
)
app = agent_os.get_app()
```

Multiple interfaces can be added to a single AgentOS instance, allowing the same agents to be exposed through different protocols simultaneously.
6 changes: 3 additions & 3 deletions agent-os/interfaces/slack/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Use the Slack interface to serve Agents, Teams, or Workflows on Slack. It mounts

Follow the Slack setup guide in the [cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/agent_os/interfaces/slack/README.md).

You will need:
Required configuration:

- `SLACK_TOKEN` (Bot User OAuth Token)
- `SLACK_SIGNING_SECRET` (App Signing Secret)
Expand Down Expand Up @@ -43,7 +43,7 @@ if __name__ == "__main__":
agent_os.serve(app="basic:app", port=8000, reload=True)
```

You can also use the full example at `cookbook/agent_os/interfaces/slack/basic.py`.
A complete example is available at `cookbook/agent_os/interfaces/slack/basic.py`.

## Core Components

Expand Down Expand Up @@ -86,7 +86,7 @@ Mounted under the `/slack` prefix:

## Testing the Integration

1. Run your app locally: `python <my-app>.py` (ensure ngrok is running)
1. Run the app locally: `python <my-app>.py` (ensure ngrok is running)
2. Invite the bot to a channel: `/invite @YourAppName`
3. Mention the bot in a channel: `@YourAppName hello`
4. Open a DM with the bot and send a message
Expand Down
10 changes: 5 additions & 5 deletions agent-os/interfaces/whatsapp/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Whatsapp
description: Host agents as Whatsapp Applications.
title: WhatsApp
description: Host agents as WhatsApp applications
---

Use the WhatsApp interface to serve Agents or Teams via WhatsApp. It mounts webhook routes on a FastAPI app and sends responses back to WhatsApp users and threads.
Expand All @@ -9,7 +9,7 @@ Use the WhatsApp interface to serve Agents or Teams via WhatsApp. It mounts webh

Follow the WhatsApp setup guide in the [Whatsapp Cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/agent_os/interfaces/whatsapp/readme.md).

You will need environment variables:
Required environment variables:

- `WHATSAPP_ACCESS_TOKEN`
- `WHATSAPP_PHONE_NUMBER_ID`
Expand All @@ -19,7 +19,7 @@ You will need environment variables:
<Note>
The user's phone number is automatically used as the `user_id` for runs. This ensures that sessions and memory are appropriately scoped to the user.

The phone number is also used for the `session_id` so a single Whatsapp conversation will be a single session. It is important to take this into account when considering session history.
The phone number is also used for the `session_id`, so a single WhatsApp conversation corresponds to a single session. This should be considered when managing session history.
</Note>

## Example Usage
Expand Down Expand Up @@ -49,7 +49,7 @@ if __name__ == "__main__":
agent_os.serve(app="basic:app", port=8000, reload=True)
```

See more in our [cookbook examples](https://github.com/agno-agi/agno/tree/main/cookbook/agent_os/interfaces/whatsapp/).
Additional examples are available in the [cookbook](https://github.com/agno-agi/agno/tree/main/cookbook/agent_os/interfaces/whatsapp/).

## Core Components

Expand Down
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3365,6 +3365,7 @@
{
"group": "Interfaces",
"pages": [
"agent-os/interfaces/overview",
"agent-os/interfaces/whatsapp/introduction",
"agent-os/interfaces/a2a/introduction",
"agent-os/interfaces/ag-ui/introduction",
Expand Down