Chain-of-Thought (Agent)
Ask someone to multiply two large numbers in their head and they stall; hand them a scrap of paper and they get there. Chain-of-thought is that scrap of paper for a language model — and inside an agent, the reasoning it writes down becomes part of what the agent acts on next.
Thinking as a step in the loop
In a plain prompt, chain-of-thought means the model spells out intermediate steps before answering. In an agent, those steps sit between an observation and the next action — the thought in ReAct’s thought–action–observation cycle. The agent states what it has learned, what remains, and which tool fits the next move, then emits the call. Because the thought is appended to the running context, the next turn reads it as evidence, which is how a multi-step plan holds together across separate model calls without a dedicated planner.
What it costs, and where it misleads
Reasoning in the open has two prices:
- Thoughts are tokens. A thirty-step run can spend more of its window on reasoning than on tool results, leaving compaction to choose which thoughts to drop.
- Stated reasoning is not guaranteed to be the real cause of the action, so a fluent trace is not evidence of a correct one.
Why it matters
Chain-of-thought is the cheapest way to turn a single answer into deliberation: it is what lets an agent notice that a tool returned nothing useful and choose differently instead of repeating itself. It is also the artefact an operator reads in a trace when a run goes wrong, which makes its faithfulness an operational concern rather than a stylistic one.
Chain-of-thought is the practice of having a model write out its intermediate reasoning before committing to an answer or an action. In an agent it occupies the thought slot of the plan–act–observe loop: the model states what it has observed, what remains, and which tool to call next, and that text stays in the context to steer later steps. Without it, the loop reacts turn by turn with no visible deliberation.
Imagine asking a friend to plan your week and they just blurt out an answer. Now imagine they talk it through first: “You’re away Tuesday, so the dentist has to move, and that means…” The talking-through is the useful part.
Chain-of-thought is software doing that out loud. Before taking its next step, the program writes down what it has figured out and what it still needs, in plain sentences. Then it acts on its own notes.
This is why a goal-seeking program can handle tasks with several moving parts instead of guessing in one leap — and why, when something goes wrong, you can read back what it was thinking.