Forward-deployed / Learning zone
Agentic AIa standalone module
Lesson 04

Planning & reasoning

TL;DR

"Cognition" in an agent is not a module you install. It's the model, prompted and orchestrated into patterns. The big four: ReAct (interleave thinking and acting, one step at a time), plan-and-execute (draft the whole plan first, then work it, revising as reality pushes back), reflection (generate, critique your own output, retry), and decomposition (split the goal into subtasks, farm them out, integrate). Modern reasoning models bake much of this in. They "think" before answering, and think longer on harder problems, trading latency and tokens for accuracy (test-time compute). The product craft is matching pattern and thinking budget to the task. Reasoning helps most on verifiable, multi-constraint problems. It's expensive decoration on lookups. And no pattern rescues an agent whose environment gives it no feedback to reason about.

🎯 For the AI PM

Why it matters — Thinking is now a metered feature. The same model can answer in one second or deliberate for two minutes at 50× the tokens, and somebody — you — has to decide what each task deserves. Pattern choice drives the three numbers users feel: quality, latency, and cost.

What it changes in your decisions — Stop asking "is the model smart enough?" and start asking "what's the thinking budget for this task tier, and what checkable feedback does the agent get so its thinking converges instead of spiraling?"

Ask yourself — "When this agent gets the plan wrong at step 2, what tells it — and how much have we spent by the time it finds out?"

Risk if ignored — An agent that burns two minutes and 100k tokens deliberating over a FAQ answer. Or one that executes a flawed plan at full speed, because nothing in the loop ever checked the plan.

The patterns

Planning & reasoning

Three patterns, not a module · cognition is the model, prompted into shape

Reasoning pays off in proportion to how checkable the work is.

ReAct — think, act, observe, repeat
Thought: need Q3 numbers
→
Act: query warehouse
→
Observe: rows returned
→
Thought: compare to Q2…
↻ back to act
Plan-and-execute
Draft full plan (steps 1–6)
→
Execute steps
→
Reality matches plan?
→
No: revise plan · Yes: done
Reflection
Generate draft
→
Critique own draft (or run the tests)
→
Issues found: retry · Passes: deliver

The patterns have a short research lineage worth knowing, because vendors still name frameworks after it. Chain-of-thought (prompt the model to reason step-by-step before answering) came first. Self-consistency improved it by sampling several chains and taking the majority answer. Tree-of-Thoughts generalized it to exploring multiple reasoning branches with backtracking — deliberate search instead of one linear chain. ReAct grafted chain-of-thought onto action: thought → act → observe, taught to the model with a few in-context examples. Reasoning models internalized most of this lineage — you now buy it as "thinking" rather than prompt it by hand — but the names survive in framework docs, and the underlying moves survive in every agent transcript you'll read.

These patterns compose. A serious coding agent plans, executes each step ReAct-style, reflects against tests, and decomposes big work. Frameworks mostly package these patterns with plumbing — evaluate them on the plumbing, because the patterns themselves are a page of prompting.

Test-time compute: thinking as a budget

Reasoning models (o-series, Claude's extended thinking, R1, Gemini thinking) generate internal chains of thought before answering. Accuracy on hard problems climbs with thinking time — a new scaling axis that happens at inference, on your bill, per request. Three product consequences follow:

One boundary keeps you honest: reasoning improves derivation — math, code, constraint-juggling, multi-hop logic. It does not add knowledge the model lacks (that's retrieval), and it doesn't reliably fix hallucination — a model can reason beautifully from a false premise. Diagnose which failure you have before buying thinking tokens.

Feedback beats brilliance

The strongest single lever on agent intelligence isn't the pattern or the budget. It's the quality of the feedback the environment returns. An agent with tests, validators, error messages that teach, and checkable intermediate results converges. An agent acting into a void diverges, no matter how clever. This is why "make the work verifiable" — add a checker tool, define acceptance criteria the agent can run, return errors that explain — routinely beats "make the model think harder" as an investment. When someone proposes upgrading the model, first ask what the agent would see if it were wrong.

Failure modes

Practitioner checklist