{
  "page": "guides/ai-agent-spending-limits",
  "title": "How to set spending limits for AI agents",
  "path": "/guides/ai-agent-spending-limits",
  "kind": "guide",
  "description": "Why limits belong in the API and not in the agent's prompt, which limits to set, and what should happen when an agent hits one.",
  "updated": "2026-10-23",
  "blocks": [
    {
      "type": "p",
      "text": "Set spending limits where the agent can't change them: in the API that charges it, not in its prompt or code. You need three: a monthly budget per agent, an approval threshold per purchase, and a key you can revoke at once."
    },
    {
      "type": "h2",
      "id": "prompt",
      "text": "Why not in the prompt"
    },
    {
      "type": "p",
      "text": "A prompt is advice. A loop, a bad tool result or a prompt injection can make an agent ignore it. A limit the API enforces holds even when the agent misbehaves."
    },
    {
      "type": "h2",
      "id": "which",
      "text": "The limits to set"
    },
    {
      "type": "table",
      "caption": "Spending limits for an AI agent",
      "head": [
        "Limit",
        "Why",
        "Arettic default"
      ],
      "rows": [
        [
          "Monthly budget per agent",
          "Caps the worst month",
          "$50"
        ],
        [
          "Approval threshold",
          "Catches one big mistake",
          "$20 a request"
        ],
        [
          "Revocable key",
          "Stops a runaway agent now",
          "Revoke in the dashboard or API"
        ],
        [
          "IP allowlist",
          "Stops a leaked key working elsewhere",
          "Off"
        ]
      ]
    },
    {
      "type": "h2",
      "id": "at-the-limit",
      "text": "What should happen at the limit"
    },
    {
      "type": "p",
      "text": "Failing the purchase loses the work. Asking a person keeps it. On Arettic, a purchase over a limit returns `approval_required`, every owner gets a one-click email, and the agent sends the same request again once it's approved."
    },
    {
      "type": "h2",
      "id": "per-agent",
      "text": "One budget per agent"
    },
    {
      "type": "p",
      "text": "Give each agent its own key, so one runaway agent can't spend another's budget. Agents are unlimited on every Arettic plan. Every limit is on [spending limits](/limits)."
    }
  ],
  "questions": [
    {
      "question": "What's a sensible budget for a new agent?",
      "answer": "Start low and raise it once you've seen a month of spend. Arettic's default is $50 a month and $20 a request, and you can change both at any time."
    },
    {
      "question": "Do failed calls use up the budget?",
      "answer": "No. A failed call is refunded, so it doesn't count as spend."
    }
  ]
}