Chapter 1
What an AI Agent Actually Is
Build a practical mental model of an agent without the hype, so you can reason about what it will and will not do.
The real business problem
People use the word agent for very different things. A chatbot is called an agent. A single API call is called an agent. A twenty step automated workflow is called an agent. When the word means everything, it helps no one decide what to build or what to buy.
So before any code, you need a definition you can actually reason with.
The core idea
An agent is a system that takes a goal, decides the next step on its own, takes that step using tools, looks at the result and repeats until the goal is met or it stops. The important part is “decides the next step on its own.” That is what separates an agent from a fixed script.
A simple test. If you can draw the whole thing as a flowchart where every branch is known in advance, you have a workflow, and a workflow is often the right answer. If the path depends on what the model finds along the way, and the number of steps is not fixed, you have an agent.
A simple model
Think of three levels.
- A prompt is one question and one answer. No memory of the task, no actions in the world.
- A workflow is a fixed sequence of steps, some of which may call a model. The steps do not change based on the result.
- An agent is a loop. Goal, decide, act, observe, repeat. The steps are chosen at run time.
Most real business systems are a mix. A fixed workflow that hands a few hard, open ended sub tasks to an agent is usually more reliable than one giant agent that tries to do everything.
A concrete example
Take “prepare a weekly account summary for each client.” A pure prompt cannot do it, because the data lives in several places. A fixed workflow can pull the data and format it, but it struggles when a client has an odd situation the template did not expect. An agent can handle the odd cases, decide which numbers matter and write the exceptions in plain language. The best build uses a workflow for the predictable parts and an agent only for the judgement.
What breaks
The most common mistake is reaching for an agent when a workflow would do. Agents are harder to test, cost more per run and fail in stranger ways. Use the smallest tool that solves the job. There are cases where you should not use an agent, and knowing them is part of the skill.
Decision rules
- If the path is fully known in advance, build a workflow, not an agent.
- If the task needs judgement on unpredictable inputs, an agent earns its place.
- If a wrong answer is expensive, the agent needs verification before you trust it, which is Chapter 8.
Related lab
Map an Agent-Worthy Workflow. You will take a real process from your own work, score it, and decide whether it deserves an agent at all.
Practical checklist
- You can state the goal in one sentence.
- You can say what “done” means and how you would check it.
- You have decided workflow, agent, or a mix, and you can say why.
What changes after this chapter
You have a definition you can defend in a meeting and use to choose the right tool. Next you learn how to pick the work that is actually worth automating.
Next: Chapter 2, Pick Work Worth Automating.