Credit usage
Cap the credits, tokens, or dollars an agent can use per period or per conversation.
The Credit Usage Limit guardrail caps what one agent can consume. Set a limit in credits, tokens, or dollars, over a day, a week, a month, or a single conversation. When the agent reaches a limit, its next model call is refused until the period resets or a new conversation starts.
Open it from Agent Config → Guardrails: select the Credit Usage Limit row.
At a glance
Where: Agent Config → Guardrails → Credit Usage Limit.
Scope: one agent. Each agent has its own limits.
What happens at a limit: the next model call isn't made, and the run is refused.
Related limits: an account-wide limit and the account's alerts are set in Usage Limits. The strictest limit that applies wins.
Add a limit
The Credit Usage window opens under the line Control how many credits, tokens or dollars this agent can consume. A How it works note explains Cap the credits, tokens or dollars this agent can consume per period or per conversation. Executions beyond a cap are rejected until the period resets or a new conversation starts. Select the × on the note to dismiss it. Until you add a limit, the window reads Nothing configured yet.
The limits table
Once you add limits, the window lists them in a table. An agent can have several at once, for example a daily limit and a weekly limit.

Period
The duration, with when it resets beneath it: Resets every day at 00:00 UTC for a daily limit, and Resets every Monday at 00:00 UTC for a weekly one.
Value
The cap, written in the limit's unit: 12,000 credits for credits, or $225.00 for dollars.
Type
The kind of limit. A Hard Limit refuses the agent's next model call when it is reached.
(menu)
The ⋮ menu at the end of the row has Edit and Delete.
Add Limit, at the bottom left, opens the form below. Done, at the bottom right, closes the window. Limits are listed in the table as soon as you add them.
Select Add Limit. The Add Usage Limit form opens.
Choose a Duration: Daily, Weekly, Monthly, or Per Conversation. It starts on Daily.
Choose a Limit Type. It starts on Credits.
Enter the Limit, for example
10000. The field suggestse.g. 10000.Select Add, then Done. Select Cancel to close the form without adding anything.
The form validates the limit as you type. A credits limit can't exceed 1,000,000 credits. Above that, the field turns red and reads Cannot exceed 1,000,000 credits.
Daily, Weekly, Monthly
Credits, Dollars ($)
What the agent has used since the period started
Per Conversation
Credits, Tokens, Dollars ($)
What the agent has used so far in that one conversation
The Limit Type list offers Credits and Dollars ($) for a period, and adds Tokens for Per Conversation. Tokens limits are available only for Per Conversation. For a period, use credits or dollars. A token count adds input, output, and cached tokens for every model call in the conversation. Token limits take whole numbers.
Limits that were saved before this release keep working, and their type is Credits.
Edit or delete a limit
Open a row's ⋮ menu and select Edit to change the limit, or Delete to remove it. A deleted limit stops applying to the agent.
What happens at a limit
Before each model call, the platform compares the agent's usage with each limit. If usage has reached the limit, the call is refused with a message of the form The <period> <unit> usage limit configured for this agent has been reached: <used> used of the <allowed> allowed. The period and the unit match the limit that was reached.
Because the check runs before the call, a call that starts just under the limit can finish over it. The next call is refused.
Notes and limitations
A conversation that began before per-conversation tracking was added is never capped. A new conversation starts counting from zero.
The check doesn't block a call it can't attribute. If the platform can't tell which agent or billing account a call belongs to, the call goes through.
Per-conversation limits need a conversation. A run with no conversation isn't subject to a Per Conversation limit.
Related
Last updated
Was this helpful?

