AN INTERACTIVE EXPLAINER

How does an
AI agent work?

Built piece by piece, like an MVP. Click, drag, try — no code needed.

The agent formulaInteractive
Agenta self-driven worker

Click each piece to see what it is.

01 / MVP 0 · just the LLM

A brain in a jar

An LLM does exactly one thing: guess the next word.

Try · guess the word yourselfInteractive

Pick the next word

Each time, the LLM scores every possible word. You play the “LLM”.

The weather today is
Try · ask it to do somethingInteractive

But it has no hands

Ask the brain in the jar a few things.

Can do

Write, translate, summarise, explain.

Can’t yet

Look things up, press buttons, remember last time.

02 / MVP 1 · + Prompt

One sheet of paper, sent every time

An LLM remembers nothing. All it knows is what’s written on this sheet.

Try · switch layers on and offInteractive

Customer writes:

“Order #123 is 3 days late. Refund me!”
The sheet sent to the LLM14 tokens
New messageOrder #123 is 3 days late. Refund me!
The LLM answers
We’re sorry for the inconvenience. Please contact customer care for further help.
Generic — it doesn’t know who it is.

Can do

Change tone, follow rules, know which tools exist.

Can’t yet

It can only ask for a tool. Who runs it? Who reads the result?

03 / MVP 2 · + Loop

The loop turns a chatbot into an agent

Still needs a tool → keep going. Doesn’t → stop. That’s all.

Try · step through itInteractive
ThinkLLM reads the sheet
Actrun the tool
Observeresult pasted on the sheet
Doneno more tools needed
…then back to “Think” with a thicker sheet
Press Next step to start the agent.
turn 0/240/40 tools0 tokens

Can do

Works through many steps and decides when it’s done.

Can’t yet

Where do tools come from? Who allows them? What if it misbehaves?

04 / MVP 3 · + Tools & Skills

Hands, and a recipe book

The model only writes a request. A real program (the host) runs it and approves it.

Try · the tool gateInteractive

1 · Grant permission

Everything is denied by default. Click to grant.

2 · The model asks to call…

Pick a request and watch it pass 3 gates.

  1. 1Does this tool exist?
  2. 2Are the arguments well-formed?
  3. 3Is it permitted?
What the model gets back
Pick a request above ↑
Try · tool vs skillInteractive
Toolwhat you can do
(check an order, send mail, run SQL)
Skillhow to do it
(how to read the company’s tables)
Memorywhat you already know
(preferences, last time)

Question: “How many people left the app this week?”

The agent has a run_sql tool. Should it also get a recipe book?

events-schema — how to read the events table 1 line · always present
5 turns~3.1k tokensguessing, trial and error
How many people left the app this week?
There’s probably a “churn” table…
run_sql("… FROM churn")
Table “churn” does not exist
Try “users_left”…
run_sql("… FROM users_left")
Not that either
List the tables first.
run_sql("SHOW TABLES")
events, users, orders
run_sql("… FROM events …")
412 people. (after 5 turns)

Can do

Does real work, with rules and a how-to handbook.

Can’t yet

The longer it runs, the thicker the sheet. Eventually it overflows.

05 / MVP 4 · + Context management

The desk has limits

The sheet only has so much room. Full means the agent dies. Tidying the desk is survival.

Try · survive 20 turnsInteractive
taskthinkingtool resulttidiedsummaryplan / pinned
turn 0/20desk 7/100
Empty desk. Press “Run 1 turn”.

Tidy in batches, not every turn: each edit to the history makes the AI provider lose its prompt cache, which costs more.

Can do

Runs hundreds of turns with the desk still tidy.

Can’t yet

The agent can still loop, make things up, get stuck, or act on its own.

06 / MVP 5 · + Guardrails

Let it run on its own, without fear

Each guardrail stops one kind of failure. Adding one = adding a piece, not changing the core.

Try · pick a failureInteractive

Runs forever

The agent keeps thinking “not enough yet” and goes on. Nobody says stop.

No guardrail

With Turn limits

In the code: agentcore · Limits — default 24 turns / 40 tools; a final “interim answer” turn at the cap

Try · build your agentInteractive

Which guardrails do you add? How many scenarios survive?

0/11
Bare — it runs, but breaks in many ways
Runs foreverBurns money, never finishes
Stuck in one placeBurns all 24 turns on one error
Declares done too earlyAn invented number, said confidently
Forgets the goalSkips C, D, E without knowing
Result too bigMisses exactly where the error is
Job too bigMain desk flooded by chores
Long-running workThe whole agent just waits
Needs a human decisionGuesses on something irreversible
AI provider goes downThe whole turn wasted
Forgets since yesterdayAsks from scratch every day
Tries to leave the penA secret key leaks
Put together

Put together: one sheet, one loop

Each layer solves exactly one problem of the layer below.

Click to see a request travel through every layer.
01

LLM

guesses the next word

02

Prompt

the sheet sent every time

03

Loop

think → act → observe → repeat until done

04

Tools & Skills

hands to act, a book to know how

05

Context

keep the desk tidy, pin what matters

06

Guardrails

stop each kind of failure

Curious how this feels in practice?

Soot is a small agent that runs on your machine, with the tools you choose.

Based on 2ai/agentcore v0.1.3 · examples are simplified illustrations.