Back to directory

Dive into Pi

A Chinese-language course that has the reader build a Pi-style coding agent from scratch across 15 runnable checkpoints, each pairing course text with a real commit, a focused test and a failure experiment.

Visit website (opens in a new tab)build-your-own-pi-cn.enochzhang.chatgpt.site
Dive into Pi

This project is a Chinese-language hands-on course that builds a Pi-style coding agent from an offline execution trace across 15 runnable checkpoints. Each chapter combines course text, a real commit, a focused test and a failure experiment, so the course code is a runnable, checkable Git history rather than pseudocode.

The checkpoints progress from a TypeScript message and model protocol through streaming model calls, a provider API, tool calling and an agent loop, to session-tree history, context compaction, extension points such as trusted hooks and templates, and a final independent evaluation harness for the completed agent. Readers can follow along on the accompanying website or clone the repository and run it locally with Node.js.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.