basic.py
"""
Basic
=====
Demonstrates basic.
"""
from agno.agent.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
from agno.os.interfaces.agui import AGUI
# ---------------------------------------------------------------------------
# Create Example
# ---------------------------------------------------------------------------
chat_agent = Agent(
name="Assistant",
model=OpenAIResponses(id="gpt-5.4"),
db=SqliteDb(db_file="/tmp/agui_basic.db"),
instructions="You are a helpful AI assistant.",
add_datetime_to_context=True,
markdown=True,
)
# Setup your AgentOS app
agent_os = AgentOS(
agents=[chat_agent],
interfaces=[AGUI(agent=chat_agent)],
)
app = agent_os.get_app()
# ---------------------------------------------------------------------------
# Run Example
# ---------------------------------------------------------------------------
if __name__ == "__main__":
"""Run your AgentOS.
You can see the configuration and available apps at:
http://localhost:9001/config
"""
agent_os.serve(app="basic:app", reload=True, port=9001)
Run the Example
1
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
2
Install dependencies
uv pip install -U "agno[agui,os]" openai
3
Export your OpenAI API key
export OPENAI_API_KEY="your_openai_api_key_here"
$Env:OPENAI_API_KEY="your_openai_api_key_here"
4
Run the example
Save the code above as
basic.py, then run:python basic.py