Running agents in production: limits, approvals and costs
Key takeaway
An agent is production-ready when its permissions are limited, risky actions require approval, every step is logged and budgets for steps, time and cost are enforced. A good start is an agent that only proposes, and that takes on more execution step by step once quality is proven.
Lessons in this path
Which level of autonomy fits the start?
Autonomy should be earned. It works well to think in levels and move up only when measurements confirm quality. That keeps errors visible and cheap in the early phase.
| Level | Agent may | Human |
|---|---|---|
| 1 Observe | Read and summarise | Decides and acts |
| 2 Propose | Prepare a concrete action | Confirms every action |
| 3 Execute with exceptions | Handle routine cases alone | Reviews samples and exceptions |
| 4 Autonomous | Act within fixed budgets | Monitors metrics |
Where do human approvals belong?
Approvals cost time; too many of them lead people to click through blindly. Place them deliberately on actions that are hard to reverse, move money, reach third parties or delete data. Read steps and internal drafts usually need no approval.
An approval is only as good as the information the person sees. Show the planned action concretely, with recipient, amount or affected records, along with the agent’s reasoning. For a PR-reporting automation that saves 60 to 80 hours a month, Eugen Giminger chose exactly this setup: the automation prepares, a person approves.
How do you keep cost and runtime under control?
Agents can get stuck in loops, for example when a tool keeps returning the same error. Without limits this becomes an expensive endless loop. Set hard budgets per task and treat exceeding them as a normal, cleanly handled error case.
- Maximum number of steps or tool calls per task.
- Maximum runtime and maximum cost per task and per customer.
- Detection of repeated identical calls.
- Smaller, cheaper models for routine steps, larger ones only where needed.
- Clear feedback to users when a budget is hit.
What happens when the agent fails?
Every agent fails at some point: a tool is unreachable, an input is ambiguous, the model misreads the task or the model provider has an outage. What matters is that your product responds understandably in these cases. The user should learn what was done, what was not and what happens next, for example a handover to a person or a retry.
Also plan for half-finished tasks. If an agent has completed three of five steps, it must be clear whether the first steps are rolled back or resumed later. Write tools should therefore be idempotent where possible, meaning a repeated call with the same data does not create a duplicate result.
Going deeper: logging and evaluating agents
Testing agents is harder than testing single model calls, because many paths can lead to the goal. Evaluation should therefore focus on the end result and rule compliance rather than the exact path. A test set of realistic tasks with known expected outcomes, rerun after every change to instructions, tools or model, is helpful.
For logging, traces work well: linked records of every step of a task with inputs, tool calls, results, duration and cost. Tools such as Langfuse, LangSmith, Arize Phoenix or Helicone, as well as the OpenTelemetry conventions for generative AI, support this. Take care to minimise or mask personal data in traces.
Example: a billing agent that proposes first
A fictional start-up for coworking spaces builds an agent that finds discrepancies between bookings and invoices. At level 2 it proposes corrections that an employee confirms. Each task has a budget of twenty tool calls; credit notes above a set amount always go to a person.
After a few weeks the analysis shows that proposals for duplicate bookings are almost always confirmed unchanged, while discount proposals are often corrected. The team raises only duplicate bookings to level 3 and keeps approving discounts. The decision rests on its own measurements, not on gut feeling.
Common mistakes
- Starting straight away with full autonomy.
- Showing approvals without concrete details of the planned action.
- Setting no hard budgets for steps and costs.
- Testing agents only with individual examples instead of a fixed test set.
Frequently asked questions
Who is liable when an agent makes a mistake?
Towards customers, as a rule your company as the provider. This is general orientation, not legal advice; clarify liability in contracts and terms with qualified support.
How many test tasks do I need?
To start, twenty to fifty well-chosen tasks covering common cases and known errors are often enough. Every bug found in production becomes a new test task.
Try it yourself
Assign each action of your planned agent to an autonomy level, set budgets and define ten test tasks with expected outcomes.
Check your result
For every write action it is clear who approves, every task has budgets, and the test set runs before every change.