7 tutorials· Ordered reading path
An agent is a model that can call tools, and the code that lets it do so is a loop of about thirty lines. This path builds that loop with no framework, then adds the five things a real deployment needs: a contract the model cannot violate, a retriever that finds the right document, a security model for the untrusted text those documents contain, a wire protocol so the tools come from somewhere other than your own codebase, and the arithmetic that decides whether a second agent is worth its calls.
Every tutorial runs against a deterministic stand-in model rather than a live API, so the numbers reproduce exactly, nothing costs anything, and no API key is required. Read them in order: each one attacks or extends the agent built in the one before it.
Build a ReAct agent from scratch in Python. The reason-act-observe loop in 31 lines, its three failure modes, and what the scratchpad costs you per step.
Three ways to get valid JSON from an LLM, measured on the same 16 prompts: retry until it parses, repair the string, or mask the logits with a grammar.
Build HNSW Python vector search, compare it with hnswlib and exact search, and measure recall against distance computations on held-out words.
BM25 vs embeddings on 300 labelled queries. Build both in NumPy, measure where each one fails, and merge them with reciprocal rank fusion.
A worked prompt injection example: eight attacks on a tool-using agent in Python, six defences measured, and the one that closes the hole.
Build an MCP server in Python with the standard library alone: JSON-RPC over stdio, six methods, and a session the official SDK client accepts unchanged.
Multi-agent orchestration in Python, measured: sequential, supervisor, fan-out and debate over one job, with token spend, wall-clock and accuracy for each.
Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.
Common questions about this topic