How does an
AI agent work?
Built piece by piece, like an MVP. Click, drag, try — no code needed.
Click each piece to see what it is.
A brain in a jar
An LLM does exactly one thing: guess the next word.
Pick the next word
Each time, the LLM scores every possible word. You play the “LLM”.
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.
One sheet of paper, sent every time
An LLM remembers nothing. All it knows is what’s written on this sheet.
Customer writes:
“Order #123 is 3 days late. Refund me!”
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?
The loop turns a chatbot into an agent
Still needs a tool → keep going. Doesn’t → stop. That’s all.
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?
Hands, and a recipe book
The model only writes a request. A real program (the host) runs it and approves it.
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.
- 1Does this tool exist?
- 2Are the arguments well-formed?
- 3Is it permitted?
(check an order, send mail, run SQL)
(how to read the company’s tables)
(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?
run_sql("… FROM churn")run_sql("… FROM users_left")run_sql("SHOW TABLES")run_sql("… FROM events …")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.
The desk has limits
The sheet only has so much room. Full means the agent dies. Tidying the desk is survival.
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.
Let it run on its own, without fear
Each guardrail stops one kind of failure. Adding one = adding a piece, not changing the core.
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
Which guardrails do you add? How many scenarios survive?
Put together: one sheet, one loop
Each layer solves exactly one problem of the layer below.
LLM
guesses the next word
Prompt
the sheet sent every time
Loop
think → act → observe → repeat until done
Tools & Skills
hands to act, a book to know how
Context
keep the desk tidy, pin what matters
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.
