> ## 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 Registry Demo

> Demonstrates using Registry with AgentOS for tools, functions, schemas, models, and vector database components.

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

Demonstrates using Registry with AgentOS for tools, functions, schemas,
models, and vector database components.
"""

from agno.db.postgres import PostgresDb
from agno.models.anthropic import Claude
from agno.models.google.gemini import Gemini
from agno.models.openai import OpenAIChat
from agno.os import AgentOS
from agno.registry import Registry
from agno.tools.calculator import CalculatorTools
from agno.tools.parallel import ParallelTools
from agno.tools.youtube import YouTubeTools
from agno.vectordb.pgvector import PgVector
from pydantic import BaseModel

# ---------------------------------------------------------------------------
# Setup
# ---------------------------------------------------------------------------
db = PostgresDb(db_url="postgresql+psycopg://ai:ai@localhost:5532/ai", id="postgres_db")
pgvector = PgVector(
    db_url="postgresql+psycopg://ai:ai@localhost:5532/ai", table_name="custom_table"
)


def custom_function(input: str) -> str:
    return input + "Hello, world!"


class CustomInputSchema(BaseModel):
    input: str
    description: str


class CustomOutputSchema(BaseModel):
    output: str
    description: str


def custom_tool(input: str) -> str:
    return input + "Hello, world!"


# ---------------------------------------------------------------------------
# Create Registry
# ---------------------------------------------------------------------------
registry = Registry(
    name="Agno Registry",
    tools=[ParallelTools(), CalculatorTools(), YouTubeTools(), custom_tool],
    functions=[custom_function],
    schemas=[CustomInputSchema, CustomOutputSchema],
    models=[
        OpenAIChat(id="gpt-5-mini"),
        OpenAIChat(id="gpt-5"),
        Claude(id="claude-sonnet-4-5"),
        Gemini(id="gemini-3.5-flash"),
    ],
    dbs=[db],
    vector_dbs=[pgvector],
)

# ---------------------------------------------------------------------------
# Create AgentOS App
# ---------------------------------------------------------------------------
agent_os = AgentOS(
    id="demo-agent-os",
    registry=registry,
    db=db,
)

app = agent_os.get_app()

# ---------------------------------------------------------------------------
# Run AgentOS App
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent_os.serve(app="demo:app", reload=True)
```

## Run the Example

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U "agno[os]" anthropic google-genai openai parallel-web pgvector psycopg-binary youtube-transcript-api
    ```
  </Step>

  <Step title="Export your API keys">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
      export GOOGLE_API_KEY="your_google_api_key_here"
      export OPENAI_API_KEY="your_openai_api_key_here"
      export PARALLEL_API_KEY="your_parallel_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:ANTHROPIC_API_KEY="your_anthropic_api_key_here"
      $Env:GOOGLE_API_KEY="your_google_api_key_here"
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      $Env:PARALLEL_API_KEY="your_parallel_api_key_here"
      ```
    </CodeGroup>
  </Step>

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

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

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

Full source: [cookbook/93\_components/demo.py](https://github.com/agno-agi/agno/blob/main/cookbook/93_components/demo.py)
