Lesson 3 of 7

6 min read

How agents think and act

You do not need to build one to use one well, but a simple mental model of what is happening inside makes you far better at directing an agent. Here is that model.

By David Silva

Under the hood, an agent is a loop wrapped around a language model. That is genuinely most of it. Four parts do the work, and understanding them tells you exactly which lever to pull when an agent misbehaves.

The four parts

  • The model is the reasoning engine. It reads the situation and decides what to do next. This is the same kind of AI behind the chat tools you already know.
  • The instructions are your standing orders: the goal, the rules, the tone, and the things it must never do. This is the part you control most directly.
  • The tools are what the agent can actually do: search the web, read a calendar, send a message, call a service. No tools means it can only talk.
  • The memory is what it carries between steps and sessions, so it knows what it already did and what it learned.

The loop

Give an agent a goal and it runs a simple cycle: look at the goal and what has happened so far, decide the next step, use a tool to take that step, read the result, and repeat. It keeps looping until the goal is met or it hits something it cannot resolve, at which point a well-built agent stops and asks you.

Example

The loop on a real task

Goal: "book me a table for four on Friday." The agent checks the calendar for a free evening, searches nearby restaurants, finds availability, and then, because booking commits you to something, it pauses and shows you two options rather than reserving on its own. Decide, act, read, repeat, and know when to hand back.

What autonomous really means

Autonomous does not mean the agent is a mind of its own. It means it can take several steps without you approving each one. That is powerful, and it is also exactly why the instructions and guardrails matter. The agent will do what its goal and rules point it toward, so vague instructions produce vague behavior.

Hold on to the four parts and the loop. When an agent does the wrong thing, it is almost always one of them: unclear instructions, a missing or misused tool, thin memory, or a task that genuinely needed you. Next we tackle the part beginners miss most: an agent only helps if it is actually running.

Key takeaways

  • An agent is a loop around a model: instructions, tools, and memory do the rest.
  • It decides, acts, reads the result, and repeats until done or blocked.
  • Autonomous means it takes steps without approving each one, which is why clear rules matter.
  • Models can be confidently wrong, so keep a human check on costly or irreversible actions.

Get the next lesson in your inbox

Up next: Always-on: why your agent needs a home. Join the free course and we'll send new lessons and practical ways to put agents to work.

Common questions

For most personal tasks, any current top-tier model works well, and you can start with whatever your platform provides by default. You can always switch models later. Lesson 5 covers choosing one.