StudioTools

Give an agent tools to create, update, and run Studio components from chat with human-in-the-loop confirmation.

StudioTools gives an agent access to Studio component operations. The agent can create, update, run, and manage components from chat, with human-in-the-loop confirmation.

Example

Run the Example

uv pip install -U "agno[os]" openai anthropic ddgs
export OPENAI_API_KEY="your_openai_api_key"

The Studio agent uses OpenAI. Set ANTHROPIC_API_KEY as well if you create a component that selects the registered Claude model.

Save the code as studio_tool.py and run python studio_tool.py.

studio_tool.py
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.os import AgentOS
from agno.registry import Registry
from agno.tools.calculator import CalculatorTools
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.hackernews import HackerNewsTools
from agno.tools.studio import StudioTools
from agno.tools.user_control_flow import UserControlFlowTools
from agno.tools.user_feedback import UserFeedbackTools

db = SqliteDb(id="studio-hitl-db", db_file="tmp/studio_hitl.db")

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

tools = [
    StudioTools(
        registry=registry,
        db=db,
        default_model_id="gpt-5.5",
        requires_confirmation_tools=["create_agent", "archive_component", "delete_version", "delete_schedule"],
    ),
    UserFeedbackTools(),
    UserControlFlowTools(),
]

studio_agent = Agent(
    id="studio-hitl-agent",
    name="Studio HITL",
    model=OpenAIResponses(id="gpt-5.5"),
    tools=tools,
    db=db,
    instructions=[
        "Create and update Studio components only after you have the required details.",
        "Ask for clarification before making destructive changes.",
        "Return the component id, version, and next action after each Studio change.",
    ],
    markdown=True,
)

agent_os = AgentOS(
    id="studio-hitl-agent-os",
    description="Studio agent with human-in-the-loop composition",
    agents=[studio_agent],
    registry=registry,
    db=db,
)

app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="studio_tool:app", port=7777, reload=True)

requires_confirmation_tools replaces the toolkit's default confirmation list. This example includes creation plus component archival, draft-version deletion, and schedule deletion when that tool is enabled. Published versions are immutable; archive_component archives a component instead of permanently deleting its versions. Selected functions pause before execution. UserFeedbackTools and UserControlFlowTools let the agent pause for structured choices or free-text input before it calls StudioTools.

These screenshots show an earlier UI with delete labels. Current StudioTools exposes archive_component and draft-only delete_version; it has no delete_agent tool.
Chat UI showing Studio tool calls waiting for confirmation before archiving components
A HITL StudioTools run pausing before an archival action
Chat UI showing confirmed Studio tool calls and the final result
The run continues after confirmation
Agents list page showing the remaining agents after the deletion
The agents page after archival

Developer Resources