From toy agent to practical coding agent

Building Production AI Coding Agents from Scratch

A hands-on course for building CLI coding agents with tool calling, streaming, evals, context management, filesystem access, shell execution, human approval, and OpenAI-compatible provider support.

OpenAI-compatible providers Production safety patterns Inspired by OpenCode and Claude Code
$ agent "add a guarded shell tool"
reading repo context...
tool: list_files src/agent
tool: edit_file src/agent/tools/shell.ts
approval: required before command execution
tests passed. ready for review.
English

TypeScript Edition

Build a TypeScript coding agent with the Vercel AI SDK, Zod schemas, and React + Ink for the terminal UI.

Chapters 1-16
中文

TypeScript 中文版

中文版本保持相同章节结构,并支持在 mdBook 页面中逐页切换语言。

第 1-16 章

What You'll Build

Lineage: This course is inspired by sivakarasala/building-ai-agents, Hendrixer/agents-v2, OpenCode, and Claude Code. This version expands the learning path with production-oriented topics, provider flexibility, clearer instructions, minor fixes, and a refreshed web experience.