Home › Courses › Build an Autonomous Coding Agent
Your own Claude Code: plan, edit, test and commit, built from scratch
Build a small version of Claude Code in Python. Over six lessons it learns to read a codebase, plan a change, edit files safely, coordinate edits across several files and undo them if something fails, run the tests, and commit the result with a summary.
6 lessons · 6 labs · 1 working coding agent
Anthropic Claude API · tree-sitter · Pydantic · pytest · GitPython
Strongly recommended. This course assumes you already understand the basic tool-use/agent-loop pattern from Build Your First AI Agent from Scratch and moves quickly into codebase-specific complexity on top of it.
Budget for it: one realistic task through the finished agent typically costs 50k-200k tokens, roughly $0.50-$2.00 at Sonnet pricing, and you'll run it more than once while debugging. Lesson 1 says so up front.
The course is built specifically around the safety patterns that make this reasonable: backups before every write, full rollback on any failure, and plan validation before execution. Still, start on a repo you have backed up elsewhere or that's under version control with a clean working tree.
A real CLI tool, `code_agent.py "<task>"`, that reads your repo, plans a change, safely edits the relevant files, runs your real tests, iterates on failures up to 3 times, and commits with a generated message and a verifiable summary of what changed.
Create a free account — the opening phases of 29 of 35 courses, and the first lesson of every phase, are free, no credit card. Or see Pro pricing.
All courses · Pricing · About · FAQ · Glossary · Projects by topic