Agentic AI
How AI agents actually work: tool use, planning and reasoning loops, memory, subagents, evaluation — and the guardrails (permissions, sandboxing, human confirmation) that make acting autonomously trustworthy. Same house style: intuition first, a visualization you can play with, then the math.
Foundations
What an agent actually is: the loop, tools, the context budget — and when not to build one.
- From model to agentA chat model answers; an agent acts. The four parts that turn next-token prediction into a system that can change the world. 9 min · intro
- The agent loopReason, act, observe, repeat — the ReAct pattern, why every framework is a variation on it, and why termination is the hard part. 10 min · intro
- Tools and function callingA tool is a typed function, and its description is the interface the model reads to choose it. Get the schema wrong and the agent fails before it reasons. 11 min · core
- Context is the constraintThe context window is an agent's working memory, and every step re-reads all of it. Loop length — not question length — drives cost, latency, and forgetting. 10 min · core
- Agents vs pipelinesIf you can draw the steps, build the flowchart. The workflow patterns that should be your default — and the narrow case where an open-ended loop earns its keep. 10 min · core
Planning & reasoning
Decomposing a goal, deliberating in the loop, reflecting on mistakes, and searching over candidate plans.
- Planning and decompositionA step-by-step agent is short-sighted. Planning writes the subtasks and their dependencies first — and treats the plan as a hypothesis, not a script. 11 min · core
- Reasoning in the loopChain-of-thought as scratch space, the ReAct 'reason' step, and self-consistency — plus why a visible chain is evidence, not a proof. 11 min · core
- Reflection and self-correctionAttempt, critique, revise — Reflexion and Self-Refine. It works when the critique is grounded, and can quietly make things worse when it isn't. 11 min · core
- Search over thoughtsInstead of one chain, grow a tree of candidate thoughts, score them, and search. Tree of Thoughts, best-of-N, and MCTS-style deliberation — and their cost. 12 min · advanced
- When plans breakWrong decompositions, stale assumptions, and compounding drift. Why long autonomous plans are unreliable, and how checkpoints turn a broken plan into a recoverable one. 10 min · advanced
Memory & context
Working memory, retrieval, long-term memory, and the engineering of what stays in the context window.
- Memory typesWorking, episodic, semantic, procedural — four kinds of memory, and the rule that only what is retrieved back into the context window can influence a decision. 10 min · core
- Retrieval as memoryRAG, repurposed for agents: fetch the relevant slice of an external store into the working context, with citations so the agent can be checked. 11 min · core
- Long-term memoryMemory that outlives the session: writing it, consolidating it, and — the part everyone forgets — letting it decay. MemGPT, memory streams, and why forgetting is a feature. 12 min · advanced
- Context engineeringThe discipline of what goes in the window, in what order, and what gets compacted away — because the context is the agent's entire reality. 11 min · advanced
Multi-agent & orchestration
Splitting work across agents: supervisors, routing and decision layers, handoffs, and the coordination tax.
- Why many agentsSplitting work across agents buys fresh contexts and specialisation — and pays for it in coordination. The topology decides which you get more of. 10 min · core
- Orchestrator and workersA lead decomposes the goal, fans subtasks out to workers with fresh contexts, and merges the results — a latency win, not a cost win. 11 min · core
- Routing and decision layersA fast, typed decision model can gate and route work before any expensive reasoning happens — the System One / System Two split as infrastructure. 10 min · core
- Handoffs and coordinationWhen agents pass control to each other, the coordination tax comes due: quadratic chatter, shared-state hazards, and the failure modes of teams that don't communicate. 12 min · advanced
Evaluation & observability
Testing trajectories, the benchmark landscape, judges and verifiers, and tracing agents in production.
- Evaluating trajectoriesAgents are non-deterministic, so you test paths, not answers. Run the task many times, classify how it fails, and report rates — pass@k and pass^k tell different stories. 11 min · core
- Agent benchmarksSWE-bench, WebArena, GAIA, AgentBench, τ-bench — what each actually measures, what it misses, and why a public benchmark becomes a target. 10 min · core
- Judges and verificationWhen there is no exact answer, use an LLM-as-judge or a debate between models — carefully. A judge is a heuristic, and it inherits the biases of the models it grades. 11 min · advanced
- Observability and tracingEvery run is a trace, every step a span. Tracing turns an incident into a query — and connects behaviour to the bill. 10 min · core
Safety & deployment
Permissions, sandboxing, injection and tool abuse, human confirmation, and shipping an agent you can trust.
- Permissions and least privilegeGranting a tool is granting power. The privilege ladder — read liberally, write narrowly, destructive behind a human — is the agent version of database grants. 11 min · core
- Sandboxing and isolationCode execution is the sharpest tool an agent can hold. The sandbox decides the blast radius: filesystem, network, secrets, and time. 11 min · core
- Prompt injection and tool abuseThe agent reads untrusted text, and a model cannot always tell data from instructions. Why this is architectural, and the defences that actually help. 12 min · advanced
- Deploying agentsBudgets, circuit breakers, tracing, and rollback — the guardrail stack that turns an agent incident into a non-event. Make failure cheap, observable, and reversible. 12 min · advanced