Station 7 · AI Agents 101
Same ingredients — an LLM, tools, a loop — but there are proven patterns for how an agent thinks. Pick the shape that fits the problem, and the agent gets a lot smarter for free.
What you'll walk away with
Pattern 1
This is the default, and you've already met it. On each turn the agent writes a Thought (what should I do next?) then takes an Action (call a tool), reads the result, and repeats. It's the exact shape of the loop from Station 3.
When to use: almost always — it's the reliable baseline for any agent that needs tools. If you're unsure which pattern to reach for, start here.
# Goal: "How many days until my next dentist appointment?" Thought → "I need to find the appointment date. Check the calendar." Action → get_calendar("dentist") Observe → next dentist visit: Aug 3, 2026 Thought → "Now subtract today's date." Action → days_between("2026-07-15", "2026-08-03") Observe → 19 Answer → "19 days — your dentist appointment is Aug 3."
Pattern 2
Instead of jumping straight to an answer, you ask the model to think out loud, step by step first. Writing the intermediate steps makes the final answer far more accurate on hard, multi-step problems.
When to use: tricky reasoning, word problems, multi-part logic — anywhere a snap answer tends to be wrong. It costs a few extra words of "thinking," and buys a lot of correctness.
Chain of Thought is reasoning inside the model's head — no tools, just careful steps. ReAct is Chain of Thought plus hands: each thought can trigger a real action in the world. Most good agents blend the two.
Pattern 3
RAG stands for Retrieval-Augmented Generation. The agent's signature move is to search a knowledge base first — your company docs, a textbook, a wiki — pull back the most relevant passages, and answer using those instead of relying on memory.
When to use: questions over a specific body of knowledge — a support bot over your help center, a study buddy over one textbook. It keeps answers grounded and cuts down on made-up facts.
Pattern 4
Every tool you give an agent used to be custom wiring. MCP is a shared standard for plugging tools and data into agents — so any agent can use any MCP-compatible tool, without one-off glue code.
Before USB-C, every device had its own charger. MCP is the USB-C port for AI: define your tool once as an MCP server, and any agent that speaks MCP can plug in and use it. One shape, universal fit — no rebuilding the connection for every new app.
Three simple roles make it work:
The agent app you're using (like Claude or an IDE). It's the thing that wants to reach tools and data.
Lives inside the host and speaks the MCP "language," opening a connection to each server.
Exposes one capability — your files, a database, a web search — in the standard MCP shape so any host can use it.
Build a tool once, and it works across every MCP agent. Build an agent once, and it can use every MCP tool.
Pattern 5
For bigger jobs, one straight loop isn't enough. These patterns give the agent a smarter overall shape — a way to plan, branch, check itself, or split the work across a team.
One part writes the plan; another part carries out each step. Separating "decide" from "do" keeps long tasks from wandering off track.
Lay the steps out as a dependency graph (a DAG). Steps that don't depend on each other can run in parallel; each waits only for what it truly needs.
Explore several reasoning branches at once, compare them, and keep the most promising one — like sketching a few solutions before committing.
The agent reviews its own draft, spots mistakes, and revises before handing it over. A built-in second pass.
A single ReAct agent is one capable worker doing everything. A multi-agent system is a team: a manager agent breaks the goal into pieces and hands each to a specialist — a researcher, a coder, a writer — then stitches their work together. More moving parts, but each part is focused and good at one thing.
The pattern isn't the point — the fit is. Simple lookup? Plain ReAct. Grounded answers over your docs? RAG. A sprawling project with independent pieces? A planner handing work to a DAG or a team. You mix and match.
Checkpoint
You're building a homework helper that must answer strictly from one assigned textbook. Which pattern fits best?
When the answer must come from a specific body of knowledge, retrieve-then-answer is the move. RAG pulls the matching passages into context so the reply stays grounded in the real textbook instead of the model's memory. The other patterns solve different problems (branching reasoning, dividing labor) that this task doesn't need.
See it yourself — 5 minutes
For each task below, say out loud which pattern you'd reach for — and why:
Recap. Architectures are reusable shapes for how an agent thinks. ReAct (reason + act) is the default; Chain of Thought reasons step-by-step; RAG retrieves then answers; MCP is USB-C for plugging in tools. For big jobs, reach for planner–executor, DAGs, tree-of-thought, self-critique, or a multi-agent team. Next, you'll put a pattern to work and actually build one.