The real difference between a prompt, a workflow, and an agent
Everyone is calling everything an agent. Here's what actually separates the three — and why it matters when you're building.
The word "agent" is everywhere. So is "workflow". People use them interchangeably, which means everyone is confused and half the things called agents are just prompts with extra steps.
Here's a clean mental model I use. It's not the academic definition — it's the practical one.
A prompt
A prompt is a single call to an LLM. Input goes in, output comes out. That's it.
You: "Summarize this article."
LLM: [summary]
No loops. No decisions. No tools. One round trip.
Most "AI features" shipped in 2023 were prompts. They're underrated — a well-crafted prompt can do a lot. But they're fundamentally one-shot and stateless.
A workflow
A workflow is a sequence of steps — some of which may call an LLM — executed in a predetermined order. The structure is defined by the developer, not the LLM.
Example: a content repurposing workflow.
- Receive a LinkedIn post (trigger)
- Call Claude to rewrite as a Twitter thread
- Call Claude to extract a newsletter paragraph
- Post to Twitter via API
- Save to Notion
The LLM is inside the workflow, but it doesn't control it. The flow is fixed. The branching is hardcoded. You're orchestrating LLM calls, not running an agent.
n8n, Zapier, and Make are workflow tools. Most "AI automations" you see in tutorials are workflows, not agents.
Workflows are good: reliable, predictable, debuggable. Build them when you know the steps in advance.
An agent
An agent is a system that uses an LLM to decide what to do next, executes actions, observes results, and loops until a goal is reached.
The key difference: the LLM controls the flow.
Goal: "Find all TypeScript files that use console.log and replace them with logger."
Agent loop:
1. LLM decides: search for console.log in *.ts files
2. Runs search → gets 12 results
3. LLM decides: read file 1, understand context
4. LLM decides: write replacement using existing logger pattern
5. LLM decides: verify the change didn't break imports
... repeats until done
The agent isn't following a script. It's making decisions at each step based on what it observes.
Real agents have:
- A goal, not just a task
- Access to tools (file system, APIs, search)
- Memory across steps (at least within the run)
- The ability to handle unexpected states
Claude Code is an agent. It decides which files to read, what to change, whether to run tests, and when to stop.
The confusion
The term "agent" got attached to anything involving LLMs + action. That includes things that are clearly workflows (a fixed n8n flow with an OpenAI node) or even prompts (a chatbot with a system prompt).
The practical test: who controls the flow?
- Developer controls: workflow
- LLM controls: agent
- No flow at all: prompt
When to use which
Prompt: single, well-defined transformation. Summarize, classify, extract, translate.
Workflow: known sequence of steps with occasional LLM involvement. Content pipelines, notifications, form processing.
Agent: tasks where the steps themselves are unknown in advance. Codebase analysis, research, open-ended problem solving.
Don't reach for an agent when a workflow suffices. Agents are more powerful but harder to debug and less predictable. Build the simplest thing that solves the problem — and know which thing you're actually building.
If you've decided you want a workflow, my first n8n agent is a concrete linear-chain example — one LinkedIn post in, four content formats out. If you've decided you need a real agent, building AI agents that actually work covers the patterns that keep them reliable past the third run.
Get the next post in your inbox
Practical tips for building with AI. One email per post.
Related posts
- Building AI agents that actually workMost 'agents' are brittle pipelines dressed up with AI. Here's the anatomy of a reliable agent, three patterns that hold up in production, and when to use n8n vs code.
- How to connect Claude to Notion, Gmail, and Google DriveClaude Code MCP servers let Claude read and write Notion, Gmail, and Google Drive. Step-by-step setup guide for the three most useful ones.
- My first n8n agent that saved me 5 hours a weekI write one LinkedIn post. Claude + n8n turns it into a Twitter thread, a newsletter paragraph, and a blog draft. Here's the exact setup.