Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nolma.ai/llms.txt

Use this file to discover all available pages before exploring further.

Budget Rules

Budget rules stop spend before the LLM call fires. When a limit is hit Nolma returns HTTP 429 immediately — the LLM provider never receives the request.

Creating a budget rule

Dashboard → Guard → Budgets → Add rule

Scope types

ScopeWhat it limits
orgAll agents in your organization
agentOne specific agent by name
userOne end user (NM-User header)
modelOne LLM model
envOne environment (prod/staging/dev)

Enforcement modes

ModeWhat happens at the limit
hard_blockReturns 429, no LLM call made
auto_downgradeSwitches to cheaper model
throttleSlows request rate
alert_onlySends alert, allows through

Example rules

Daily limit per agent:
FieldValue
Scopeagent → support-bot
Limit$15.00
Perioddaily
Modehard_block
Alert at80%
Monthly org-wide limit:
FieldValue
Scopeorg
Limit$500.00
Periodmonthly
Modehard_block
Alert at70%

Budget templates

New accounts can apply a template from the Budgets page:
  • Conservative — $10/day hard block. Good for development and testing.
  • Growth — $100/day soft limit with auto-downgrade at 80%. Good for production startups.
  • Enterprise — $1,000/month org-wide. Good for regulated companies.

What happens when a limit is hit

Your agent receives:
{
  "error": {
    "type": "NM_BUDGET_HARD_LIMIT",
    "message": "Agent 'support-bot' daily budget of $15.00 exceeded.",
    "spent": 15.43,
    "limit": 15.00,
    "period": "daily",
    "reset_at": "2026-05-22T00:00:00Z",
    "agent": "support-bot"
  }
}
Handle this in your code:
try:
    response = client.messages.create(...)
except anthropic.APIStatusError as e:
    if e.status_code == 429:
        error = e.response.json()["error"]
        if error["type"] == "NM_BUDGET_HARD_LIMIT":
            print(f"Budget hit. Resets: {error['reset_at']}")

Emergency kill switch

Stop ALL agents instantly: Guard → “Pause all agents” button. All LLM calls return 429 immediately. Click “Resume all agents” to restore.