company logo

Help center

Μετάβαση στο Gleap
Privacy policyDocs
Powered by
Όλες οι συλλογέςBuild custom AI agentsCap what a single agent run can cost

Cap what a single agent run can cost

Every agent has a cost ceiling per run. What it does at 75% and at 100%, and how to choose the number.

Rami Magdi·31 Αυγούστου 2026

An agent decides for itself how many steps a task needs. Usually that's a handful; occasionally it's a loop that keeps calling tools and re-reasoning. The cost cap is what stops the second case from becoming an unpleasant surprise.

The setting

In the agent's settings, you'll find Max cost per run (USD) — a hard limit on what one run may cost. It starts at $1, which is generous for most agents and deliberately low enough to catch a runaway.

The limit applies per run, not per day or per month. An agent triggered a thousand times can still spend a thousand times the cap, so it protects you against one bad run rather than against volume — the trigger's frequency controls volume.

What happens as it fills

Two stages, and the first is the interesting one.

  • At three-quarters of the limit, the agent is told it's running out and asked to conclude or summarise. It usually takes the hint and finishes cleanly, so many runs that would have been cut off end properly instead.

  • At the limit, the run is stopped and marked as having exceeded its budget — a distinct outcome, not a generic failure, so you can tell the two apart when reviewing runs.

Choosing a number

Base it on what the agent legitimately needs, then leave headroom rather than setting it to the exact expected cost.

  • An agent that tags a ticket or moves it between lanes does one or two model calls. The default is already far above what it needs, and lowering it makes a loop visible fast.

  • An agent that reads a long thread, calls several tools, and writes a considered reply may legitimately want more, especially on an expensive model.

If runs are stopping at the cap, look at why before raising it. A budget exceeded repeatedly is usually a symptom — a tool that returns too much data, an instruction that sends the agent round in circles, or a task that should have been split — and raising the ceiling makes the same problem more expensive rather than fixing it.

The step limit

There's a second, automatic backstop: a run may only take so many reasoning and tool steps before it's stopped. You don't configure this, and it exists for the case where an agent loops cheaply enough that the cost cap would take a long time to catch it.

A run that ends this way is marked as having hit its step limit. Read it as a signal that the task was too broad or the instructions left the agent without a clear finishing point — narrowing the job or splitting it across two agents fixes it more reliably than anything else.

Υπήρξε χρήσιμη αυτή η απάντηση;
😞
😐
😁