Barefoot AI HubTHE BAREFOOT FREELANCER
Start learning
⬢ AI Agents · Lesson 1 of 7

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.

⏱ 18 min📶 Intermediate🧪 3-question check

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.

01Goalfrom a user or trigger
02Thinkplan the next step
03Actcall a tool
04Observeread the result
05Done?answer · ask a human · loop

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

ChatbotAI workflowAI agent
Who decides the steps?The human, turn by turnYou, in advance (fixed path)The model, at run time
PredictabilityHighHighMedium — varies per run
Handles surprisesWith human helpPoorly — only designed pathsWell — it adapts
Cost per taskLowLowHigher (many model calls)
Best forQ&A, drafting, supportRepeatable processesOpen-ended, multi-step research and operations
ExampleWebsite FAQ botForm → 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

LevelDescriptionExample
L1 · SuggestThe agent drafts; a human does everything else.Drafts replies in your inbox
L2 · Act with approvalThe agent prepares actions; a human approves each one.“Send these 10 emails?” [Approve] [Edit]
L3 · Act within limitsThe agent acts alone inside strict boundaries; humans review logs.Auto-tags and routes support tickets
L4 · AutonomousThe 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 / 3

Q1What makes something an agent rather than a chatbot?

Q2A process always follows the same 5 steps. What's usually best?

Q3Where should a new agent that sends client emails start?

Finished this lesson?Your progress is saved in this browser.