Back to Agno

The 5 Levels of Agentic Software

cookbook/levels_of_agentic_software/README.md

2.6.43.7 KB
Original Source

The 5 Levels of Agentic Software

Build a coding agent from scratch, progressively adding capabilities at each level. Same agent, five architectural stages -- from a stateless tool caller to a production agentic system.

LevelFileWhat It AddsKey Features
1level_1_tools.pyTools + InstructionsCodingTools, stateless execution
2level_2_storage_knowledge.pyKnowledge + StorageChromaDb, SqliteDb, hybrid search, session history
3level_3_memory_learning.pyMemory + LearningLearningMachine, agentic memory, ReasoningTools
4level_4_team.pyMulti-Agent TeamCoder/Reviewer/Tester team with coordination
5level_5_api.pyProduction InfrastructurePostgresDb, PgVector, tracing

Getting Started

1. Clone the repo

bash
git clone https://github.com/agno-agi/agno.git
cd agno

2. Create and activate a virtual environment

bash
uv venv .venvs/levels --python 3.12
source .venvs/levels/bin/activate

3. Install dependencies

bash
uv pip install -r cookbook/levels_of_agentic_software/requirements.txt

4. Set your API key

bash
export OPENAI_API_KEY=your-openai-api-key

5. Run any level

bash
python cookbook/levels_of_agentic_software/level_1_tools.py

Run Each Level

bash
# Level 1: Agent + Tools (no setup needed)
python cookbook/levels_of_agentic_software/level_1_tools.py

# Level 2: Agent + Knowledge + Storage
python cookbook/levels_of_agentic_software/level_2_storage_knowledge.py

# Level 3: Agent + Memory + Learning
python cookbook/levels_of_agentic_software/level_3_memory_learning.py

# Level 4: Multi-Agent Team
python cookbook/levels_of_agentic_software/level_4_team.py

# Level 5: Production API (requires PostgreSQL)
# Start Postgres first:
./cookbook/scripts/run_pgvector.sh
# Then run:
python cookbook/levels_of_agentic_software/level_5_api.py

Run via Agent OS

Agent OS provides a web interface for interacting with your agents. All 5 levels are available in the UI so you can compare the progression interactively. Level 5 is the most complete, with production databases, learning, and tracing.

bash
# Start PostgreSQL (required for Level 5)
./cookbook/scripts/run_pgvector.sh

# Start the server
python cookbook/levels_of_agentic_software/run.py

Then visit os.agno.com and add http://localhost:7777 as an endpoint.

Agent in UIWhat You Get
L1 Coding AgentStateless tool calling -- no setup needed
L2 Coding AgentKnowledge base + session storage (ChromaDb + SQLite)
L3 Coding AgentMemory + learning -- improves over time
L4 Coding TeamMulti-agent team: Coder, Reviewer, Tester
L5 Coding AgentProduction system with PostgreSQL, PgVector, tracing

Start with L5 for the full experience. Try L1-L4 to see how each capability builds on the last.

Swap Models

These examples use OpenAI but Agno is model-agnostic:

python
# OpenAI (default in these examples)
from agno.models.openai import OpenAIResponses
model = OpenAIResponses(id="gpt-5.2")

# Google
from agno.models.google import Gemini
model = Gemini(id="gemini-3-flash-preview")

# Anthropic
from agno.models.anthropic import Claude
model = Claude(id="claude-sonnet-4-5")

When to Use Each Level

ProblemLevel
Task is self-contained, no memory neededLevel 1
Agent needs domain knowledge or conversation historyLevel 2
Agent should improve over timeLevel 3
Task needs multiple specialist perspectivesLevel 4
Agent needs to serve multiple users in productionLevel 5

Start at Level 1. Most teams overbuild. Add complexity only when simplicity fails.