Agents vs. LLMs: The Division of Labor

Agents vs. LLMs: The Division of Labor

LLMs are pure intelligence with no hands. Agents are the hands, programmed to use that intelligence through a small set of primitive operations. One can’t work without the other.
Reading time: ~4 minutes


The Common Misconception

Most people talk about "AI agents" as if the intelligence lives in the agent. It doesn’t. An agent is a harness — a program that follows a fixed loop:

1. Observe environment state
2. Call LLM with context + prompt
3. Parse response for tool commands
4. Execute tool commands
5. Capture results
6. Repeat

The agent has no intelligence. It’s a deterministic loop. The LLM has no ability to act — it’s a next-token predictor that only ever generates text. Neither is useful alone. Together, they form a system that can build software, edit files, and run commands.


What the LLM Actually Does

An LLM, stripped of all marketing, does exactly one thing:

Given a sequence of tokens, predict the next token.

That’s it. It has no:

  • Memory — Your conversation is its memory. Every message is re-sent every time. There’s no "remembering" — just re-reading.
  • Filesystem access — It can’t open files, save changes, or list directories.
  • Shell — It can’t run commands, install packages, or start servers.
  • Network — It can’t fetch URLs, call APIs, or clone repos.
  • Persistence — When the conversation ends, everything it "knew" is gone.

An LLM interacting with ChatGPT-style web UI is like a brilliant mathematician locked in a room with a mail slot. They can solve any problem you slide under the door, but they can’t get up, open the door, and walk out to tell you the answer. Someone has to slide the paper in and take the result out.

That someone is the agent.


What the Agent Actually Does

The agent is a program — usually under 10K lines of code — that implements a small set of primitive operations. These are the only things an agent can do:

Operation What It Does Example
Read Read a file or directory Read src/main.rs
Write Create or overwrite a file Write src/main.rs → content
Edit Replace a specific string in a file Edit src/main.rs: old → new
Execute Run a shell command Bash: cargo build
Search Find files by name or content Grep: "function" in src/
Think Call the LLM for reasoning Produce a plan or analysis
Ask Request clarification from the user "Should I use actix-web or axum?"

Every complex behavior — building a web app, debugging a crash, refactoring a codebase — decomposes into sequences of these 7 operations. There is no magic. The agent literally reads files one at a time, writes changes line by line, and runs commands waiting for output.


How They Work Together

User: "Fix the bug in the login handler"

Agent loop:
  ┌─────────────────────────────────────────────┐
  │  Agent reads src/routes/login.rs            │ ← Read
  │  Agent thinks: "What's wrong here?"         │ ← Think (calls LLM)
  │  LLM: "The session cookie isn't set"        │ ← LLM output
  │  Agent edits the file to add cookie setting │ ← Edit
  │  Agent runs cargo build                      │ ← Execute
  │  Agent reads compiler output                 │ ← Read
  │  Agent thinks: "Build failed — fix error"    │ ← Think (calls LLM)
  │  LLM: "Import missing SessionMiddleware"     │ ← LLM output
  │  Agent edits Cargo.toml + imports            │ ← Edit
  │  Agent runs cargo build again                │ ← Execute
  │  Agent reads: "Build successful"             │ ← Read
  │  Agent signals: done                         │
  └─────────────────────────────────────────────┘

The agent orchestrates. The LLM reasons. Neither step alone is impressive. The loop of 7 operations running 20-50 times per task is what produces the magic.

The LLM never "fixes the bug." It looks at the code the agent read, thinks about what change would fix it, and outputs the edit the agent should make. The agent makes the edit, runs the build, reads the result, and decides whether to call the LLM again or declare victory.


The Cost Breakdown

This division has a direct cost implication:

Component Cost per 1M tokens What It Spends On
LLM reasoning (deepseek-v4-flash) $0.14/M input Thinking about your task
LLM review (deepseek-v4-pro) $0.435/M input Auditing the result
Agent loop Free Deterministic — no tokens burned

The agent loop costs nothing. Every Read, Write, Edit, Execute is CPU time on your machine — zero LLM tokens. The only token cost is when the agent calls Think, which sends context to the LLM.

This means: make the agent do more and the LLM think less. If the agent can figure out which file to edit by following a convention (always read src/main.rs first), it should — without calling the LLM. Save the LLM for actual reasoning.


Analogy: Chef and Kitchen Staff

The LLM is the chef — they decide what to cook, what ingredients to combine, what temperature to use. But the chef doesn’t chop vegetables, light the stove, or wash dishes. That’s the kitchen staff (the agent).

The chef sits at a desk and writes recipes. The kitchen staff reads the recipe, chops the onions, heats the pan, and calls back: "The pan is hot, what temperature for the steak?" The chef writes back: "Medium-high, 4 minutes per side." The staff executes.

Neither the recipe alone nor the chopping alone produces dinner. You need both.

The clever part (and where COSAW comes in) is that you can have multiple kitchen staff working in parallel — each with their own recipe card — while the chef only handles the questions that actually need culinary judgment. See the COSAW article for how that scales.


The Takeaway

LLM Agent
What it is Statistical text predictor Deterministic loop
What it does Generates text Reads, writes, executes
Memory None (context window only) Filesystem (persistent)
Cost Per-token billing Free (CPU time)
Failure mode Hallucination, degraded reasoning Correct execution of wrong plan
Intelligence source Yes (training data) No (follows instructions)

The agent is not smart. The LLM is not capable. Together, they build software.


— Richard Primera, Frao Technologies
Last updated: 2026-07-27