from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
from agno.registry import Registry
from agno.tools.studio import StudioTool
from agno.tools.user_control_flow import UserControlFlowTools
from agno.tools.user_feedback import UserFeedbackTools
db = SqliteDb(id="studio-db", db_file="tmp/studio.db")
registry = Registry(
name="Studio Registry",
models=[OpenAIResponses(id="gpt-5.5")],
dbs=[db],
)
tools = [
StudioTool(
registry=registry,
db=db,
default_model_id="gpt-5.5",
requires_confirmation_tools=["create_agent", "delete_agent"],
),
UserFeedbackTools(),
UserControlFlowTools(),
]
studio_agent = Agent(
id="studio-agent",
name="Studio Agent",
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-tool-hitl",
agents=[studio_agent],
registry=registry,
db=db,
)
app = agent_os.get_app()