How hardness1020/learn-agent-architecture works
Learn Agent Architecture is a staged educational repository, not a single deployed agent. Its principal workflow is to study the sections in order and run a section demo to observe a harness loop: model calls, tool execution, and repeated observations. The README documents the broader progression through planning, memory, asynchronous work, coordination, interfaces, observability, engineering, and evaluation. Relationships for later capabilities are shown conservatively because their source implementations were not sampled.
Main entry points: loop.py Agent loop · demo.py Runnable demo · tools.py Tool runtime · subagents.py Subagents
Components 24
Core harness
- Runnable demo
sections/23-evaluation/src/demo.py - Agent loop
sections/23-evaluation/src/loop.py - Tool runtime
sections/23-evaluation/src/tools.py - Permissions
sections/23-evaluation/src/permissions.py - Lifecycle hooks
sections/23-evaluation/src/hooks.py
Reasoning and context
- Planning and todos
sections/23-evaluation/src/planning.py - Subagents
sections/23-evaluation/src/subagents.py - On-demand skills
sections/23-evaluation/src/skills.py - Context management
sections/23-evaluation/src/context.py - Persistent memory
sections/23-evaluation/src/memory.py
Long-running work
- Durable tasks
sections/23-evaluation/src/tasks.py - Scheduling
sections/23-evaluation/src/scheduler.py - Background execution
sections/23-evaluation/src/background.py - Worktree isolation
sections/23-evaluation/src/worktree.py - Agent coordination
sections/23-evaluation/src/mailbox.py
Interfaces and resilience
- External protocols
sections/23-evaluation/src/protocols.py - MCP plugins
sections/23-evaluation/src/mcp.py - Error recovery
sections/23-evaluation/src/recovery.py - Observability
sections/23-evaluation/src/telemetry.py
Quality and learning
- Graph engineering
sections/23-evaluation/src/graph.py - Loop verification
sections/23-evaluation/src/verify.py - Evaluation
sections/23-evaluation/src/evaluation.py
Other components
- Learner
- Language model
Connections 22
- Learner → Runnable demo: runs example
- Runnable demo → Agent loop: starts loop
- Agent loop → Language model: requests response
- Agent loop → Tool runtime: dispatches calls
- Agent loop → Permissions: gates actions
- Agent loop → Lifecycle hooks: emits lifecycle
- Agent loop → Planning and todos: supports planning
- Agent loop → Subagents: delegates work
- Agent loop → On-demand skills: loads capabilities
- Agent loop → Context management: manages context
- Agent loop → Persistent memory: uses memory
- Agent loop → Durable tasks: tracks tasks
- Agent loop → Error recovery: recovers failures
- Agent loop → Observability: records activity
- Scheduling → Background execution: schedules work
- Agent coordination → Subagents: coordinates agents
- Worktree isolation → Background execution: isolates execution
- External protocols → Agent loop: connects clients
- MCP plugins → Tool runtime: extends tools
- Graph engineering → Agent loop: structures control
- Loop verification → Agent loop: checks behavior
- Evaluation → Agent loop: evaluates runs