Learn how to set spending caps on your AI agent's Agent Guardrails to control costs and prevent overspending.
Setting Spending Caps
Spending caps let you control exactly how much your AI agent can spend. They're the primary guardrail for keeping costs predictable.
What is a Spending Cap
A spending cap is a maximum credit limit on an Agent Guardrail. Once the cap is reached, your agent can no longer make tool calls using that Agent Guardrail until you increase the cap or reset it.
Spending caps protect you from runaway costs. Even if your agent enters a loop or makes more calls than expected, it can never exceed the cap.
Setting a Cap
Open your Agent Guardrail
From the dashboard, go to Control Center → Agent Guardrails and select the guardrail you want to configure.
Find spending controls
Look for the Spending Cap section in your Agent Guardrail settings.
Set the limit
Enter the maximum number of credits this guardrail can spend. For example, 1,000 credits = $10.00.
Save
Click Save to apply the cap. It takes effect immediately.
Cap Strategies
Conservative -- Set low caps (100-500 credits). Good for testing new tools. Increase as you gain confidence. Best for getting started.
Production -- Set higher caps based on expected usage. Monitor spending in Agent Activity. Adjust based on actual patterns. Best for established workflows.
Multiple Agent Guardrails for Different Tasks
A powerful pattern is creating separate Agent Guardrails for different types of work:
| Guardrail | Tools | Cap | Purpose |
|---|---|---|---|
| Research | Web search, summarizer | 500 credits | Daily research tasks |
| Content | Image generation, writing tools | 2,000 credits | Content creation projects |
| Testing | Various | 100 credits | Trying out new tools |
This gives you granular control over spending by category.
What Happens When the Cap is Reached
When an Agent Guardrail hits its spending cap:
- Your agent receives an error indicating the guardrail is exhausted
- No further tool calls can be made with that guardrail
- Your existing results and data are unaffected
- You can increase the cap at any time to resume
On-Chain Spending Controls
If you're using an x402 wallet, spending controls are enforced at the smart contract level:
- Per-transaction limits -- Maximum USDC per single tool call
- Time-based limits -- Maximum spend per time period
- Contract-level caps -- Hard limits enforced on-chain, not just in the app
For maximum protection, use both app-level spending caps on your Agent Guardrails and on-chain limits on your wallet. This provides two independent layers of cost control.
Monitoring Spend vs. Cap
Your Agent Guardrail settings show:
- Current spend -- How much has been used so far
- Remaining -- How much is left before the cap
- Cap utilization -- Percentage of cap used
You can also view this information in the Agent Activity tab alongside your tool call history.
Next Steps
Create custom workflows for your business.
Start automating your workflows today.
Free to start. No credit card required.

