Pidoku

AI System Design

Designing AI systems in 2026 — the building blocks, AI infrastructure from an empty rack to a platform, agentic systems, and full worked designs with the real tools named.

Start reading
  • 5 levels
  • 6 topics
  • 25 lessons
  • ~20h 35m

Contents

  1. Foundations

    Build the mental model.

    3 lessons · ~2h

    1. How AI Systems DifferA model in the request path changes what "slow", "expensive", "correct" and "trusted" mean. This topic establishes those changes, gives you one method for designing around them, and maps the … 3 lessons · ~2h
      1. ·Overview
      2. 01What a Model ChangesFoundations30 min
      3. 02The Design MethodFoundations45 min
      4. 03The 2026 LandscapeFoundations45 min
  2. Basic

    Understand the core mechanisms.

    6 lessons · ~4h 45m

    1. Building BlocksSix components appear in almost every AI system, whatever its shape. Learn each one once — what it does, what it stores, how it fails — and a full design becomes a matter of arranging them. 6 lessons · ~4h 45m
      1. ·Overview
      2. 01Model Access and GatewaysBasic45 min
      3. 02Context and RetrievalBasic55 min
      4. 03State, Memory and CachingBasic45 min
      5. 04Tools and ProtocolsBasic50 min
      6. 05Evaluation and QualityBasic45 min
      7. 06Reliability PatternsBasic45 min
  3. Intermediate

    Learn the optimization techniques.

    6 lessons · ~4h 50m

    1. AI Infrastructure From ScratchThis topic builds an AI platform from the bottom up: what you need, in what order, starting from an application that calls someone else's API and ending with your own GPU cluster serving … 6 lessons · ~4h 50m
      1. ·Overview
      2. 01The Layers and the Build-or-Buy LadderIntermediate40 min
      3. 02Compute and CapacityIntermediate50 min
      4. 03The ClusterIntermediate50 min
      5. 04The Serving LayerIntermediate55 min
      6. 05The Data LayerIntermediate45 min
      7. 06Platform and OperationsIntermediate50 min
  4. Advanced

    Study systems at production scale.

    7 lessons · ~5h 40m

    1. Designing Agentic SystemsAn agent is a model that chooses its own next step, in a loop, until the job is done. That one change — the model decides the control flow — turns a request into a long-running, stateful, … 5 lessons · ~4h 5m
      1. ·Overview
      2. 01Anatomy of an AgentAdvanced45 min
      3. 02Orchestration and Durable ExecutionAdvanced55 min
      4. 03Context Engineering and MemoryAdvanced50 min
      5. 04Multi-Agent SystemsAdvanced45 min
      6. 05Sandboxes and Tool ExecutionAdvanced50 min
    2. Security by DesignSecurity is the sixth step of the design method, and it is a design step: the controls that matter most in an AI system are architectural — which component can see what, and which can do … 2 lessons · ~1h 35m
      1. ·Overview
      2. 01Trust Boundaries in an AI SystemAdvanced45 min
      3. 02A Secure Reference ArchitectureAdvanced50 min
  5. Expert

    Design platforms and read the frontier.

    3 lessons · ~3h 20m

    1. Worked DesignsEverything so far, assembled. Each lesson is one complete design worked through the six-step method — requirements, numbers, architecture, failure, cost, security — with every box named and … 3 lessons · ~3h 20m
      1. ·Overview
      2. 01AI Infrastructure for an Agentic PlatformExpert1h 30m
      3. 02An Enterprise RAG AssistantExpert1h
      4. 03The Design ReviewExpert50 min

Reference

About

Learn to design systems that have a model in the middle: what to draw on the whiteboard, which numbers to compute before you draw it, which tools fill each box in 2026, and how the design changes when the model stops answering questions and starts taking actions.

Classic system design teaches load balancers, queues, caches and databases. All of that still applies. An AI system adds a component that is slow, expensive, probabilistic, priced by the token and easily talked into things — and the design has to be built around those five facts.

This course starts at “what is different when there is a model in the request path?” and ends with complete designs: the infrastructure for an agentic AI platform, drawn box by box with the real projects named, sized with arithmetic you can rerun, and reviewed for failure and attack.

It assumes you can program in Go and have seen an ordinary web backend. It does not assume you have run a GPU, built a RAG pipeline or written an agent.

What a finished design looks like#

flowchart LR
  U[":i-users: <b>Users and apps</b>"] --> GW[":envoyproxy: <b>AI gateway</b><br/><small>auth, token limits, routing</small>"]
  GW --> AG[":i-bot: <b>Agent runtime</b><br/><small>loop, state, checkpoints</small>"]
  AG --> GW2[":envoyproxy: <b>Model route</b>"]
  GW2 --> API[":anthropic: <b>Hosted models</b><br/><small>frontier APIs</small>"]
  GW2 --> SELF[":vllm: <b>Self-hosted models</b><br/><small>vLLM on GPUs</small>"]
  AG --> MCP[":modelcontextprotocol: <b>Tools over MCP</b><br/><small>search, code, tickets</small>"]
  AG --> SB[":i-box: <b>Sandboxes</b><br/><small>gVisor, microVMs</small>"]
  AG --> MEM[(":postgresql: <b>State and memory</b>")]
  SELF --> K8S[":kubernetes: <b>GPU cluster</b>"]
  AG -.-> OBS[":opentelemetry: <b>Telemetry and evals</b>"]
  class U neutral
  class GW,GW2 queue
  class AG,SELF compute
  class API,MCP io
  class SB warn
  class MEM,K8S memory
  class OBS neutral

Every box in that picture is a lesson. By the end you can defend each arrow.

How this course works#

Every lesson follows the same shape:

  1. The idea in one minute — the whole lesson in a few sentences.
  2. A picture — the mechanism, with the real tools drawn in. Press Expand on any diagram to open it full size.
  3. How it really works — the precise version, with names and numbers.
  4. Code — where arithmetic or a mechanism is worth running, a small Go program that uses only the standard library.
  5. Remember this, Try it and Check yourself.

Designs are always worked in the same order: requirements → numbers → architecture → failure → cost → security. Tools are chosen last. A tool named in a diagram is an example of what fills the box, not an endorsement; the tables say what else fits.

The topics#

flowchart LR
  A["How AI systems differ"] --> B["Building blocks"]
  B --> C["AI infrastructure<br/>from scratch"]
  C --> D["Agentic systems"]
  D --> E["Security by design"]
  E --> F["Worked designs"]
  class A neutral
  class B,C compute
  class D queue
  class E warn
  class F memory
TopicYou will be able toLevel
How AI Systems DifferSay what a model changes in a design, run the design method, and place any 2026 tool on one mapFoundations
Building BlocksDesign the gateway, the context pipeline, state and caches, tool access, evaluation and reliabilityBasic
AI Infrastructure From ScratchGo from “we call an API” to a GPU cluster: compute, cluster, serving, data and platform layersIntermediate
Designing Agentic SystemsDesign the loop, durable execution, context and memory, multi-agent structure and sandboxesAdvanced
Security by DesignDraw trust boundaries on an AI design and place the controls before the buildAdvanced
Worked DesignsProduce and review a complete design: an agentic AI platform, an enterprise RAG assistantExpert

How it connects to the other courses#

This course stays at the level of boxes, arrows and arithmetic. When a box deserves a whole course, it has one:

What you need#

  • Go 1.22 or newer and a terminal. Every program runs offline.
  • No GPU, no cloud account and no API key.

A promise about names and versions#

Protocol versions, project statuses and release dates in this course were checked on 4 October 2026, and the lessons that depend on them list their sources. The field moves monthly. The method — requirements, numbers, architecture, failure, cost, security — does not, and each lesson separates the two so you know which half to re-check.

↑↓ navigate↵ openesc close

drag to pan · scroll to zoom