Tao Zhang

Series

Agent systems from first principles

Twenty-six weeks, one essay a week, built in order. It starts with vocabulary, then hand-writes a runtime, then reads two real ones, then builds the same product on both, then asks what it takes to run in production. 7 of 26 published.

I

Foundations

A reference architecture of your own, and one shared vocabulary. W1–W4

  1. W1 Eight Questions on Agents Aug 27 What each component solves, what state it owns, and what breaks when you remove it.
  2. W2 Skill vs Tool vs MCP vs API Aug 30 One GMV report, built three ways — and a four-layer model for knowing which layer should change.
  3. W3 What an Agent Knows — and Why It Sometimes Seems to Forget Sep 6 It can look like forgetting. Usually, it is something more ordinary: the information was kept in the wrong place — or it was never kept at all.
  4. W4 How a Marketing Agent Knows When to Act—and When to Ask Sep 17 Most confusion in agent architecture begins when one system is asked to decide when work starts, how it proceeds, and when it is safe to act.
II

Runtime mechanics

A minimal agent runtime written by hand. W5–W8

  1. W5 Inside the Agent Loop: One Bad Retry, Two Refunds Sep 27 How an AI suggestion becomes a real-world action—and how permission checks, approval gates, and recovery logic keep a helpful agent from making an expensive mistake.
  2. W6 You Ask a Shopping Agent to Find a Jacket. How Does It Actually Place the Order? Oct 4 How tool calling connects your request to product searches, stock checks, and an authorized purchase.
  3. W7 When Shopping Becomes a Conversation, What Must an AI Remember? Oct 11 Agentic commerce depends on context assembly: giving a shopping agent the right information at the right moment.
  4. W8 Session, state, memory and artifact planned
III

Reference implementation A · OpenClaw

Trace one message through its whole lifecycle. W9–W12

  1. W9 OpenClaw architecture explained planned
  2. W10 Designing an OpenClaw skill registry planned
  3. W11 Building a Telegram-to-agent application planned
  4. W12 How skills, MCP, bots and cron work together planned
IV

Reference implementation B · DeepSeek Harness

Write plugins; swap the loop, the model, the storage. W13–W17

  1. W13 DeepSeek Harness architecture explained planned
  2. W14 Why everything is a plugin planned
  3. W15 Building my first harness plugin planned
  4. W16 Replacing the model, tool and storage plugins planned
  5. W17 Session resume, fork and replay planned
V

Build

One business domain, two runtimes, a digital employee that actually runs. W18–W22

  1. W18 Building an e-commerce agent on OpenClaw planned
  2. W19 Designing scheduled agents planned
  3. W20 Human-in-the-loop approval architecture planned
  4. W21 Building the same agent on DeepSeek Harness planned
  5. W22 OpenClaw vs DeepSeek Harness planned
VI

Production

Reliability, security, observability, evaluation — a reusable playbook. W23–W26

  1. W23 Why agent demos work but production agents fail planned
  2. W24 Agent permissions and security planned
  3. W25 Observability and evaluation for agents planned
  4. W26 Agent system design patterns: a playbook planned

New here? Start here instead — it points at three essays that stand on their own.