06What AI Agents Are
Agents are LLMs that take actions in a loop until a goal is met. Learn the agent loop, the six building blocks, and when you should — and shouldn't — use an agent.
What you'll learn
- Define an AI agent and the think → act → observe loop
- Name the six building blocks of every agent
- Tell apart chatbots, workflows and agents
- Decide when an agent is the right tool for a business problem
From “says” to “does”
A chatbot answers. An agent acts. Give an agent a goal — “find ten dental clinics in Iloilo without online booking and draft outreach emails” — and it decides the steps itself: search, open websites, record results, write drafts, and stop to ask you before sending anything.
Technically, an agent is simply an LLM running in a loop with access to tools. On each turn the model looks at the goal and everything that has happened so far, decides the next action, a tool runs, the result is added to the context, and the loop continues until the goal is met or a limit is hit.
Steps 02–05 repeat. Guardrails decide when the loop must stop or wait for approval.
The six building blocks
1 · Model
The reasoning engine. More capable models plan better and call tools more reliably. Small local models work for narrow, simple agents.
2 · Tools
Functions the model can call: search, read/write files, query a database, send email, call any API. (Lesson 07)
3 · Memory & knowledge
Short-term: the context window. Long-term: saved notes, a vector database, skill files. (Lesson 08)
4 · Instructions
The system prompt: role, goal, rules, when to stop, when to ask. Most agent quality comes from here.
5 · Loop / harness
The code running think → act → observe, managing context, retrying errors, enforcing limits. (Lesson 12)
6 · Guardrails
Permissions, step and spend limits, sandboxes, and human approval for irreversible actions.
Chatbot vs. workflow vs. agent
| Chatbot | AI workflow | AI agent | |
|---|---|---|---|
| Who decides the steps? | The human, turn by turn | You, in advance (fixed path) | The model, at run time |
| Predictability | High | High | Medium — varies per run |
| Handles surprises | With human help | Poorly — only designed paths | Well — it adapts |
| Cost per task | Low | Low | Higher (many model calls) |
| Best for | Q&A, drafting, support | Repeatable processes | Open-ended, multi-step research and operations |
| Example | Website FAQ bot | Form → classify → CRM → reply | “Research 10 leads and prepare outreach” |
What makes a good agent task?
Good fit
- Multi-step, but each step is checkable
- The path depends on what it finds (research, troubleshooting)
- Tools exist for every action needed
- Mistakes are cheap or caught before they matter
- The result can be verified (tests pass, data matches, human approves)
Poor fit (for now)
- One-shot tasks — a single prompt is simpler
- Fixed, well-known processes — use a workflow
- Irreversible, high-stakes actions with no review
- No way to check whether the result is right
- Tasks that need access you can't safely grant
Levels of autonomy
| Level | Description | Example |
|---|---|---|
| L1 · Suggest | The agent drafts; a human does everything else. | Drafts replies in your inbox |
| L2 · Act with approval | The agent prepares actions; a human approves each one. | “Send these 10 emails?” [Approve] [Edit] |
| L3 · Act within limits | The agent acts alone inside strict boundaries; humans review logs. | Auto-tags and routes support tickets |
| L4 · Autonomous | The agent runs end to end; humans handle exceptions. | Nightly data cleanup with alerting |
Start every new agent at L1 or L2. Move up only after you've watched it succeed consistently on real work.
Real agent examples for small businesses
- Lead research agent — finds prospects matching your ideal client, enriches them, drafts personalized outreach for approval.
- Bookkeeping assistant — reads receipts from a folder, extracts data, categorizes, flags anomalies, updates your sheet.
- Customer support agent — answers from your knowledge base, checks order status via API, escalates the rest.
- Coding agent — edits your website's code, runs it, fixes errors, opens a change for your review.
- Personal ops agent — a harness like Hermes running on a small server: scheduled reports, reminders and research sent to your Telegram.
See several of these working in the AI Lab.
Key takeaways
- An agent = an LLM in a loop with tools, working toward a goal.
- Six building blocks: model, tools, memory, instructions, loop/harness, guardrails.
- Prefer the simplest pattern: chatbot → workflow → agent, only as needed.
- Start at low autonomy with human approval; increase it only after proven reliability.
Knowledge check
0 / 3Q1What makes something an agent rather than a chatbot?
Agents choose and execute tool actions iteratively toward a goal.
Q2A process always follows the same 5 steps. What's usually best?
Fixed, known paths are better served by predictable workflows.
Q3Where should a new agent that sends client emails start?
Irreversible, client-facing actions need approval until reliability is proven.