# 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.

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.

Website: https://thecarbonlayer.com
