> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-service-account.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AgentOS Demo

> Run Slack, Telegram, WhatsApp, AG-UI, and A2A interfaces together in a single AgentOS.

```python all_interfaces.py theme={null}
"""
AgentOS Demo

Prerequisites:
uv pip install -U fastapi uvicorn sqlalchemy pgvector psycopg openai ddgs
"""

from agno import __version__ as agno_version
from agno.agent import Agent
from agno.db.postgres import PostgresDb
from agno.knowledge.knowledge import Knowledge
from agno.models.openai import OpenAIChat
from agno.os import AgentOS
from agno.os.interfaces.a2a import A2A
from agno.os.interfaces.agui import AGUI
from agno.os.interfaces.slack import Slack
from agno.os.interfaces.telegram import Telegram
from agno.os.interfaces.whatsapp import Whatsapp
from agno.registry import Registry
from agno.team import Team
from agno.tools.mcp import MCPTools
from agno.vectordb.pgvector import PgVector
from agno.workflow import Workflow
from agno.workflow.step import Step

# ---------------------------------------------------------------------------
# Create Example
# ---------------------------------------------------------------------------

# Database connection
db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"

# Create Postgres-backed memory store
db = PostgresDb(db_url=db_url)

# Create Postgres-backed vector store
vector_db = PgVector(
    db_url=db_url,
    table_name="agno_docs",
)
knowledge = Knowledge(
    name="Agno Docs",
    contents_db=db,
    vector_db=vector_db,
)

registry = Registry(
    name="Agno Registry",
    tools=[MCPTools(transport="streamable-http", url="https://docs.agno.com/mcp")],
    models=[
        OpenAIChat(id="gpt-5"),
    ],
    dbs=[db],
)

# Create an agent
simple_agent = Agent(
    name="Simple Agent",
    role="Simple agent",
    id="simple-agent",
    model=OpenAIChat(id="gpt-5.2"),
    instructions=["You are a simple agent"],
    knowledge=knowledge,
)

# Create a team
simple_team = Team(
    name="Simple Team",
    description="A team of agents",
    members=[simple_agent],
    model=OpenAIChat(id="gpt-5.2"),
    id="simple-team",
    instructions=[
        "You are the team lead.",
    ],
    db=db,
    markdown=True,
)

# Create a workflow
simple_workflow = Workflow(
    name="Simple Workflow",
    description="A simple workflow",
    steps=[
        Step(agent=simple_team),
    ],
)

# Create an interface
slack_interface = Slack(agent=simple_team)
telegram_interface = Telegram(agent=simple_agent)
whatsapp_interface = Whatsapp(agent=simple_agent)
agui_interface = AGUI(agent=simple_agent)
a2a_interface = A2A(agents=[simple_agent])


# Create the AgentOS
agent_os = AgentOS(
    id="agentos-demo",
    name="Agno API Reference",
    version=agno_version,
    description="The all-in-one, private, secure agent platform that runs in your cloud.",
    agents=[simple_agent],
    teams=[simple_team],
    workflows=[simple_workflow],
    interfaces=[
        slack_interface,
        telegram_interface,
        whatsapp_interface,
        agui_interface,
        a2a_interface,
    ],
    registry=registry,
    db=db,
)
app = agent_os.get_app()


# ---------------------------------------------------------------------------
# Run Example
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    agent_os.serve(app="all_interfaces:app", port=7777)
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U "agno[a2a,agui,mcp,os,slack,telegram]" openai pgvector psycopg-binary
    ```
  </Step>

  <Step title="Export environment variables">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export OPENAI_API_KEY="your_openai_api_key_here"
      export SLACK_SIGNING_SECRET="your_slack_signing_secret_here"
      export SLACK_TOKEN="your_slack_token_here"
      export TELEGRAM_TOKEN="your_telegram_token_here"
      export WHATSAPP_ACCESS_TOKEN="your_whatsapp_access_token_here"
      export WHATSAPP_APP_SECRET="your_whatsapp_app_secret_here"
      export WHATSAPP_PHONE_NUMBER_ID="your_whatsapp_phone_number_id_here"
      export WHATSAPP_VERIFY_TOKEN="your_whatsapp_verify_token_here"
      ```

      ```bash Windows theme={null}
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      $Env:SLACK_SIGNING_SECRET="your_slack_signing_secret_here"
      $Env:SLACK_TOKEN="your_slack_token_here"
      $Env:TELEGRAM_TOKEN="your_telegram_token_here"
      $Env:WHATSAPP_ACCESS_TOKEN="your_whatsapp_access_token_here"
      $Env:WHATSAPP_APP_SECRET="your_whatsapp_app_secret_here"
      $Env:WHATSAPP_PHONE_NUMBER_ID="your_whatsapp_phone_number_id_here"
      $Env:WHATSAPP_VERIFY_TOKEN="your_whatsapp_verify_token_here"
      ```
    </CodeGroup>
  </Step>

  <Snippet file="run-pgvector-step.mdx" />

  <Step title="Run the example">
    Save the code above as `all_interfaces.py`, then run:

    ```bash theme={null}
    python all_interfaces.py
    ```
  </Step>
</Steps>

Full source: [cookbook/05\_agent\_os/interfaces/all\_interfaces.py](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/interfaces/all_interfaces.py)
