Architectural Layers
Five orthogonal concerns that compose into a complete agent
L1 Tools & Execution
What the agent CAN do. The foundation: tools give the model capabilities to interact with the world.
The Agent Loop
One Loop Is All You Need
The smallest useful agent is a loop that calls the model, runs tools, and feeds results back.
Tool Use
Add a Tool, Add Just One Line
The loop stays stable while capabilities register into a dispatch table.
Permission
Check Permissions Before Execution
Dangerous actions need a harness decision point before the shell runs.
Hooks
Hang on the Loop, Don't Write into It
Cross-cutting behavior belongs around the loop, not tangled inside it.
L2 Planning & Control
How work is organized. From simple todo lists to dependency-aware task boards shared across agents.
TodoWrite
An Agent Without a Plan Drifts Off Course
Explicit plans keep long-running work visible and correctable.
Subagent
Break Large Tasks into Small Ones with Clean Context
Subagents give each subtask a clean message history while preserving the main thread.
Skill Loading
Load Only When Needed
Inject specialized knowledge only when the task actually needs it.
System Prompt
Assembled at Runtime, Never Hardcoded
The system prompt is a generated product of policy, tools, skills, and context.
Error Recovery
Errors Are the Start of a Retry
A robust harness classifies failures and decides what kind of retry is worthwhile.
L3 Memory Management
Keeping context within limits. Compression strategies that let agents work infinitely without losing coherence.
L4 Concurrency & Scheduling
Non-blocking execution. Background threads and notification buses for parallel work.
L5 Multi-Agent Platform
Multi-agent coordination. Teams, messaging, and autonomous teammates that think for themselves.
Task System
Break Big Goals into Small Tasks
A task graph turns vague goals into ordered, observable work.
Agent Teams
One Agent Isn't Enough, Form a Team
Persistent teammates let work continue in parallel without stuffing every thought into one context.
Team Protocols
Teammates Need Agreements
Multi-agent systems need explicit message contracts, not vibes.
Autonomous Agents
Check the Board, Claim the Task
Teammates become useful when they can discover and claim work themselves.
Worktree Isolation
Separate Directories, No Conflicts
Parallel agents need isolated filesystems as much as isolated conversations.
MCP Tools
External Tools, Standard Protocol
External services can become agent tools through a standard discovery and call protocol.
Comprehensive Agent
All Mechanisms, One Loop
The final harness is still one loop, now surrounded by the systems that make it production-shaped.