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.
- [ ] Why Build a Coding Agent? [text] free
- [ ] Project Setup and API Types [text]
The Conversation Loop
Build a chat REPL and learn how stateless API calls become a continuous conversation.
- [ ] Building a Chat REPL [text] free
- [ ] Managing Conversation State [text]
Adding Tools
Define tools, execute them, and watch the agent compose multi-step operations on its own.
- [ ] Your First Tool: read_file [text] free
- [ ] The Tool Execution Loop [text]
- [ ] File Navigation and Editing [text]
Making It Real
Put the complete agent together, add error handling, and explore what comes next.
- [ ] The Complete Agent in Action [text] free
- [ ] Error Handling and Safety [text]
- [ ] Where to Go from Here [text]