HomeCourses › Build an Autonomous Coding Agent

Build an Autonomous Coding Agent

Your own Claude Code: plan, edit, test and commit, built from scratch

1 phase. 6 lessons. 6 labs. Build an advanced CLI coding agent from raw API calls: an AST-based file relevance scorer, a validated planning engine, safe backup-verify-replace file modification, a test-driven fix loop, multi-file rollback, and git integration — then run it on a real task in your own repo.

6 lessons · 6 labs · Advanced · 1 real coding agent

Outcomes you will have by the end

What you will be able to do

AST-Based Code Understanding · Structured Plan Validation · Safe File Modification · Test-Driven Fix Loops · Multi-File Rollback · Git Integration

Every phase, every lesson, every project

The technologies you will use

Anthropic Claude API · tree-sitter · Pydantic · pytest · GitPython

Roles this course prepares you for

Common questions

Do I need to complete Course 01 first?

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.

How much does this cost to run?

Budget for it: a single 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. This is flagged explicitly in Lesson 1, not buried in the fine print.

Is this safe to run on my real projects?

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.

What do I end up with?

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.

Key terms in this course

Agent

Continue your learning path

Agentic AI Engineering

Start the Build an Autonomous Coding Agent course

Create a free account — the opening phases of 24 of 30 courses are free, no credit card. Or see Pro pricing.

All courses · Pricing · About · FAQ · Glossary