AgentHarness 课程

Learning Path

s01 to s12: Progressive Agent Design

Layer Legend

Tools & Execution
Planning & Coordination
Memory Management
Concurrency
Collaboration
01
s01Single-tool agent loop

The Agent LoopBash 就足够了

95 lines of code1 tools

The minimal agent kernel is a while loop + one tool

Learn More
02
s02Tool dispatch map

Tools一个工具一个 Handler

157 lines of code4 tools

The loop stays the same; new tools register into the dispatch map

Learn More
03
s03TodoManager + nag reminder

TodoWrite先规划再执行

179 lines of code5 tools

An agent without a plan drifts; list the steps first, then execute

Learn More
04
s04Subagent spawn with isolated messages[]

Subagents每个子任务干净上下文

188 lines of code5 tools

Subagents use independent messages[], keeping the main conversation clean

Learn More
05
s05SkillLoader + two-layer injection

Skills按需加载

194 lines of code5 tools

Inject knowledge via tool_result when needed, not upfront in the system prompt

Learn More
06
s06micro-compact + auto-compact + archival

Compact三层压缩

214 lines of code5 tools

Context will fill up; three-layer compression strategy enables infinite sessions

Learn More
07
s07TaskManager with file-based state + dependency graph

Tasks任务图 + 依赖

231 lines of code9 tools

A file-based task graph with ordering, parallelism, and dependencies -- the coordination backbone for multi-agent work

Learn More
08
s08BackgroundManager + notification queue

Background Tasks后台线程 + 通知

198 lines of code6 tools

Run slow operations in the background; the agent keeps thinking ahead

Learn More
09
s09TeammateManager + file-based mailbox

Agent Teams队友 + 邮箱

348 lines of code10 tools

When one agent can't finish, delegate to persistent teammates via async mailboxes

Learn More
10
s10request_id correlation for two protocols

Team Protocols共享通信规则

419 lines of code12 tools

One request-response pattern drives all team negotiation

Learn More
11
s11Task board polling + timeout-based self-governance

Autonomous Agents扫描任务板,认领任务

499 lines of code14 tools

Teammates scan the board and claim tasks themselves; no need for the lead to assign each one

Learn More
12
s12Composable worktree lifecycle + event stream over a shared task board

Worktree + Task Isolation按目录隔离

694 lines of code16 tools

Each works in its own directory; tasks manage goals, worktrees manage directories, bound by ID

Learn More

LOC Growth

s01
95
s02
157
s03
179
s04
188
s05
194
s06
214
s07
231
s08
198
s09
348
s10
419
s11
499
s12
694