Run Your AgentOS
Run a local AgentOS in 20 lines of code.
Save the following code to agno_assist.py:
1from kern.agent import Agent2from kern.db.sqlite import SqliteDb3from kern.models.anthropic import Claude4from kern.os import AgentOS5from kern.tools.mcp import MCPTools67agno_assist = Agent(8 name="Kern Assist",9 model=Claude(id="claude-sonnet-4-5"),10 db=SqliteDb(db_file="kern.db"),11 tools=[MCPTools(url="https://kern.ndx.rocks/mcp")],12 add_datetime_to_context=True,13 add_history_to_context=True,14 num_history_runs=3,15 markdown=True,16)1718agent_os = AgentOS(agents=[agno_assist])19app = agent_os.get_app()✓
In ~20 lines: an Agent with memory, state and MCP, served as a FastAPI application.
Run Your AgentOS
Set up your virtual environment
1uv venv --python 3.122source .venv/bin/activate1uv venv --python 3.122.venv\Scripts\activateInstall dependencies
1uv pip install -U 'kern-ai[os]' anthropic mcpExport your Anthropic API key
1export ANTHROPIC_API_KEY=sk-***1setx ANTHROPIC_API_KEY sk-***Run your AgentOS
1fastapi dev agno_agent.pyYour AgentOS is now running at http://localhost:8000.
| Endpoint | Description |
|---|---|
http://localhost:8000 | Connect to the control plane |
http://localhost:8000/docs | Interactive API documentation |
http://localhost:8000/config | View AgentOS configuration |