Everyone is building AI agents. And getting one to work in a demo is surprisingly easy.
Give an LLM some tools. Put it in a loop. Let it decide what to do next. Watch it accomplish something.
It feels magical.
Then someone asks the question that changes everything:
"Can we actually put this in production?"
That's when the real engineering begins. Before shipping an agent, there are six questions every team should be able to answer.
1. How reliable are your tool calls?
An agent is only as reliable as the actions it can take.
Give it 30 overlapping tools and you've multiplied the decisions it has to make. More tools don't make a more capable agent. Most of the time they just make a more confused one.
A better setup looks like this:
- A small set of well-scoped tools
- Clear tool descriptions and clear responsibilities
- Strong input validation
- Predictable outputs
The goal isn't to give the agent everything. It's to give it exactly what it needs.
Less ambiguity, better decisions.
2. What stops it from doing something it can't undo?
An agent that can read information is very different from an agent that can:
- Delete data
- Send emails
- Make purchases
- Change configurations
- Trigger deployments
- Modify customer records
Scope permissions to the task. Put extra protection around risky actions.
Agent decides ↓ Risk check ↓ Human approval ↓ Execute action
For particularly sensitive workflows, add sandboxing. If something goes wrong, the mistake stays isolated.
3. Does the agent know when to stop?
Agents loop. A tool fails, the model retries, the same reasoning runs again and again.
A production agent needs explicit boundaries:
- Maximum number of steps
- Wall-clock timeout
- Retry limit
- Maximum tool calls
- Defined failure handling
If the agent can't solve the task within those limits, it should stop. Sometimes the right behavior isn't:
"Try harder."
It's:
"I couldn't complete this safely. Please help."
4. What's your latency?
Users don't care how smart your agent is if it takes forever to respond.
Don't stop at average latency. Look at percentiles:
- P50 — the typical experience
- P95 — the slow experience
- P99 — the worst-case experience
One easy win is parallel execution. If two tool calls don't depend on each other, why run them one after another?
Instead of this:
Tool A → Tool B → Tool C
you can often do this:
┌→ Tool A ─┐ Request ├→ Tool B ─┼→ Continue └→ Tool C ─┘
Cutting unnecessary waiting has an outsized effect on how the agent feels.
5. What does each request cost?
Not every step needs your most capable model. That's where model routing comes in:
- Simple task → smaller model
- Complex reasoning → more capable model
- Repeated information → cache
The goal isn't to minimize model usage at all costs. It's to spend intelligence where intelligence is actually required. And if the same tool response keeps getting requested, a cache can eliminate the call entirely.
6. How will you know when it breaks?
This is probably the most important one.
If you can't observe your agent, you can't operate it. Every run should produce a trace that captures:
- Tool calls, arguments, and responses
- Model calls and token usage
- Latency
- Errors and retries
- Final outcome
Then, when something fails, you can answer what happened, instead of shrugging and saying:
"The AI gave a weird answer."
The production agent checklist
Before shipping, ask:
- Are tools tightly scoped?
- Are permissions properly restricted?
- Are risky actions gated?
- Are there stopping conditions?
- Are timeouts configured?
- Are retries bounded?
- Is latency measured?
- Is cost controlled?
- Are agent runs observable?
- Is failure handling defined?
If you can't answer these, the agent probably isn't finished.
Demo vs production
A demo asks:
"Can the agent do this?"
Production asks:
"What happens when the agent gets it wrong?"
That difference is enormous. A production agent isn't just an LLM with tools. It's a system built on boundaries, permissions, guardrails, observability, and failure handling.
That's what turns an impressive prototype into something a company can actually trust.
— Cheers, NP