Start Here: Chapter Order
This page answers one question: what should you read first, and what comes after it?
The order is not based on paper dates or framework menus. It follows where a travel assistant breaks as it becomes more realistic.
The Route
one API call
-> conversation history
-> structured output
-> tool calling
-> workflow
-> agent loop
-> choose more patterns by failure
-> safety and evaluation
The first six chapters are the main path. Do not force-read every pattern page afterward; jump by the problem you have.
What Each Chapter Owns
| Order | Chapter | Solves | Does not solve |
|---|---|---|---|
| 00 | One API Call | Provider API shapes and why adapters exist | multi-turn chat, tools, agents |
| 01 | Conversation History | Keeping the current session coherent | long-term memory, preference extraction |
| 02 | Structured Output | Turning model output into validated data | factual correctness, live information |
| 03 | Tool Calling | Using Python functions for external facts | deciding how many tools to call |
| 04 | Workflow | Letting code control known steps | dynamic replanning |
| 05 | Agent Loop | Looping when observations change the next step | reliability, long tasks, multi-agent coordination |
Use this table as the editing rule for the site. If a paragraph does not belong to the chapter's job, it should move or disappear.
Why This Order Works
Each chapter grows from the previous failure:
- One API call can answer, but it cannot see earlier turns.
- Conversation history keeps context, but output is still prose.
- Structured output returns JSON, but valid fields can still contain false claims.
- Tool calling provides outside facts, but the program still needs to decide whether to continue.
- Workflow is best for fixed steps, but new observations create branching.
- Agent loop lets the model choose the next step from observations, but adds loop, cost, and safety risks.
That is the chatbot-to-agent boundary: the model did not become magic; the control flow became visible, repeatable, and bounded.
After the First Six
Use Choose a Pattern to jump by symptom:
- Fixed task decomposition: Prompt Chaining, Routing.
- Acting from observations: ReAct.
- Plausible-but-wrong answers: Maker-Checker, Voting, CoVe.
- Research and memory: Retrieval Loop, Agentic RAG, Reflexion, STORM.
- Long tasks and changing plans: Plan & Solve, PER, ReWOO, LLM Compiler, LATS, Self-Discovery.
- Splitting ownership: Manager-Worker, Agents-as-Tools, Group Chat, Handoff, Magentic.
- Production guardrails: Policy, Guardrails, HITL, Eval Harness.
When to Stop
Use the simplest structure that solves the failure.
If steps are fixed, stop at Workflow. If facts are missing, add retrieval or tools first. If the output shape is unstable, structured output may be enough.
Agents are not the goal. Controlled problem-solving is the goal.