Back to directory

Build a Custom Agent Harness, from scratch

A 15-chapter, hands-on Python course that builds a coding agent's harness one primitive at a time, proving each addition against a real local model rather than mocking it.

Build a Custom Agent Harness, from scratch

This is a chapter-by-chapter course for building a coding agent's harness from scratch in Python. Each of its chapters adds one harness primitive, shows a capability failing without it, then shows it working once added, and runs the result against a real model, by default Gemma served locally through LM Studio, with nothing mocked.

Its stated thesis is that the model itself barely changes between agents, while the harness around it, the loop, the instructions, the context, the available tools, what survives a crash, how work is verified, and the UI, is where the engineering and the differences between agents actually live. It targets developers comfortable with Python but new to harness engineering as a discipline, aiming for transferable intuition rather than familiarity with one specific framework.

Setup uses uv to create an environment and install dependencies, and the agent talks to any OpenAI-compatible endpoint, with optional environment variables for reasoning effort, provider order and quantization when routed through a multi-provider router.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.