From 470fbb43c7af45bd8ab85af150bd2619e20c2bf9 Mon Sep 17 00:00:00 2001 From: Priti Date: Tue, 18 Nov 2025 03:09:54 +0530 Subject: [PATCH] update interfaces --- agent-os/interfaces/a2a/introduction.mdx | 16 ++--- agent-os/interfaces/ag-ui/introduction.mdx | 24 +++---- agent-os/interfaces/overview.mdx | 67 +++++++++++++++++++ agent-os/interfaces/slack/introduction.mdx | 6 +- agent-os/interfaces/whatsapp/introduction.mdx | 10 +-- docs.json | 1 + 6 files changed, 96 insertions(+), 28 deletions(-) create mode 100644 agent-os/interfaces/overview.mdx diff --git a/agent-os/interfaces/a2a/introduction.mdx b/agent-os/interfaces/a2a/introduction.mdx index 810e15be..438c81fa 100644 --- a/agent-os/interfaces/a2a/introduction.mdx +++ b/agent-os/interfaces/a2a/introduction.mdx @@ -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 @@ -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 @@ -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. diff --git a/agent-os/interfaces/ag-ui/introduction.mdx b/agent-os/interfaces/ag-ui/introduction.mdx index 9f31fa0a..2bcb7163 100644 --- a/agent-os/interfaces/ag-ui/introduction.mdx +++ b/agent-os/interfaces/ag-ui/introduction.mdx @@ -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. -**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. ## Example usage @@ -20,7 +20,7 @@ pip install ag-ui-protocol - 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 @@ -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. - + -With Dojo running, open `http://localhost:3000` and select your Agno agent. +With Dojo running, open `http://localhost:3000` and select the Agno agent. -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:** @@ -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 @@ -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 diff --git a/agent-os/interfaces/overview.mdx b/agent-os/interfaces/overview.mdx new file mode 100644 index 00000000..b457881e --- /dev/null +++ b/agent-os/interfaces/overview.mdx @@ -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 + + + + Connect agents to frontend applications using the Agent-User Interaction Protocol + + + Deploy agents as Slack applications for team collaboration + + + Serve agents via WhatsApp for direct messaging interactions + + + Expose agents via the Agent-to-Agent Protocol for inter-agent communication + + + +## 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. diff --git a/agent-os/interfaces/slack/introduction.mdx b/agent-os/interfaces/slack/introduction.mdx index 69b2fc32..83f43e4f 100644 --- a/agent-os/interfaces/slack/introduction.mdx +++ b/agent-os/interfaces/slack/introduction.mdx @@ -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) @@ -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 @@ -86,7 +86,7 @@ Mounted under the `/slack` prefix: ## Testing the Integration -1. Run your app locally: `python .py` (ensure ngrok is running) +1. Run the app locally: `python .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 diff --git a/agent-os/interfaces/whatsapp/introduction.mdx b/agent-os/interfaces/whatsapp/introduction.mdx index 0d420d45..77bd1d22 100644 --- a/agent-os/interfaces/whatsapp/introduction.mdx +++ b/agent-os/interfaces/whatsapp/introduction.mdx @@ -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. @@ -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` @@ -19,7 +19,7 @@ You will need environment variables: 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. ## Example Usage @@ -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 diff --git a/docs.json b/docs.json index d4d79455..aa2e4acb 100644 --- a/docs.json +++ b/docs.json @@ -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",