Learn · Build · Measure

A coding agent, taken apart one piece at a time

Tiny Agents is me learning how AI agents actually work by building a small coding agent from first principles, across 36 five-minute lessons. The diagram below is the progress tracker: every box is a piece of the architecture, and it stays locked until I’ve worked through the lessons behind it.

5 / 36 lessons written0 in progress0 of 12 components live

The architecture

Click or Tab to a box · Esc clears

Tiny Agents architecture, with learning progressTwelve components of a small coding agent. A request flows from the user into the agent loop, which consults the model and calls tools; tools search code, edit files and run the environment, whose output feeds back into the loop. Each component is a button that lists the lessons covering it, and shows a padlock until those lessons are written.User & task1/3 doneModel2/4 doneAgent loop2/3 doneTool belt3 lessonsCode search2 lessonsEdit & patch1 lessonEnvironment3 lessonsGuardrails3 lessonsContext & memory3 lessonsPatterns8 lessonsTracing1 lessonEvaluation2 lessons
  • User & taskin progress3 lessons

    Where a request enters the system, and what separates an agent from a chatbot or a fixed workflow.

  • Modelin progress4 lessons

    The LLM decides what to do next. It never executes anything itself — it only asks.

  • Agent loopin progress3 lessons

    observe → decide → act → observe → … → stop. The one idea everything else hangs off.

  • Tool beltlocked3 lessons

    The actions the harness is willing to execute, and how their interfaces are designed for a model.

  • Code searchlocked2 lessons

    Finding the few relevant files instead of pushing a whole repository through the context window.

  • Edit & patchlocked1 lesson

    How a model turns an intention into a file change: whole-file, search/replace, diff or structured patch.

  • Environmentlocked3 lessons

    Build, tests and dependencies. The compiler is an oracle: actions here produce objective feedback.

  • Guardrailslocked3 lessons

    Sandboxing, approvals and the points where autonomy should stop and a human or a check takes over.

  • Context & memorylocked3 lessons

    What gets placed in the window each turn — and the several different things "memory" actually means.

  • Patternslocked8 lessons

    Chaining, routing, fan-out, orchestrator–workers, evaluator–optimizer, handoffs. All of Part III.

  • Tracinglocked1 lesson

    You need the whole trajectory — every model call, tool call and output — not just the final answer.

  • Evaluationlocked2 lessons

    Outcome, intermediate actions, efficiency, safety and robustness are separate measurements.

The curriculum

36 lessons · 5 parts

Part II — Take apart a coding agent