Coding agents from first principles

Build The Loop_

Welcome to The Loop. This is a minimal, practical blog about building a coding agent from scratch: the message loop, tools, permissions, memory and evals. At the end you will not only understand most important building blocks of Coding Agent, but you will build one yourself!

Hand-drawn diagram connecting a developer loop and an AI loop around a task.
Hand-drawn anatomy diagram of the agent loop inside a sandbox.

Post 01

The Smallest Coding Agent Loop

At the center of every coding agent is a tiny primitive: send messages, run requested tools, feed the result back, and repeat until the model stops.