Inside one turn: reason, then act
You've seen the loop turn. But what does the agent actually do on a single turn?
The idea inside
Each turn it writes a private thought, picks ONE tool call, then reads the result.
After this lesson
You can explain the ReAct loop: reason → act → observe each turn, and why agents 'think' before each tool call.
Where it leads
One turn works. But an agent's first edit is often wrong, so how does it ever get reliable?
Inside this lesson
That's the real lesson stage, paused. Claim your pass to operate it.
See how AI actually works, end to end.
This lesson is one stop on the full arc. Unlock all of it, and keep it for life.
What you get
- The 34-lesson main path, a finishable route from a word to agents
- Goal tracks for using AI at work and building AI features
- Boss labs that make you apply a whole act, not just recognize it
- Spaced recall that brings each idea back before you forget
- Course memory: every term defined, with links to where it first appears
- A shareable capability card when you finish the main path
- Lifetime access on every device, every future lesson included
Not videos to watch. You predict, operate the machine, then prove it. That is why it stays.
99 interactive lessons and challenges. No videos, no code.
Free launch pass: lifetime access, no card needed
New here? The first lessons are free to try. Start with lesson 0.1
What this lesson shows
Each turn it writes a private thought, picks ONE tool call, then reads the result.
The question it opens with
You've seen the loop turn. But what does the agent actually do on a single turn?
The walkthrough, in the lesson's own words
- Reveal the agent's thought, then pick ONE action. Watch the result flow back.
- Turn reasoning off: it guesses in one shot. Turn it on: it recovers.
- Two ways a turn goes wrong. Toggle each and read the tape.
- Reason → act → observe, every turn. That's the ReAct loop.
- A turn isn't one shot. The agent writes a private plan, takes a single tool call, then reads the observation that comes back, and that observation rewrites the next thought.
- Interleaving reason and act every turn is why the agent narrates a plan before acting, and why it can notice an error and recover instead of confidently barrelling on.
- One simplification to know: ReAct is the 2022 recipe this lesson acts out. Modern models have internalized it, they natively interleave thinking with tool calls, and often batch several actions in one turn instead of exactly one.
- Swap the sheet for code and nothing changes: a failing test plays the mismatched report, and the agent reads the test, reads the file, edits, and re-runs. That trace is what coding agents narrate all day.
- You ask an agent why a report's total looks off. It narrates 'let me open the sheet first', checks one thing, reads what came back, then changes its plan. Why work that way instead of answering in one shot?
- That's the ReAct loop: each turn is reason, then one action, then observe the real result, which rewrites the next thought. Acting on a fresh observation instead of guessing in one shot is exactly what lets it catch an error and recover.
- The mismatch is vague. I shouldn't guess, open the sheet first to see how the total is computed.
- Good, one cheap read, and the next thought is now grounded in facts.
- It acted before it understood. The observation flows back and corrects the plan, that's the loop saving it.
- Mostly not. What apps show you is a narrated summary the model writes for you; the full private scratchpad usually stays hidden.
- Don't guess. Open the sheet to see how the total is computed.
- No thought, one shot, a confident wrong guess. The report is still wrong.
- Toggle a failure mode to see how a turn can break.
- Same action, same failing observation, forever, the plan never updates. A harness caps the turns to break out.
- It wrote the observation itself instead of reading the tool's real output, then 'finished' a job that's still broken.
Key takeaway
You can read an agent's think → act → observe trace, and see why it narrates a plan and recovers from errors.
What you can do after this lesson
You can explain the ReAct loop: reason → act → observe each turn, and why agents 'think' before each tool call.
Check yourself: In the ReAct loop, what happens on each turn?
- Reason (a thought) → act (one tool call) → observe the result(correct)
- It answers immediately in one shot
- It asks the user before every token
- It retrains the model
Each turn is reason (a short thought), act (one tool call), then observe the result, which informs the next thought. That loop is the agent.
Where it leads: One turn works. But an agent's first edit is often wrong, so how does it ever get reliable?
This is the written summary. The lesson itself is interactive: you predict, drag and operate the mechanism above, and the reveal answers you.