AgenticFrameworks

Building a Coding Agent From Scratch

by Decoding AI (Paul Iusztin)

IntermediateCourseFree~4-8 hours self-paced (about 4 if you only read and watch): 8 articles, 6 videos, 1 codebase

Learn harness engineering by building a Claude Code-style coding agent in Python, with sandboxes, subagents, remote runs and evals.

Start LearningAdded Oct 30, 2026 · Updated Oct 30, 2026

Overview

Building a Coding Agent From Scratch is an Apache-2.0 course by Paul Iusztin, author of the LLM Engineer's Handbook and founder of the Decoding AI newsletter, published as lessons between July 22 and October 2026. The GitHub repo had 1.1k stars and 254 forks when checked on October 30, 2026. It has eight lessons (8 articles, 6 videos, 13 to 25 minutes of reading each) that grow one codebase. Lesson 1 sketches the harness architecture. Lesson 2 builds the bare agent loop with 9 tools and 3 swappable LLM providers in a terminal UI. Lesson 3 moves tool execution into Docker or Modal sandboxes. Lesson 4 covers context engineering: memory, skills, LSP diagnostics and auto-compaction. Lesson 5 adds parallel Explore subagents and build, plan and code-reviewer personas. Lesson 6 runs a swarm of headless agents on Modal, triggered by CLI, webhook or cron. Lesson 7 scores the agent on a 19-task benchmark and a regression suite in Opik, and lesson 8 records runs in Kitaru and replays failures as regression tests. The stack is Python with Pydantic AI, prompt_toolkit and Rich for the TUI, Click, and a hand-rolled LSP client using ty. Models come from Gemini's free tier (the default), OpenRouter or open-weight models served with SGLang on Modal. Modal, Opik and Kitaru sponsor the course.

At a Glance

Topic
Agentic
Level
Intermediate
Format
Course
Cost
Free
Duration
~4-8 hours self-paced (about 4 if you only read and watch): 8 articles, 6 videos, 1 codebase
Provider
Decoding AI (Paul Iusztin)
Hands-on
Yes — code/exercises
Certificate
None

What You’ll Learn

  • ✓Design the overall harness architecture of a coding agent, from the tool loop to evaluation
  • ✓Build a bare-bones agent loop with nine tools and three swappable LLM providers behind a terminal UI
  • ✓Run agent tool calls inside local Docker or remote Modal sandboxes instead of a raw shell
  • ✓Apply context engineering with memory, skills, LSP diagnostics and automatic context compaction
  • ✓Split work across parallel Explore subagents and build, plan and code-reviewer personas
  • ✓Deploy headless agents on Modal and trigger them from a CLI, a webhook or a cron schedule
  • ✓Score the agent on a 19-task benchmark and track a regression suite with Opik
  • ✓Record agent runs with Kitaru and replay past failures to verify that fixes hold

Highlights

  • •One codebase grows across all eight lessons, so each concept lands as working code in a real agent
  • •Most of the harness is written by hand rather than pulled from an agent framework, which makes loops, sandboxing and compaction visible
  • •Can run at $0 using Gemini's free tier, OpenRouter free models, Modal's $30 starter credit and self-hosted Kitaru
  • •Evaluation gets two full lessons: a benchmark plus failure replay as regression tests
  • •1.1k GitHub stars and 254 forks as of October 30, 2026, Apache-2.0 licensed with numbered setup guides in running_the_code/

Who It’s For

Best For

  • ✓Developers who use Claude Code or similar tools and want to understand how the harness works
  • ✓AI engineers building internal coding or task agents who need sandboxing and evals patterns
  • ✓Python developers who want a project-sized agent build rather than isolated snippets

Prerequisites

  • •Intermediate Python, as stated in the repo
  • •Beginner-level knowledge of LLMs and agents, such as calling a model API and what tool calling is
  • •An LLM API key (Gemini free tier works) and optionally Docker or a Modal account; no GPU needed

FAQ

What is Building a Coding Agent From Scratch?

Building a Coding Agent From Scratch is a free, open-source course from Paul Iusztin's Decoding AI that teaches harness engineering by building a terminal coding agent in Python. It is for developers with intermediate Python who want to know how tools like Claude Code handle tool loops, sandboxing, context, subagents and evaluation, and then build one themselves.

Is Building a Coding Agent From Scratch free?

Building a Coding Agent From Scratch is free to access.

What level is Building a Coding Agent From Scratch for?

Building a Coding Agent From Scratch is aimed at a intermediate audience. Recommended background: Intermediate Python, as stated in the repo, Beginner-level knowledge of LLMs and agents, such as calling a model API and what tool calling is, An LLM API key (Gemini free tier works) and optionally Docker or a Modal account; no GPU needed.

How long does Building a Coding Agent From Scratch take?

Expect roughly ~4-8 hours self-paced (about 4 if you only read and watch): 8 articles, 6 videos, 1 codebase. Most learners work through it at their own pace.

What will I learn from Building a Coding Agent From Scratch?

You'll learn: Design the overall harness architecture of a coding agent, from the tool loop to evaluation; Build a bare-bones agent loop with nine tools and three swappable LLM providers behind a terminal UI; Run agent tool calls inside local Docker or remote Modal sandboxes instead of a raw shell; Apply context engineering with memory, skills, LSP diagnostics and automatic context compaction; Split work across parallel Explore subagents and build, plan and code-reviewer personas; Deploy headless agents on Modal and trigger them from a CLI, a webhook or a cron schedule; Score the agent on a 19-task benchmark and track a regression suite with Opik; Record agent runs with Kitaru and replay past failures to verify that fixes hold.

Topics

coding agentsharness engineeringcontext engineeringagent evalsPydantic AIModal

Sources

This page was written from 3 sources, 2 on domains other than github.com.

  1. 1.github.com — building a coding agent from scratch coursevendor
  2. 2.decodingai.com — building a coding agent from scratch
  3. 3.decodingai.com — learning harness engineering by building