Week 1 · Lesson 03
Agent loop
ReAct lite: plan → act → observe → stop. This is cognition — not persistence yet.
Learn
- Tool registry and observation normalizer
- Stop conditions: success, error, max steps, timeout
- Why budgets are part of architecture, not niceties
Build
- In-process loop with two tools:
content_planning,finish(draft) - Hard limits:
MAX_STEPS=8,TIMEOUT_MS=60000 - Print every step to the console
Checkpoint
You can watch the model choose tools. Killing the process mid-run corrupts nothing external (there is no world API yet).
Four notes
- What problem does this layer solve?
- What is allowed to call it?
- What must it never do?
- How do I observe and test it?