Building Your Own Coding Agent

Build a code-editing agent from scratch in Rust — an LLM, a loop, and three tools in about 400 lines of code.


Getting Started

Set up a Rust project and define the API types for talking to Claude.

The Conversation Loop

Build a chat REPL and learn how stateless API calls become a continuous conversation.

Adding Tools

Define tools, execute them, and watch the agent compose multi-step operations on its own.

Making It Real

Put the complete agent together, add error handling, and explore what comes next.