Week 1 of 10

The Internals of Coding Agents

Core ≈ 3 h 20 min6 videos4 criteria

Focuswhat an LLM actually is and what the agent loop looks like under the hood; the core tool set (read, write, edit, bash) and how tasks flow through it; how production coding agents structure their system prompts and tool definitions.

You buildA 300–500 line terminal agent with four tools and full logging

Core material≈ 3 h 20 min

  1. 1
    Video59 min
    Intro to Large Language Models
    Andrej Karpathy

    The best compact conceptual foundation. If you have the time, watch his longer Deep Dive into LLMs like ChatGPT (3 h 31 min) instead for a fuller foundation.

  2. 2
    Article + code≈ 60 min with the code
    How to Build an Agent
    Thorsten Ball

    A small, legible coding agent with the essential tool loop. Use it as the model for this week's build.

  3. 3
    Article25 min
    Building Effective AI Agents
    Anthropic

    The canonical text on workflows versus agents and the augmented-LLM loop. Barry Zhang's talk below is the video form.

  4. 4
    Engineering article20 min
    Unrolling the Codex agent loop
    OpenAI

    A production-oriented explanation of the loop and its design tradeoffs.

  5. 5
    Talk15 min
    How We Build Effective Agents
    Barry Zhang of Anthropic

    The minimal loop, tool use, risk, verification, and debugging from inside an agent's limited context.

Production prompts and tool definitions

Read real system prompts, not summaries of them. These are public and readable:

  • Linkfiles named `gpt_5_2_prompt.md`, `gpt_5_codex_prompt.md`, and similar
    codex-rs/core
    OpenAI Codex CLI is open source. Read the model prompts in

    And the compaction prompt under codex-rs/prompts/templates/compact/.

  • Link
    Gemini CLI
    Google's

    Keeps its system prompt in packages/core/src/core/prompts.ts and its MCP prompts in packages/core/src/prompts/.

  • Link
    opencode

    Is a third open-source coding agent whose prompts and tool schemas you can diff against the two above.

  • Video1 h 06 min
    How Claude Code Works

    An independent workshop on prompt-driven architecture, tool calls, subagents, permissions, and evaluations. The best public walkthrough of a production agent's prompt and tool design.

Optional foundation

Deeper material

Additional video track

Build

Build a terminal coding agent in roughly 300–500 lines. Give it four tools: list files, read a file, edit a file, and run a shell command. Log every model response, tool call, result, token count, and stop condition. Test it on three tiny repository tasks and manually classify every failure as model, context, tool, or control-loop failure.

Then read one production system prompt (Codex or Gemini CLI) end to end and annotate it: which lines set persona, which set safety boundaries, which shape tool selection, which handle stopping. Compare it with your own prompt.

Done when

0/4