←All use cases

Pay With Locus · USDC wallets on Base

AI Agent Spending Limits

Enforce budget controls, per-transaction limits, and approval thresholds on every AI agent transaction. Never worry about runaway spending.

Updated

Why spending limits matter for AI agents

Giving an AI agent the ability to spend money is powerful — but without guardrails, it's dangerous. An agent stuck in a retry loop could drain hundreds of dollars in minutes. A hallucinating agent could authorize payments to the wrong service. A compromised API key could lead to unauthorized spending. Spending limits are the safety net that makes autonomous agent payments practical for production use. Locus provides a three-layer policy engine that checks every single transaction before it executes, giving you fine-grained control over how much your agents can spend, when, and on what.

Locus's three-layer policy engine

Layer 1: Global user limits

Set a maximum total spend across all your wallets and agents. This is your hard ceiling — no matter how many agents you run, total spending cannot exceed this limit. Configure lifetime, monthly, weekly, or daily caps.

Layer 2: Per-wallet session budgets

Each wallet has its own budget. When you create a session key for an agent, you define how much that session can spend. Once the budget is exhausted, the session key stops working until you top it up or create a new session.

Layer 3: Custom policy groups

Create named policy groups with specific rules — for example, a "research" policy that allows up to $50/day on search and LLM APIs, or a "production" policy with $500/month on code execution. Assign policies to wallets flexibly.

Per-transaction controls

Beyond aggregate budgets, Locus enforces rules at the individual transaction level. Every API call or payment is checked before execution.

  • •Max per-transaction amount — Set the maximum USDC an agent can spend in a single API call or payment. Prevents accidentally calling an expensive endpoint with a large payload.
  • •Approval thresholds — Transactions above a certain amount can require human approval before executing. For example, auto-approve anything under $5 but flag purchases over $5 for review.
  • •Rate limiting — Limit the number of transactions per minute or per hour to prevent runaway loops from draining the wallet.
  • •Endpoint allowlists — Restrict which APIs or services the agent is permitted to call. An agent assigned to research doesn't need access to image generation endpoints.

Real-world scenarios

A customer running an autonomous research agent sets a $20/day budget with a $2 per-transaction limit. The agent calls Tavily for web search, Anthropic's Claude for summarization, and CoinGecko for market data at each tool's published price. It operates freely within those bounds. If it encounters a retry loop, the per-transaction limit prevents any single call from being expensive, and the daily budget caps total exposure. The human operator reviews the audit trail the next morning and adjusts policies as needed — without ever having been woken up at 3 AM for an approval.

Related resources

Frequently asked questions

What happens when an agent's session budget runs out?

The session key stops working. It stays blocked until you top it up or create a new session.

Can I require human approval for large agent payments?

Yes. Set an approval threshold so transactions above an amount wait for a person. For example, auto-approve anything under $5 and flag larger purchases for review.

How do spending limits stop a runaway retry loop?

A per-transaction limit keeps any single call from being expensive, and rate limits cap how many transactions run per minute or hour. A daily or monthly budget caps total exposure.

Can I limit which APIs an agent can pay for?

Yes. Endpoint allowlists restrict which APIs or services an agent may call. A research agent does not need access to image generation endpoints.