How it works · 26 of 37 Core

What is an AI agent and how does an AI agent work?

Give it a goal, it works out the steps

AI agents: A model in a loop: plan, use tools, check the result, repeat until the goal is done.

Loading the animation…

Say it like this An agent is a model in a loop: it plans a step, uses a tool, checks what happened, and repeats until the goal is done.

Under the hood — for builders
One real loop, step by step
Each lap the model thinks (plans), acts (calls a tool) and sees what came back, so a failed search is just one more thing to see.
Agent or workflow?
In a workflow your code fixes the steps in advance; in an agent the model picks each next step itself.
Thinking between actions pays
On household tasks in a text game, the model finished 71% when it wrote a short plan between actions, against 45% when it only acted.
Reliable is harder than capable
On airline-booking tasks like our scene's, even 2026's newest models don't always get the same result when they run the same task again.
Rules do the heavy lifting
Take the airline's written policy out of the agent's instructions and the best 2024 agent solved a third as many tasks.
When to use one
Open-ended jobs whose steps you can't predict. Otherwise a fixed workflow or one model call is cheaper (Anthropic).
Stop it on purpose
Stop at the goal, plus a step cap: ReAct allowed 7 on a quiz needing 2+ Wikipedia pages (HotpotQA).
Typical cost
Every lap is another model call: τ-bench's agent cost $0.38 per shop task, mostly for reading its long instructions.
Watch out
Loops: a frequent ReAct slip was repeating its last thoughts and actions, failing to “jump out of the loop”.
Measure it
Run each task several times in a sandbox (a safe copy where mistakes cost nothing), not once.
Sources
Anthropic, Building effective agents, Erik S. and Barry Zhang, 2024 (anthropic.com/engineering) · Yao et al. (Princeton, Google), ReAct, ICLR 2023 (arXiv 2210.03629) · Yao, Shinn, Razavi, Narasimhan (Sierra), τ-bench: a test with simulated airline and shop customers, 2024 (arXiv 2406.12045) · Rabanser et al. (Princeton), Towards a Science of AI Agent Reliability, ICML 2026 (arXiv 2602.16666).

What happens in the AI agents animation, step by step?

  1. You give an agent a goal, not one question: book the cheapest flight under ₹8,000.
  2. Every step is a small loop: plan it, do it with a tool, check the result.
  3. It picks the cheapest, ₹6,200. Your turn: tap the road to put a problem in its way.
  4. Sold out! The agent checks what went wrong and plans a new route.
  5. It picks the next cheapest, ₹7,450, still under ₹8,000, and books it.
  6. Goal met, so it stops. Every step it took is on record.

What everyday example explains AI agents?

An intern given a goal, not a single question.

Why should a team care about AI agents?

The biggest current product shift.