Concept 07 · 8 min
An AI agent is a loop and a few tools. The rest is marketing.
Scroll to start
Scene 1
A brain without hands
Sarah is a relationship manager at a bank. Tomorrow she meets Mr. Miller, who runs a small business. She asks her AI assistant for help.
Sarah
Prepare my meeting with Mr. Miller tomorrow.
Assistant
Sure! Here’s how to prepare:
- Review your recent exchanges with Mr. Miller.
- Check his account situation.
- Prepare a few questions about his needs.
Good luck with the meeting!
Notice: it hasn’t looked at anything. It’s telling Sarah what to do.
On its own, a model is a giant autocomplete: it sees nothing of your world. No emails, no CRM. It can only tell you what to do.
Scene 2
Giving it hands
What if the assistant could look things up by itself? Let’s give it a few tools. Each one does a single, boring, reliable job.
Tap the tools to hand them over.
The model never touches your systems. It only fills in order forms; the program around it does the rest. Deep dive: Tools.
Scene 3
The loop
Sarah asks again, with the tools plugged in. Scroll slowly and watch what happens.
An animated diagram of the loop follows. The same steps are listed in the table below it.
Keep scrolling: each scroll moves the loop one step.
Sarah › Prepare my meeting with Mr. Miller tomorrow.
| Turn | Think | Act | Observe |
|---|---|---|---|
| Turn 1 | ThinkFirst, who is Mr. Miller? | ActCRMname = "Miller" | ObserveMiller Joinery: client since 2019, small business, 3 accounts. |
| Turn 2 | ThinkWhat did we discuss recently? | ActEmailsclient = "Miller" | ObserveHe asked for a higher overdraft last month. |
| Turn 3 | ThinkAn overdraft request? Let me check his payments first. | ActInvoicesclient = "Miller" | ObserveOne invoice 12 days overdue. |
| Turn 4 | ThinkI have enough, let me write. | ActDraftdocument = "preparation note" | Observe5-point preparation note. |
| End | ThinkGoal reached. | The loop stops | Final answer to Sarah Your note is ready: 5 points. Main topic: his overdraft request. Heads-up: one invoice is 12 days overdue. Meeting prep: Mr. Miller
|
Sarah › Prepare my meeting with Mr. Miller tomorrow.
| Turn | Think | Act | Observe |
|---|---|---|---|
| Turn 1 | ThinkFirst, who is Mr. Miller? | ActCRMname = "Miller" | ObserveMiller Joinery: client since 2019, small business, 3 accounts. |
| Turn 2 | ThinkWhat did we discuss recently? | ActEmailsclient = "Miller" | ObserveHe asked for a higher overdraft last month. |
Your turn. Which tool will it call next? | |||
Notice: nobody programmed the order of these steps. At each turn, the model decides what to do next based on what it just learned. That’s an agent.
Scene 4
Your turn to play
Same assistant, same tools, three goals. You decide which tools it gets, and you read every step it takes.
Challenges
- Prepare the meeting in 3 turns or fewer. Choose which tools to give the agent.
- Bonus: make the agent fail.
Pick a goal and some tools, then press Run.
Scene 5
When to stop, and who decides
An agent stops when it reaches its goal. But what if its next step is something you can’t take back, like sending an email to a client?
Drag the slider: the flow below shows where Sarah approves.
It reads freely. Nothing is sent without Sarah’s approval.
Chasing overdue invoices
- Read invoices
- Read emails
- Draft reminders
- Send remindersSarah approves
Which setting would you choose for chasing overdue invoices?
Every answer is accepted.
A good agent has two brakes: a maximum number of turns, and a human before any action you can’t take back.
Hype vs reality
- What the hype says
“Agents will replace entire teams.”
What actually happensAn agent is only as good as its tools and instructions. On long tasks, errors pile up turn after turn.
- What the hype says
“You need a complex framework to build an agent.”
What actually happensThe core mechanism fits in a few lines. The hard part is elsewhere: good tools, good instructions, good guardrails.
- What the hype says
“The agent understands your company.”
What actually happensIt only sees what its tools return. No tool, no information.
Under the hood
Everything you just saw fits in these lines.
while turn < max_turns: reply = model(conversation, tools) # Think if reply.is_final: # Stop condition break result = run(reply.requested_tool) # Act conversation.append(result) # Observe turn += 1No magic: a model, a list of tools, a loop. The full code is open source on GitHub: NanoAgent.
In 3 sentences
- An agent is a model that can use tools.
- It works in a loop: think, act, observe, repeat.
- It stops when the goal is reached, or when a human or a limit stops it.
Did this make sense?
0/9 concepts unmagicked
Go to the challenge- 01LLMAvailable · How can it write so well without understanding? · Available
- 02ContextAvailable · Why does it forget what I said earlier? · Available
- 03PromptAvailable · Why are my results mediocre? · Available
- 04HallucinationsAvailable · Why does it make things up? When can I trust it? · Available
- 05RAGAvailable · How do I make it use our internal documents? · Available
- 06ToolsAvailable · How can it act, not just talk? · Available
- 07AgentAvailable · What is an agent, concretely? · Available
- 08SkillsAvailable · How do we specialize it without retraining? · Available
- 09Limits & safetyAvailable · What must I never trust it with? · Available
Solve the sandbox challenge to unmagic this concept.
Next step
How do you specialize an agent without retraining it?
Job sheets pulled out at the right moment
Use this journey with your teamsScripted scenario, not a live model.