Output Token Limit
Get alerted when an AI agent's responses run longer than your token budget. Output Token Limit watches output tokens over a window and opens a violation when it passes your limit.
Long answers cost more and slow users down. If a prompt change makes your agent ramble, you want to know the same day. Output Token Limit watches how many tokens the model writes and opens a violation when they run past your budget.
The template starts at Avg of output tokens above 4000, checked Daily, with Warning severity. You can change every value.
What Happens
| What Traccia sees | Result |
|---|---|
| The window is at or under your limit | No violation. |
| The window goes over your limit | A violation opens. With Warn or Block, the next governed run is warned or stopped. |
| It drops back under the limit in the same window | The violation resolves on its own (Auto Resolved). |
This runs after the trace is accepted, so the run that triggered it is never undone. Observe records the violation. Warn also warns the next governed run. Block stops the next governed run. Ingest never rejects a trace because of a policy.
Set It Up
- In the app, open Policies and click Create Policy.
- Choose Output Token Limit under After Run.
- Give the policy a name and pick its scope: the organization, a workspace, or one Agent ID.
- Leave Metric on Output Token Count. Pick an Aggregation: Avg for typical response length, Max for the single longest, Sum for total tokens written. Set the Threshold in tokens and the Frequency.
- Pick a mode. Observe only records. Warn and Block act on the next governed run.
- Turn on Email Alerts if you want mail when a violation opens.
- On Review, run Simulate Last 7 Days to see how often it would have matched, then click Activate Policy.
Good To Know
- Output Token Limit looks at finished traces. It does not cut a response short.
- Spend Cap limits what a call costs in dollars. It does not limit tokens, so use this policy when token count itself is what you care about.
- Pair it with Input Token Limit to watch both sides of the conversation.
Where You See Results
Next Steps
© 2026 Traccia.