Back to directory

Agent Design Patterns

A reference implementation and bilingual documentation of 27 core agent-architecture patterns, each placed on a two-axis map of cognitive function against execution topology, as a companion to the book Designing AI Agents.

Agent Design Patterns

Agent Design Patterns organizes agent-architecture patterns onto a coordinate system rather than a flat list, on the premise that a pattern only helps once you know where in an agent's design a given problem actually sits. The two axes, cognitive function and execution topology, come from an accompanying paper, and each of the 27 core patterns and its extensions ships with runnable Python code and engineering examples drawn from Claude Code, Aider, OpenHands and DeerFlow.

The repository holds both the reference code and editable documentation for the patterns in English and Chinese, with published articles linking back to the exact source commit they describe. It is the standalone pattern catalog; a separate companion repository grows one evolving codebase chapter by chapter to follow the book's narrative.

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.