Tutorials · Chapter C (3/4) · ~8 min
Agents — think, act, repeat
Play → read → next
An agent loops: plan → use tools → observe → continue until the goal is done.
Playground
Agents: think → act → observe
Step the loop. Agents need a max-steps budget so they don’t spin forever.
Budget: 1 / 3 tool-ish steps
- ThinkGoal: plan a picnic Saturday. Need weather + calendar.
Recap
What you just did
You stepped an agent through a mini goal and set a max steps budget. More autonomy, more ways to wander — so limits matter.
Teach
How it works
A simple agent loop:
- Plan what to do next
- Act (often via tools)
- Observe the result
- Repeat until success, failure, or budget exhausted
Add human checkpoints for risky actions (spend money, send email, delete files).
Use it
When you'd use this
- Multi-step research with lookups
- “Plan a picnic and put holds on the calendar” style goals
- Ops helpers that triage, then ask before acting
Watch out
Watch out
Without limits, agents can loop forever or take costly actions. Cap steps, cap tools, require approval for irreversible work.
Try next
Try this next
Rewrite a big goal as: success check + max 3 tool calls + “ask me before sending.”