CONCEPT · 45 minutes
Learn why rule-based reactive agents break under real-world pressure and how deliberative agents with full context unlock reliable autonomous behavior.
The first "AI" feature I shipped was a support-triage widget inside an internal support dashboard. Tickets came in, the widget scanned each message for keywords, and routed the conversation to a canned response. It worked beautifully — until a customer wrote "my thingy stopped doing the thing it does." Zero keyword matches. The widget returned "Sorry, I can't help with that," and the ticket sat unrouted for hours.
I had built a reactive agent: a system that maps inputs directly to outputs through a fixed rule set, with no capacity to reason about what it does not already know. The rules were a hardcoded model of the world as it existed the day I wrote the code. The world moved on; the rules did not.
Think of a reactive agent like a vending machine. You press B4 and you get a granola bar. But if someone asks for "something healthy and crunchy," the machine has no response — it only understands button codes. A deliberative agent is more like a skilled consultant: you describe what you need in plain language, and they reason about the best answer before responding.
That gap — hardcoded stimulus-response versus full-context reasoning — is the architectural divide every other module in this path builds on.
Path spine: The running example across all five modules is a task-orchestration agent drawn from a real Python orchestration framework. Each module adds one layer. This module lays the foundation.
A reactive agent produces an output the moment it sees an input. There is no memory, no reasoning, no model — just a lookup table expressed as code.
This function was the entire triage brain of that support dashboard. When ticket volume was low and messages were predictable, it held up. Under real load, three failure modes surfaced:
else branch every time.Reactive agents are appropriate for deterministic, enumerable inputs — mapping HTTP status codes to messages, for instance. They fail the moment the input space is open-ended.
Common pitfall: Wrapping a reactive agent in a modern UI does not make it intelligent. If the decision logic is still a series of keyword checks, you have a vending machine with a nicer front panel — and the same failure modes.
A deliberative agent maintains the full history of a conversation and asks a language model to reason over that history before responding. The model's context window becomes the agent's working memory — not a keyword index.
When I replaced the reactive triage widget with a deliberative loop, "my thingy stopped doing the thing" produced a sensible response on the first try. The model inferred intent from context rather than matching keywords. More importantly, follow-up messages — "still broken" or "never mind, found it" — landed correctly because the agent remembered what had already been said.
Here is the minimal deliberative version — the canonical first runnable block for this path:
The structural change from the reactive version is small but fundamental:
claude-sonnet-4-6 applies its 200K-token context window to surface the most relevant
response, including for phrasings that were never anticipated when the system was built.What just changed: The agent went from knowing exactly three things (export, login, billing) to being able to handle any message the model can interpret — and to gracefully say "I'm not sure" when it genuinely cannot help.
After shipping the deliberative version, the next challenge was explainability. When a teammate asked "why did it suggest a password reset for that ticket?", there was no audit trail — just a response.
The ReAct pattern (Reason + Act) addresses this by asking the model to write out its reasoning before taking action. Each step has the shape: think about what to do, then do it. When I added explicit reasoning to the support agent, two things improved: debugging became possible (I could read the thought chain), and response quality went up (written reasoning caught errors before the final answer was delivered).
The reasoning chain becomes part of the context passed to the next step. Every subsequent decision the agent makes has visibility into why the previous step chose what it chose — not just what it chose. This is the first taste of the shared-context principle that module 06 formalizes.
Before moving on, consider: what would happen if two separate deliberative agents worked on different halves of the same task — without sharing their conversation histories?
Each instance would make independent assumptions. Their outputs would likely conflict or duplicate work. This is the multi-agent failure mode that module 06 diagnoses and that the linear architecture in modules 02 through 05 is specifically designed to avoid. Keep that failure mode in mind as the path builds up.
The reactive and deliberative patterns establish the why. The architecture used throughout the rest of this path is a linear agent: a single model instance that receives a task spec, generates a step plan, and executes each step sequentially — with the full prior context visible at every turn.
No parallel agents. No fragmented histories. Each step builds on the one before it.
This is intentionally minimal. Module 02 adds the planning-and-execution loop. Module 03 registers tools the agent can call. Module 04 inserts human checkpoints. Module 05 assembles the full capstone. Every expansion is earned by the prose that introduces it.
Architectural payoff: By the time you reach module 06, you will have a working single-agent linear system. Module 06's argument — that adding more agents rarely improves it — lands harder because you will have built the alternative yourself.
Application-level questions — predict behavior, spot failures, choose the right pattern.
1. A user sends the message 'my account thing is totally broken.' to the reactive support agent shown in this module. What does the agent return?
Correct Answer: B
None of the keywords ('export', 'login', 'billing') appear in the message, so the else branch fires. The reactive agent has no mechanism to infer intent from unfamiliar phrasing.
2. A user first asks about an export problem, then sends a follow-up: 'still broken after trying that.' How does the deliberative agent differ from the reactive agent in handling the follow-up?
Correct Answer: B
The deliberative agent appends every turn to conversation_history, so the model sees the original question and first response before generating a reply to the follow-up. The reactive agent has no memory at all.
3. After calling client.messages.create() with the Anthropic SDK, what does response.content[0].text hold?
Correct Answer: C
response.content is a list of content blocks. For a standard text response, content[0] is a TextBlock and its .text attribute holds the model-generated string.
4. What is the primary benefit of the ReAct pattern over a plain deliberative agent?
Correct Answer: B
ReAct asks the model to write out its thinking before giving the final answer. That written chain becomes part of the context (and the audit trail) for the next step.
5. Your company launches a new product category. Which agent type requires a code change before it can answer questions about it?
Correct Answer: B
The reactive agent's knowledge is encoded in its if/elif chain. Every new product category requires a developer to add new rules. The deliberative agent relies on the model's general reasoning, so it can handle new topics without code changes (though you may update the system prompt for context).
6. What failure mode occurs when two deliberative agents tackle different halves of the same task without sharing conversation history?
Correct Answer: B
Without shared history, each agent builds its own model of what the task requires. Their outputs can reflect conflicting assumptions — for example, one may choose a CSV format while the other chooses JSON — producing incompatible results.
7. In the linear agent foundation shown in this module, why does each step receive the full prior context rather than just the latest result?
Correct Answer: B
Passing the full context means each step sees all prior reasoning and outputs. This prevents the conflicting-assumptions failure mode: step 2 knows what step 1 decided, and builds on it rather than contradicting it.
8. Which of the following is a case where a reactive agent IS the right choice?
Correct Answer: B
HTTP status codes are a fully enumerated, deterministic input space. A simple lookup table (reactive) is the right tool. The other cases involve open-ended or context-dependent inputs where a reactive agent would fail on unanticipated inputs.