Module 1 · Lesson 7
When NOT to Build an AI Agent
If you already know the correct steps, an agent may add cost, latency and uncertainty without adding meaningful value.
Agentic systems are powerful because they can adapt their process at runtime. That flexibility is also their cost. Anthropic's guidance on effective agents emphasizes matching complexity to business value, and workflow-oriented frameworks make the same distinction between predetermined paths and dynamic agent behavior.
1. The process is already deterministic
If every request follows the same sequence, write that sequence in code. A user registration pipeline does not need an agent to decide whether to validate the email before creating the account.
validate_input()
check_duplicate_user()
create_account()
send_verification_email()Putting an LLM in charge of a stable transaction flow usually makes the system harder to test.
2. The task is a simple transformation
Summarization, classification, extraction or rewriting can often be handled with one model call and structured output. A multi-step agent loop is unnecessary unless the task must fetch information or decide among actions dynamically.
3. Wrong actions are difficult to reverse
Payments, deletes, permission changes, legal filings and other irreversible actions deserve deterministic authorization and strong approval boundaries. An agent can assist with investigation or drafting without owning the final side effect.
4. Latency must be predictable
An agent may take one turn or many. Sequential model calls and remote tools accumulate latency. For real-time user flows with strict service-level objectives, a fixed pipeline can be much easier to budget.
5. Cost must be tightly bounded
A workflow has a known maximum number of calls. An agent may need several iterations. Step limits help, but they still leave more variability than deterministic orchestration.
6. The data is already structured and the query is known
If the user clicks “Download last month's invoice,” you already know what endpoint to call. An agent adds nothing. Agents are most valuable when natural-language goals must be translated into an uncertain sequence of operations.
7. A rules engine solves the problem
Eligibility, taxation, limits and compliance policies are better expressed as code or declarative rules when the rules are known. An LLM can explain the result in natural language after the deterministic engine computes it.
8. You cannot evaluate success
Before giving an agent autonomy, define what a successful run looks like. If you cannot construct representative test cases, detect failures or observe tool behavior, production debugging will be difficult.
Use a hybrid architecture instead
The answer is often not “agent or no agent.” Use the model only where flexible interpretation is useful.
deterministic authentication
↓
agent investigates with read-only tools
↓
deterministic policy check
↓
human approval if needed
↓
transactionThis preserves adaptability while keeping critical invariants outside the model.
Questions to ask before choosing an agent
- Does the correct path genuinely vary at runtime?
- Will the model need to inspect results before choosing the next step?
- Can a small number of deterministic branches solve the same problem?
- Can we cap cost, steps and execution time?
- Can destructive actions be isolated behind approvals?
- Do we have traces and evaluation cases?
- What happens when a tool or model call fails halfway through?