Agentic tradingRisk managementMCP toolsSafety

How spend caps and drawdown limits protect an MCP trading agent's owner

Spend caps and drawdown limits are hard boundaries that prevent an AI trading agent from deploying too much capital or losing too much value before the owner intervenes.

By the Felix team11 min read
Key takeaways
  • 01A spend cap is a hard budget on how many dollars an agent can put at risk in a given time window, enforced by the API independent of the agent's reasoning.
  • 02A drawdown limit is a hard floor on account value measured from a recent peak, designed to halt trading before losses compound.
  • 03Spend caps control position size and deployment frequency; drawdown limits control outcome risk; neither eliminates the possibility of losing money.
  • 04Both limits are server-side policies set by the owner before authorizing the key, which means an agent cannot override them even if its instructions conflict.
  • 05Start with tight limits in paper trading, then move to small live caps, and expand only after you have observed consistent agent behavior under real market conditions.

A spend cap is a hard budget, expressed in plain US dollars, that restricts how much money an AI trading agent can deploy into new orders and open positions during a fixed period such as a day or a week. A drawdown limit is a hard floor, also set in dollars or as a percentage, that stops the agent from trading once the account value falls by a specified amount from its recent high watermark. Both limits are enforced by the API policy layer, not by the agent itself, which means they remain in effect even if the model changes its mind, hallucinates, or receives contradictory instructions. Together they create a bounded environment where the owner controls the maximum exposure and the maximum acceptable loss independent of the agent's reasoning.

What is a spend cap and how does it work?

A spend cap is an owner-defined budget that controls the total notional value an agent can place at risk across all market types within a rolling or fixed time window. The API tracks every order the agent submits, whether it is for stocks, crypto, perpetual futures, options, or a prediction market, and sums the dollar value of those orders. When the cumulative total reaches the cap, the system rejects any additional order that would increase deployed capital. The agent can still reduce risk by closing or shrinking positions, because those actions free up budget, but it cannot add new exposure until the window resets or the owner manually raises the limit.

The spend cap is often misunderstood as a stop loss, but it is not. It does not protect a position once it is open. If the agent uses its full daily cap to enter a position and that position declines by fifty percent, the account still suffers an unrealized loss proportional to the size of the trade. The cap only prevented the agent from entering a second position of similar size. For this reason, owners usually pair a spend cap with a per-position size limit so that no single order consumes the entire daily budget. They also pair it with a drawdown limit to catch the losses that the spend cap cannot prevent. The enforcement is server side, which means the agent cannot rewrite its prompt, create a new tool call, or otherwise circumvent the boundary. For a broader view of how these boundaries fit into custody and control, see How to set guardrails for a trading agent without giving up custody.

Spend caps are especially useful for agents that trade frequently or across multiple venues. Without a cap, an agent might enter a series of small trades that seem safe in isolation but add up to a concentrated directional bet. The cap forces the agent to ration its deployment, which naturally reduces correlation risk and overtrading. It also gives the owner a predictable maximum daily risk level, which makes capital allocation easier to manage alongside non-trading expenses or other investments.

What is a drawdown limit and how does it differ?

A drawdown limit measures the account value from its highest recent point, called the high watermark, and defines the maximum decline the owner is willing to tolerate before trading must halt. You can configure it as an absolute dollar amount, such as five hundred dollars, or as a percentage of the peak account value, such as five percent. When the account balance drops to that threshold, the API treats the limit as breached and immediately blocks the agent from submitting new orders. Some configurations also trigger an exit plan that flattens existing positions, converting unrealized losses into realized losses and returning the account to cash. Others simply freeze new activity while leaving current positions open, giving the owner time to decide whether to hold or close manually.

The drawdown limit differs from a spend cap in a fundamental way. The spend cap restricts input, or how much money enters the market. The drawdown limit restricts output, or how much value can leave the account. An agent could theoretically stay within a tight spend cap while still hitting a drawdown limit if its positions perform poorly. Conversely, an agent could hit a spend cap every day without ever approaching a drawdown limit if its positions are profitable. This is why the two controls are not substitutes. They address different stages of the risk cycle.

It is worth stating plainly that a drawdown limit does not prevent losses. It only prevents further trading once a loss of a certain size has already occurred. If the market gaps down overnight, the account could blow through the drawdown threshold before the API can react. The limit is therefore a damage mitigation tool, not insurance. It stops the agent from compounding a bad situation by adding fresh risk, but it cannot reclaim money that is already gone.

Why do you need both limits together?

Relying on a single limit creates a predictable blind spot. If you only use a spend cap, the agent could enter a series of small, correlated trades that individually respect the budget but collectively bleed the account. For example, an agent might repeatedly buy small positions in the same sector until the daily cap is exhausted, and then a sector-wide decline wipes out more than the intended daily budget. The spend cap does not see correlation or strategy drift; it only sees dollar totals. By the time the owner notices, the cumulative loss may already be large.

If you only use a drawdown limit, the agent could concentrate the entire account into one or two large positions before the limit is ever tested. A single bad trade might then consume the full drawdown allowance in one move, leaving the account impaired and the owner with a difficult decision about whether to continue. The drawdown limit would have triggered, but only after the damage was done. A spend cap prevents this concentration by forcing the agent to distribute its activity across time and markets.

When both limits are active, they create a narrow corridor for risk. The spend cap limits how fast the agent can go. The drawdown limit limits how far it can fall. A typical configuration for a new agent might be a daily spend cap of two hundred dollars and a drawdown limit of five hundred dollars from peak. This means the agent can trade actively, but it cannot bet the farm, and it cannot lose more than five hundred dollars before human intervention is required. The exact numbers should reflect your personal financial situation and the volatility of the markets you are trading. Never trade with money you cannot afford to lose entirely. You can read more about the overall risk architecture in How to limit risk when AI agents trade through MCP tools and a single API.

How do these limits fit into the MCP safety model?

MCP tools provide the interface between an AI agent and the trading infrastructure, but they do not define the safety policy. The spend cap and drawdown limit live in the API policy layer, which evaluates every request before it reaches a venue. When the agent sends an order through an MCP tool, the API checks the current deployed total against the spend cap and the current account value against the drawdown watermark. If either limit would be breached, the request is rejected and the agent receives an error. This happens regardless of the agent's reasoning, its prompt instructions, or the user's conversational context.

This architecture matters because LLMs are probabilistic. They can misinterpret data, hallucinate strategies, or follow ambiguous instructions in ways the owner did not intend. Hard limits in the API are deterministic. They do not parse intent; they enforce arithmetic. The agent cannot override a spend cap by asking nicely, and it cannot reset a drawdown limit by claiming a new strategy. The owner retains control because the limits are bound to the key, not to the conversation. You can read more about this separation of concerns in How the safety model for MCP trading tools works from first principles.

The limits are also part of a broader non-custodial design. Funds remain in a wallet the owner controls, and the agent can only spend within the boundaries set by the owner. Withdrawal addresses are owner-approved only, so the agent can never send funds to itself. If the limits are breached and the owner decides the agent is no longer trustworthy, the kill switch flattens positions and revokes the key in one action. This layered approach means that no single failure, whether model error or market shock, can cascade into a total loss.

Where should an owner set these limits?

There is no universal formula, but there is a universal principle: start smaller than you think you need. Paper trading exists so you can observe how the agent behaves when it believes it is risking real money, without actually doing so. During this phase, you should test both a tight spend cap and a tight drawdown limit to see whether the agent hits them frequently, rarely, or never. If the agent constantly bumps against the spend cap, you may have given it an overly ambitious strategy relative to its budget. If it hits the drawdown limit quickly, the strategy may be too volatile for the current market conditions.

  1. 01Test in paper trading with a tight spend cap and a tight drawdown limit to observe behavior.
  2. 02Move to live trading with a daily spend cap set at a low single-digit percentage of your total account.
  3. 03Set an absolute drawdown limit at a dollar amount that would make you pause and reassess, rather than a percentage.
  4. 04Review and adjust upward only after a month of consistent data or after any breach.
  5. 05Tighten limits and return to paper trading if the agent behaves erratically.

As you gain confidence and data, you can adjust the limits upward. This should be a deliberate owner action, not a gradual drift. Revisit the limits after each drawdown breach or after a month of consistent trading. If the agent has been profitable and disciplined, you might increase the daily spend cap to allow more diversification. If the agent has been erratic, tighten the drawdown limit and force a longer paper trading review. The goal is to match the agent's autonomy to your actual trust in its behavior, which can only be earned over time. For a step-by-step approach to this process, see How to start an AI trading agent with hard limits.

What happens when a limit is hit?

When a spend cap is reached, the API rejects any new order that would increase the deployed total. Existing positions remain open, and the agent can usually still submit reduce-only orders or exit requests, because those actions decrease risk rather than increase it. The owner receives a notification that the cap has been hit, and the agent may also see an error through its MCP tool. The trading halt lasts until the time window resets or the owner manually adjusts the cap. This pause is automatic and does not require the owner to be watching the market in real time.

When a drawdown limit is breached, the consequences are more severe. The API blocks all new orders, including those that might reduce risk, unless the owner has configured a specific exception. If an exit plan is active, the system may automatically send flattening orders to close all positions across stocks, crypto, perps, options, and prediction markets. The exact behavior depends on the owner settings, but the default posture is to stop adding risk. The owner then reviews the account, evaluates whether the strategy is broken or the market is simply volatile, and decides whether to reset the watermark, adjust the limit, or revoke the key entirely.

In both cases, the agent has no ability to negotiate, override, or hide the breach. The limits are owner-approved parameters that sit outside the agent's reasoning loop. This is the core safety guarantee. Even if the agent is convinced the next trade is a sure opportunity, the API will refuse the order. The owner can always reauthorize or expand limits later, but the initial restriction is absolute. This design acknowledges a simple truth about automated trading: it is better to pause and reconsider than to let an algorithm continue unchecked.

Frequently asked questions

Does a spend cap guarantee that my losses cannot exceed its amount?

No. A spend cap only limits how much capital the agent can deploy into the market. Once a position is open, it can lose value beyond the cap. You need a drawdown limit or stop logic to cap actual realized losses.

Can an agent change its own spend cap or drawdown limit?

No. These limits are owner-controlled parameters set during key authorization. The agent can request trades through its MCP tools, but the API enforces the boundaries. The agent has no ability to modify policy or withdraw funds.

Do drawdown limits reset automatically after a breach?

That depends on the configuration you choose. Some owners prefer a manual reset so they can review the strategy before trading resumes. Others allow automatic reset once the account value recovers above the high watermark. You decide this at setup.

Are these limits available for all market types?

Yes. Because the API normalizes orders in plain US dollars, spend caps and drawdown limits apply uniformly across stocks, crypto, perpetual futures, options, and prediction markets. The policy layer does not depend on the specific venue.

What is the difference between a spend cap and a position limit?

A spend cap controls the total capital deployed across all positions and orders within a time window. A position limit controls the maximum size of a single trade or the exposure in one specific market. They are separate controls that work best when used together.

Should I set a drawdown limit per agent or per account?

Drawdown is typically measured against the account balance tied to an API key. If you run multiple agents, give each one its own scoped key with independent limits. This prevents one agent from consuming another's risk budget.

Give your agent a key.

One key to trade stocks, crypto, perps, options, and prediction markets. Live after owner authorization.

Keep reading

Not a brokerage, exchange, or investment adviser. Not investment advice. Trading involves risk, including total loss.