Agentic Systems
Agent loops, ReAct, tool use and MCP, multi-agent orchestration, planning, recovery, HITL and durable execution.
- lessons
- 15
- steps
- 135
- time
- 187 min
Agent Fundamentals
What turns a language model into an agent: a reasoning model in a loop with tools, memory and feedback from the world.
- The agent formula: reasoning model + tools + memory + environment feedback
- The five-stage agent lifecycle
- When to use fast System 1 vs slow System 2 thinking — and why effort must be pinned
- The agency ladder from scripted chains (L0) to ambient agents (L4)
Reasoning Loops: ReAct and Beyond
The control flow of an agent — from ReAct's thought-action-observation cycle to Reflexion, Plan-and-Solve, graphs and tunable thinking effort.
- Reasoning frameworks: chain-of-thought, self-consistency and Tree of Thoughts
- How ReAct interleaves thought, action and observation
- Why naive ReAct loops repeat failures, and how negative constraints help
- Reflexion's critic, Plan-and-Solve's re-planner, and when to pick each
Tool Use, MCP and A2A
How a model calls tools, how MCP packages those tools once for every agent, how the 2026 stateless rewrite scales them, and how A2A lets agents delegate to each other.
- The three-step tool-use cycle
- Chaining tools, and how Toolformer taught itself to call them
- MCP's client/server split and what servers expose
- What the stateless 2026-07-28 revision changed (MRTR)
Multi-Agent Orchestration
Supervisors, swarms, pipelines and debate — when splitting work across agents pays, and the state and cost traps that come with it.
- Why one agent with 50 tools struggles — and what splitting buys
- The supervisor pattern, and when its tier split stops paying
- Swarm handoffs, swarm intelligence and pipelines: who owns the control flow
- Keeping shared state consistent between agents
Agent Memory and State
The four memory tiers an agent uses, where each fact belongs, when to curate it — and how memory poisons, rots or even hurts reasoning.
- The L1–L4 hierarchy: working, episodic, semantic, procedural
- Keeping working memory lean by offloading large tool results
- Choosing a tier by who pays the cost of being wrong
- When an episode graduates, and write- vs sleep- vs read-time curation
Planning and Decomposition
Turning a goal into a plan an agent can follow: clarify first, choose static or dynamic planning, decompose recursively within limits, and pay for revision.
- Why decomposing the wrong goal is the costliest planning error
- Making requirement elicitation an explicit plan step
- Static vs dynamic planning and checkpointed progress
- Recursive decomposition with depth limits and fan-out caps
Error Handling and Recovery
Agents fail in non-deterministic ways. Turn errors into observations, break loops, roll back to safe state, kill runaway runs out-of-band, and degrade gracefully.
- The six ways agent steps fail
- Error injection: errors become observations the model can reason about
- Counter-based loop guards and checkpoint rollbacks
- Out-of-band kill switches and a detection-to-containment SLO
Human-in-the-Loop Patterns
Put people where they add judgment: breakpoints on consequential actions, policy gates for the rest, approvals bound to what actually runs, and escalation driven by calibrated scores.
- The four HITL patterns, from human-in-command to on-the-loop
- Breakpoints that gate each consequential action, not the whole turn
- Policy-gated autonomy: run, deny or pause
- Approval laundering and binding approvals to the executed action
Agentic Security and Sandboxing
Agents don't just leak text, they take actions. Contain them with disposable sandboxes, minimum agency, default-deny egress, trajectory-aware monitors and a kill path they can't reach.
- What a prompt injection can do once the model has tools
- Disposable microVM sandboxes and minimum agency
- Why per-call monitors and skill scanners miss attacks
- Default-deny egress and destination policy
Evaluating Agentic Systems
Score the whole trajectory, not just the answer: efficiency, task and action success, state-based checks, judges — and an eval harness hardened against agents that cheat.
- Why the trajectory, not the response, is the unit of agent eval
- Trajectory efficiency, TSR, ASR and cost per task
- LLM judges vs decision-model judges
- Reading benchmark numbers without falling for reporting traps
Durable Execution
Keep long-running agents alive through crashes and deploys: journal every step, replay deterministically, make side effects exactly-once, and pause for days without burning compute.
- Why retries and state checkpoints can double a side effect
- Event history + deterministic replay, and where nondeterminism must live
- Exactly-once activities with idempotency keys
- Durable timers and signals for human approval across restarts
Loop Engineering
Design the loops around the agent: harness-enforced termination and budgets, stacked verification and improvement loops, context hygiene, and the anti-patterns that burn money.
- The two invariants: harness-enforced termination and a separate verifier
- The four stacked loop levels
- Stop conditions and budgets enforced outside the agent
- Fighting context rot, and treating summaries as a trust boundary
Agent Architectures
What happens between perceiving and acting: reflex, reactive, deliberative, utility-based and hybrid agents, and how to pick one.
- Why the architecture is the part between perception and action
- Reflex vs reactive agents: rules, state and events
- Deliberative agents and goal-directed planning from current state to goal state
- Choosing actions by expected utility
Self-Reflective Agents
Agents that check their own work, fix their mistakes, switch strategies and get better over time, and the external checks that keep this honest.
- The act → evaluate → reflect → adapt loop
- What a self-evaluation checks, and why it needs an outside signal
- Error correction: detect, find the cause, fix, record
- Strategy adaptation and meta-learning: choosing how to work and how to learn
Real-World Agents: AutoGPT to Agentic RAG
Six well-known agent systems, each a different recipe from the same ingredients: autonomous loops, task queues, coding agents, graphs, role-playing crews and retrieval that reasons.
- Which pattern each well-known agent system demonstrates
- Autonomous loops: AutoGPT's self-prompting and BabyAGI's task list
- How a coding agent plans, writes, tests and debugs
- Structuring agents as graphs (LangGraph) or role-playing crews (CrewAI)
Guide chapters · Agentic Systems
- Agent Fundamentals5 min
- Reasoning Loops: ReAct and Beyond3 min
- Tool Use and MCP46 min
- Multi-Agent Orchestration10 min
- Agent Memory and State26 min
- Planning and Decomposition5 min
- Error Handling and Recovery5 min
- Human-in-the-Loop Patterns12 min
- Agentic Security and Sandboxing23 min
- Evaluating Agentic Systems10 min
- Durable Execution for Long-Running Agents13 min
- Loop Engineering22 min