> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Standalone StudioTools agent (no AgentOS)

> A simple Agent that uses StudioTools to build, edit, version, and run other agents backed by a local SQLite database.

A simple Agent that uses StudioTools to build, edit, version, and run other agents backed by a local SQLite database. No AgentOS server, no REST, just in-process composition.

```python standalone_studio_agent.py theme={null}
"""Standalone StudioTools agent (no AgentOS).

A simple Agent that uses StudioTools to build, edit, version, and run other
agents backed by a local SQLite database. No AgentOS server, no REST, just
in-process composition.

Usage:
    .venvs/demo/bin/python cookbook/05_agent_os/studio_tool/standalone_studio_agent.py
"""

from pathlib import Path

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.anthropic import Claude
from agno.models.openai import OpenAIResponses
from agno.registry import Registry
from agno.tools.calculator import CalculatorTools
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.studio import StudioTools

DB_DIR = Path(__file__).parent / "tmp"
DB_DIR.mkdir(exist_ok=True)

db = SqliteDb(id="standalone-studio-db", db_file=str(DB_DIR / "standalone_studio.db"))

registry = Registry(
    name="Standalone Studio Registry",
    tools=[DuckDuckGoTools(), CalculatorTools()],
    models=[OpenAIResponses(id="gpt-5.5"), Claude(id="claude-sonnet-4-6")],
    dbs=[db],
)

studio_agent = Agent(
    name="Studio",
    model=Claude(id="claude-sonnet-4-5"),
    tools=[
        StudioTools(registry=registry, db=db, default_model_id="gpt-5.5", versions=True)
    ],
    instructions=[
        "You help the user compose agents, teams, and workflows from registry primitives.",
        "Before calling create_*, restate the exact tool names you plan to pass.",
        "Before calling edit_*, call get_agent/get_team/get_workflow first and confirm what changes.",
        "After any edit, remind the user that changes are in a draft until publish_component is called.",
    ],
    db=db,
    markdown=True,
)


if __name__ == "__main__":
    studio_agent.print_response(
        "First, create an agent called 'math-tutor' that uses claude-sonnet-4-6 and the calculator "
        "toolkit with instructions 'Teach math step by step.' "
        "Then edit it to add this to its instructions: 'Explain each intermediate result before moving on.' "
        "Then list_versions for math-tutor so I can see the draft. "
        "Finally, publish_component('math-tutor') to publish the draft."
    )
```

## Run the Example

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno anthropic ddgs openai sqlalchemy
    ```
  </Step>

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

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

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

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

Full source: [cookbook/05\_agent\_os/studio\_tool/standalone\_studio\_agent.py](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/studio_tool/standalone_studio_agent.py)
