Lesson Four · Agentic AI, Explained
How an Agent “Decides” What to Do
Think, act, observe, repeat — the ReAct loop

Lesson 3 gave us the four building blocks: model, tools, memory, instructions. This lesson is about how they actually run together, because that mechanism is the real heart of “agentic AI.” It’s less magical than it sounds, and understanding it will make every agent product you encounter easier to evaluate.
The loop: think, act, observe, repeat
A useful way to picture many agents is as a repeating cycle:
- Decide. The model looks at the goal and everything it knows so far, and decides what the next step should be.
- Act. If that step requires a tool, the agent calls it: a web search, a file read, an API request, or another available action.
- Observe. The result of that action comes back and gets added to what the model can see.
- Repeat. The model looks at the updated picture and decides what to do next, continuing until the goal is met, it reaches a limit, or it hands control back to a person.
Some systems follow this pattern closely; others use upfront planning, fixed workflows, parallel steps, or combinations of these approaches.
One influential research approach for this pattern is ReAct, short for “Reason plus Act.” It was introduced in a 2022 paper and describes reasoning and action as an interleaved process. The core idea is simple: the model can reason, act, observe the result, and use that new information to adjust what it does next, rather than planning everything up front and executing blindly.
Why this loop matters more than the model itself
Two agents built on the exact same underlying model can behave completely differently depending on how their loop is structured. One agent stops and asks a human before doing something risky. Another double-checks its own work before moving on. A third has a hard cap on how many steps it can take before giving up. These are loop-design decisions, not model capability questions.
That’s also where a lot of the real engineering effort goes in production agent systems. Not a smarter model. A more disciplined loop. A 2026 write-up on production agentic stacks argues that a large share of the effort in safety-critical projects, roughly sixty percent by one practitioner’s estimate, goes into the surrounding infrastructure (observability, validation, retries) rather than into tuning the model itself (Nicoomanesh, Medium, 2026). That’s one practitioner’s estimate, not an industry-wide figure, but it points at something real. Loop discipline, not raw model power, is where production agents earn or lose trust.
Where loops go wrong
A few common failure patterns explain a lot of the skepticism you’ll hear about agents:
- Looping forever. An agent gets stuck retrying the same failed action because it never recognizes it’s not making progress. Good agent designs put a hard cap on steps or time.
- Losing the thread. On a long task, earlier context can get pushed out or diluted, and the agent effectively “forgets” its original goal. This is a memory problem, not a reasoning problem.
- Acting on bad information. If a tool returns wrong or manipulated data, the agent’s next decision is only as good as that input. This becomes a genuine security concern once agents pull data from the open internet. Lesson 5 covers it directly, once tools are on the table.
A human-shaped analogy, used carefully
Think about how you’d handle “plan a dinner party.” You don’t write the entire plan in one shot. You pick a date, check who’s free, adjust based on the answer, then think about food, adjust again based on dietary restrictions you learn about along the way. You’re constantly revising based on new information. That back-and-forth, rather than a single upfront plan, is roughly what the think-act-observe loop is doing, just with software instead of phone calls.
The analogy breaks down in an important way. You have judgment born from lived experience, and the agent has none of that. It’s pattern-matching its way through the loop, not genuinely understanding consequences the way you do. Keep that distinction in mind, because it’s exactly why agents still benefit from human checkpoints on anything that matters.
Carry into Lesson 05
The loop is think, act, observe, repeat, formalized in the research world as ReAct. Loop design, limits, checkpoints, error handling, matters as much as which model powers the agent. And loops fail in predictable ways: infinite retries, lost context, bad data poisoning the next decision.
Next lesson, I zoom into the “act” step specifically and look at how an agent actually reaches out and touches the real world through tools, including what goes wrong when that reach isn’t constrained.