demo-os
AGENTS.md35 starsChanged 6 months agoApache-2.0View on GitHub
This file provides context for Codex when working with this repository. AgentOS - A multi-agent demo system built by Agno showcasing Agno framework features (6 agents, 4 teams, 6 workflows, 3 multi-framework agents). All agents share: - PostgreSQL database (pgvector) for persistence - OpenAI GPT-5.4 model (configured in app/settings.py) - Chat history and context management
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 71
Use the venv setup script to create the development environment:
- Distinctive: line 80
Always run format and lint checks using the venv Python interpreter:
- Distinctive: line 91
All Agent, Team, and Workflow constructors follow a strict parameter ordering convention.
- Distinctive: line 92
When adding or editing constructors, always follow the group order below.
- Very specific: line 176
All agent, team, and workflow files use # --- section headers to separate logical blocks.
- Distinctive: line 201
All standalone agents follow this structure:
- Very specific: line 256
Use get_postgres_db() from db module
- Very specific: line 301
Create agents/new_agent/ directory following the agent pattern above (with agent.py, instructions.py, __init__.py)
- Very specific: line 311
Add quick prompts to app/config.yaml using the agent's id
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file provides context for Codex when working with this repository.
Project Overview
AgentOS - A multi-agent demo system built by Agno showcasing Agno framework features (6 agents, 4 teams, 6 workflows, 3 multi-framework agents).
Architecture
AgentOS (app/main.py)
├── Agents (7)
│ ├── Agno Expert (agents/mcp/) # Agno documentation agent via MCP
│ ├── Voyager (agents/travel/) # Travel booking — HITL + guardrails
│ ├── Operator (agents/infra/) # Approvals + Skills + structured output
│ ├── Builder (agents/builder/) # Builds you an assistant from a conversation (StudioTool + HITL)
│ ├── Researcher (agents/reporter/) # Structured output + file generation
│ ├── Media Lab (agents/studio/) # Multimodal media (DALL-E, TTS, FAL, Luma)
│ └── Planner (agents/taskboard/) # Session state + agentic state
├── Teams (4)
│ ├── Dash (agents/dash/) # Data analyst (team, coordinate)
│ ├── Newsroom (teams/research/) # Research team (coordinate mode)
│ ├── Clinic (teams/clinic/) # Patient assistant (context provider + filtered records)
│ └── Mentor (teams/coach/) # Learning coach (LearningMachine: profile, memory, session context, knowledge, decisions; followups)
└── Workflows (6)
├── AI Digest (workflows/ai_research/) # Daily parallel AI research (scheduled)
├── Scribe (workflows/content_pipeline/) # Parallel + loop + condition
├── Code Scout (workflows/repo_walkthrough/) # Code → script → narrated audio
├── Classifier (workflows/classifier/) # Router + condition + multi-source intake
└── Support Bot (workflows/support_bot/) # Step-level HITL troubleshootingAll agents share:
- PostgreSQL database (pgvector) for persistence
- OpenAI GPT-5.4 model (configured in
app/settings.py) - Chat history and context management
Key Files
| File | Purpose |
app/main.py | AgentOS entry point, registers all agents, teams, workflows |
app/config.yaml | Quick prompts for each agent |
app/settings.py | Shared MODEL, agent_db, and environment flags |
app/registry.py | Shared tools, models, and database connections |
agents/mcp/agent.py | Agno Expert - Agno documentation agent via live MCP tools |
agents/travel/agent.py | Voyager - HITL + guardrails (moderation, PII, injection, output) |
agents/infra/agent.py | Operator - infra change agent (blocking approvals + Skills + structured output) |
agents/reporter/agent.py | Researcher - structured output + file generation |
agents/studio/agent.py | Media Lab - multimodal media generation (DALL-E, FAL, ElevenLabs, Luma) |
agents/taskboard/agent.py | Planner - session state + agentic state demo |
agents/builder/agent.py | Builder - builds an assistant from a conversation (StudioTool + HITL) |
agents/dash/team.py | Dash team (Analyst, Engineer) |
teams/research/team.py | Newsroom (coordinate mode) |
teams/clinic/team.py | Clinic — patient assistant (context provider + filtered records, fallback) |
teams/coach/team.py | Mentor — learning coach (LearningMachine: user profile, memory, session context, learned knowledge, decision log; followups) |
workflows/ai_research/workflow.py | AI Digest (4 parallel researchers → synthesize) |
workflows/content_pipeline/workflow.py | Scribe (router, parallel, loop, HITL) |
workflows/repo_walkthrough/workflow.py | Code Scout (analyze → script → narrate) |
workflows/classifier/workflow.py | Classifier (classify source → route to specialist → deep-dive) |
workflows/support_bot/workflow.py | Support Bot (capture error → step-level HITL env → search docs/web/GitHub) |
db/session.py | get_postgres_db() and create_knowledge() helpers |
db/url.py | Builds database URL from environment |
compose.yaml | Local development with Docker |
Development Setup
Virtual Environment
Use the venv setup script to create the development environment:
./scripts/venv_setup.sh
source .venv/bin/activateFormat & Validation
Always run format and lint checks using the venv Python interpreter:
source .venv/bin/activate && ./scripts/format.sh
source .venv/bin/activate && ./scripts/validate.shConventions
Parameter Ordering
All Agent, Team, and Workflow constructors follow a strict parameter ordering convention. When adding or editing constructors, always follow the group order below. Omit groups that don't apply — but never reorder within or across groups.
Agent parameter order:
# Identity
id, name, role # role for team members only
# Model
model, reasoning, reasoning_min_steps, # reasoning params if applicable
reasoning_max_steps, fallback_models
# Data
db, knowledge, search_knowledge
# Capabilities
tools, skills, # what the agent can do
learning, add_learnings_to_context # how the agent improves
# Instructions
instructions # what to do with all the above
# Hooks
pre_hooks, post_hooks
# Feature-specific (group by feature)
dependencies, add_dependencies_to_context
session_state, enable_agentic_state, add_session_state_to_context
compress_tool_results, compression_manager
# Memory
enable_agentic_memory,
search_past_sessions, num_past_sessions_to_search
# Context
add_datetime_to_context, add_history_to_context,
read_chat_history, num_history_runs
# Output
markdownTeam parameter order:
# Identity
id, name, mode
# Model
model
# Members
members
# Data
db
# Capabilities
tools,
learning, add_learnings_to_context
# Instructions
instructions
# Collaboration
share_member_interactions, show_members_responses
# Memory
enable_agentic_memory,
search_past_sessions, num_past_sessions_to_search
# Context
add_datetime_to_context, add_history_to_context,
read_chat_history, num_history_runs
# Output
markdownWorkflow parameter order: id, name, steps
Section Headers
All agent, team, and workflow files use # --- section headers to separate logical
blocks. Every file must have at least a # Create Agent, # Create Team, or
# Create Workflow header before the main constructor. Files with additional code
get descriptive headers for each block.
Common headers by file type:
| File Type | Headers |
| Simple agent | # Create Agent |
| Agent with setup | # Tools / # Dependencies / # Create Agent |
| Agent with hooks | # Hooks (or descriptive name) / # Create Agent |
| Team with members | # Members / # Create Team |
| Team with setup | # Team Leader Tools / # Instructions / # Members / # Create Team |
| Workflow | # Agents / # Helpers (if any) / # Create Workflow |
Header format (75-char wide):
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------Agent Pattern
All standalone agents follow this structure:
from agno.agent import Agent
from agents.my_agent.instructions import INSTRUCTIONS
from app.settings import MODEL, agent_db
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
my_agent = Agent(
id="my-agent",
name="My Agent",
model=MODEL,
db=agent_db,
tools=[...],
instructions=INSTRUCTIONS,
enable_agentic_memory=True,
add_datetime_to_context=True,
add_history_to_context=True,
read_chat_history=True,
num_history_runs=5,
markdown=True,
)Team Pattern (Dash)
Team-based agents have their own settings.py with specialized knowledge bases and DB engines:
from agno.team import Team, TeamMode
# ---------------------------------------------------------------------------
# Create Team
# ---------------------------------------------------------------------------
team = Team(
id="my-team",
name="My Team",
mode=TeamMode.coordinate,
model=MODEL,
members=[agent1, agent2],
db=agent_db,
tools=[...],
instructions=LEADER_INSTRUCTIONS,
share_member_interactions=True,
enable_agentic_memory=True,
add_datetime_to_context=True,
markdown=True,
)Database
- Use
get_postgres_db()fromdbmodule - Important: The
knowledge_tableparameter is only needed when the database is provided to a Knowledge base as acontents_db.
# Agent WITH a Knowledge base
from db import create_knowledge
knowledge = create_knowledge("My Knowledge", "my_vectors")
# Agent WITHOUT a Knowledge base
agent_db = get_postgres_db()- Knowledge bases use PgVector with
SearchType.hybrid - Embeddings use
text-embedding-3-small
Imports
# Database
from db import db_url, get_postgres_db, create_knowledge
# Agents
from agents.mcp import mcp_agent
from agents.travel import travel
from agents.infra import infra
from agents.reporter import reporter
from agents.studio import studio
from agents.taskboard import taskboard
# Teams
from agents.dash import dash
from teams.research import research_coordinate
from teams.clinic import clinic
# Workflows
from workflows.ai_research import ai_research
from workflows.content_pipeline import content_pipeline
from workflows.repo_walkthrough import repo_walkthrough
from workflows.classifier import classifier
from workflows.support_bot import support_botAdding a New Agent
- Create
agents/new_agent/directory following the agent pattern above (withagent.py,instructions.py,__init__.py) - Register in
app/main.py:from agents.new_agent import new_agent agent_os = AgentOS( agents=[..., new_agent], ... ) - Add quick prompts to
app/config.yamlusing the agent'sid
Commands
# Setup virtual environment
./scripts/venv_setup.sh
source .venv/bin/activate
# Local development with Docker
docker compose up -d --build
# Load knowledge for Dash
python -m agents.dash.scripts.load_knowledge
# Seed the Clinic team data (operational DB + patient records)
python -m teams.clinic.scripts.seed_clinic
python -m teams.clinic.scripts.load_records
# Format & validation (run from activated venv)
./scripts/format.sh
./scripts/validate.sh
# Run evals — smoke tests (fast, no LLM cost)
python -m evals smoke
python -m evals smoke --group agents
python -m evals smoke --group security
python -m evals smoke --group hitl
python -m evals smoke --entity agno-expert
python -m evals smoke --output --compare
# Run evals — reliability (tool call validation, no LLM cost)
python -m evals reliability
python -m evals reliability --entity voyager
# Run evals — Agno evals (AgentAsJudgeEval, AccuracyEval — LLM cost)
python -m evals
python -m evals --category security
python -m evals --category accuracy
python -m evals --category quality
python -m evals --verbose
# Run evals — performance baselines
python -m evals perf --update-baselines
python -m evals perf
# Auto-improvement loop (see docs/EVALS.md for full workflow)
python -m evals improve --entity agno-expert
python -m evals improve --failures
python -m evals improve --entity agno-expert --jsonEnvironment Variables
Required:
OPENAI_API_KEY
Optional (model providers — each enables registry models in Studio):
ANTHROPIC_API_KEY- Claude Opus 4.7, Sonnet 4.6, Haiku 4.5GOOGLE_API_KEY- Gemini 3 Flash, Gemini 2.5 ProGROQ_API_KEY- Llama 3.3 70BDEEPSEEK_API_KEY- DeepSeek Chat, DeepSeek ReasonerXAI_API_KEY- Grok 3MISTRAL_API_KEY- Mistral Large
Optional (tools & integrations):
EXA_API_KEY- Web search for Researcher, AI DigestPARALLEL_API_KEY- Parallel web searchELEVEN_LABS_API_KEY- TTS for Media Lab, Code ScoutFAL_KEY- Image-to-image for Media LabLUMAAI_API_KEY- Video generation for Media Lab (LumaLab)DUFFEL_API_TOKEN- Live flight search for VoyagerRESEND_API_KEY,VOYAGER_FROM_EMAIL- Itinerary email for VoyagerDB_DRIVER- Database driver (default:postgresql+psycopg)PORT- API server port (default:8000)DB_HOST,DB_PORT,DB_USER,DB_PASS,DB_DATABASERUNTIME_ENV- Set todevfor auto-reload,prdfor RBAC authAGENTOS_URL- Scheduler callback URL (default:http://127.0.0.1:8000)SLACK_TOKEN,SLACK_SIGNING_SECRET- Optional Slack interface (seedocs/SLACK_CONNECT.md)
Documentation
docs/EVALS.md- Eval framework: smoke tests, reliability, accuracy, performance, improvement loopdocs/SLACK_CONNECT.md- Slack setup: app manifest, scopes, credentials, SlackTools vs Interface
Deployment
# Build Docker image
./scripts/build_image.sh
# Deploy to Railway (first time)
./scripts/railway_up.sh
# Redeploy to Railway
./scripts/railway_redeploy.sh
# Sync env vars to Railway
./scripts/railway_env.shPorts
- API: 8000
- Database: 5432
Feature Coverage
| Feature | Where |
| RAG / hybrid search | Dash |
| MCP tools | Agno Expert, Dash, AI Digest |
| HITL — confirmation | Voyager, Operator |
| HITL — user input | Voyager, Builder |
| HITL — external execution | Voyager |
| Guardrails (moderation, PII, injection) | Voyager |
| Output guardrails | Voyager |
| Pre/post hooks | Voyager |
| User feedback (ask_user) | Voyager, Builder |
| Approval — blocking | Operator, Builder |
| Skills (LocalSkills, SKILL.md) | Operator |
| Agent composition (StudioTool) | Builder |
| Reasoning tools | Dash |
| Structured output (Pydantic) | Researcher, Operator |
| File generation (CSV/JSON/PDF) | Researcher |
| Learning (LearningMachine) | Dash |
| SQL tools | Dash |
| Coding tools | Code Scout |
| Image generation (DALL-E) | Media Lab |
| Image-to-image (FAL) | Media Lab |
| Text-to-speech (ElevenLabs) | Media Lab, Code Scout |
| Video generation (LumaLab) | Media Lab |
| Sound effects | Media Lab |
| Session state + agentic state | Planner |
| Team — coordinate | Dash, Newsroom |
| Context provider (live DB) | Clinic |
| Knowledge filtering (per-patient) | Clinic |
| Followups (suggested questions) | Mentor |
| Fallback models | Clinic |
| Workflow — parallel | AI Digest, Scribe |
| Workflow — loop | Scribe |
| Scheduling (cron) | AI Digest |
| Parallel execution | AI Digest, Scribe |
| Workflow — router | Classifier |
| Workflow — condition | Classifier |
| Document parsing (Docling) | Classifier |
| Workflow — step-level HITL (user input) | Support Bot |
| Workflow — HITL output review | Support Bot |
| Session state + agentic state | Planner |
| Cross-modal chaining | Code Scout |
Agno Framework Reference
Model Providers
from agno.models.openai import OpenAIResponses
model = OpenAIResponses(id="gpt-5.5")
from agno.models.anthropic import Codex
model = Codex(id="Codex-sonnet-4-5")
from agno.models.google import Gemini
model = Gemini(id="gemini-3-flash-preview")Knowledge & RAG
from agno.knowledge import Knowledge
from agno.knowledge.embedder.openai import OpenAIEmbedder
from agno.vectordb.pgvector import PgVector, SearchType
knowledge = Knowledge(
name="My Knowledge Base",
vector_db=PgVector(
db_url=db_url,
table_name="my_vectors",
search_type=SearchType.hybrid,
embedder=OpenAIEmbedder(id="text-embedding-3-small"),
),
contents_db=get_postgres_db(knowledge_table="my_contents"),
)Documentation Links
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

