AI Agent Guardrails: Budgets, Approvals, and Kill Switches
An autonomous AI agent is software that decides its own next step. That is the whole point of using one, and it is also the whole problem. A workflow that runs the same five steps every time can only fail in five places. An agent that plans its own path can fail in places you never imagined, at 3 a.m., on its fortieth loop through the same broken API call.
Guardrails are the answer, and they are not one thing. A useful guardrail system is a stack of independent limits, each of which can stop an agent even if every other limit fails. This article walks through that stack in concrete terms: token budgets per run and per day, step caps, time caps, approval gates on write actions, auto-pause after repeated failures, a stop button for runs in flight, and pause as a kill switch for everything queued behind them.
We will use Skopx's implementation as the running example, because it is the system we build and can describe honestly, mechanics included. The principles transfer to any agent platform, and if a platform you are evaluating cannot answer "what stops this agent when it goes wrong," that is your answer about the platform.
Why autonomous agents need hard limits, not just good prompts
The first instinct most people have is to write better instructions. "Never send more than one email." "Stop if you see an error." Instructions matter, and we have a whole guide on writing agent instructions that actually constrain behavior. But instructions are soft limits. The model interprets them, and interpretation can drift, especially deep into a long run when the context is full of tool results and the original instruction is a small paragraph far behind.
Hard limits are different. They live outside the model, in the run loop itself. The agent cannot argue with a token budget. It cannot reinterpret a step cap. When the counter hits the line, the run stops, whatever the model was in the middle of planning.
The failure modes hard limits protect against are mundane, which is exactly why they happen:
- Loops. An API returns an ambiguous error, the agent retries, gets the same error, retries again. Without a step cap this continues until something external stops it.
- Scope creep. You asked for a summary of this week's support tickets. The agent decides context would help and starts reading last quarter's too. Each read is individually reasonable. The sum is a run ten times the size you expected.
- Runaway spend. Every step costs tokens. A run that should take 15 steps and takes 300 costs twenty times what you budgeted, and if it runs on a schedule, it does that every day until someone notices.
- Wrong writes. The worst category: the agent does not stall, it acts, and the action is wrong. It sends the email to the wrong list, or closes tickets that were not resolved.
Each failure mode gets its own guardrail. That is the design principle worth internalizing: one guardrail per failure mode, each enforced independently.
Token budgets: per run and per day
Tokens are the raw fuel of an agent run. Every model call consumes them, and consumption tracks effort: a run that reads more, reasons more, or loops more burns more tokens. That makes token counts a surprisingly good proxy for "is this run behaving normally," on top of their obvious role as a cost control.
Skopx agents carry two token budgets, and the distinction matters:
Tokens per run caps a single execution. Set it a comfortable margin above what a healthy run needs. If your inbox triage agent normally uses a modest amount per morning run, a per-run budget of two or three times that number gives it room for a heavy day while guaranteeing that a pathological run cannot go far past normal. When a run hits its budget, it stops. It does not get to negotiate.
Tokens per day caps the agent across all its runs in a day. This is the guardrail the per-run budget cannot provide. Imagine a webhook-triggered agent and an upstream system that starts misfiring, sending the webhook every few seconds. Every individual run might finish under its per-run budget, but you are now paying for hundreds of runs. The daily budget is the backstop: once the agent has spent its daily allowance, further runs do not start until tomorrow.
The two budgets fail independently, which is the point. A single enormous run trips the per-run cap. A swarm of normal-sized runs trips the daily cap. You need both, and we go deeper on sizing them in our guide to setting token budgets for AI agents.
One honest caveat: a token budget is a blunt instrument. It cannot tell a productive expensive run from a wasteful one. It will occasionally stop a legitimate run that happened to be heavy. That trade is worth making, because the alternative, no ceiling, converts every rare failure into an unbounded one. When a budget stops a legitimate run, you raise the budget deliberately, with the run's report in front of you. That is a decision, not an accident.
Step caps and time caps
Token budgets measure fuel. Step caps and time caps measure motion, and they catch problems that fuel metering misses.
Max steps limits how many tool calls and reasoning turns a run may take. Its main job is loop-breaking. A stuck agent retrying a failed call burns steps fast and tokens slowly, so the step cap often fires first, which is what you want: it stops the loop in seconds rather than after a long token burn. It also enforces a shape on the work. If you built an agent to do a focused job in roughly a dozen steps, a max-steps setting of 25 declares that any run taking 26 steps is by definition not the job you designed, whatever the agent thinks it is doing.
Minute cap limits wall-clock time. Some failures burn neither tokens nor steps quickly: an agent waiting on a slow external service, or a browser tool grinding through a page that never finishes loading. The time cap catches those. It also protects schedules. An agent that runs every hour should never still be running when its next slot arrives, and a minute cap well under the schedule interval guarantees it.
Every Skopx agent has all four of these numeric limits: tokens per run, tokens per day, max steps, and the minute cap. They are set per agent, because a quick Slack summarizer and a deep web research agent have legitimately different shapes, and one global limit would be wrong for both.
Approval gates: the guardrail on actions
Budgets and caps bound how much an agent does. They say nothing about what it does. For that, you need permissions on actions, and the critical distinction is reads versus writes.
Reading is low-risk. Fetching emails, querying a database, checking a calendar: if the agent reads the wrong thing, you have wasted tokens and nothing else. Writing is where real damage lives. Sending, posting, updating, deleting: these touch the world outside the agent.
Skopx grants tools per integration toolkit, and each grant carries a tier:
- Runs automatically. The agent uses the tool freely. Appropriate for reads, and for writes you have watched succeed enough times to trust.
- Asks first every time. Every write-shaped action parks as a pending approval instead of executing. You see the exact call and its exact arguments, the literal payload, not a summary. Approving executes exactly that parked call, once. Rejecting executes nothing. Approvals can expire, so a stale request from three days ago cannot fire into a changed situation.
- Agent decides when to ask. The middle tier: routine actions flow, and the agent escalates the ones it judges unusual. Useful once trust is established, with the honest caveat that you are trusting the agent's judgment about what counts as unusual.
- Drafts only. The agent prepares the artifact, an email draft, a proposed update, and never sends it. You review and send from your own tools.
Two mechanical details carry most of the safety value. First, under approval-required mode, reads still flow without approval. This matters more than it sounds: if reads also required sign-off, you would face dozens of trivial prompts per run, you would start rubber-stamping, and the approval on the one write that mattered would get the same reflexive click as everything else. Gating only writes keeps the queue short enough that each item gets real attention. Second, approval is of the exact parked call. The agent cannot get a "yes" to one thing and execute a variation. What you approved is what runs, byte for byte.
The standard rollout pattern is to start every new agent's write tools at drafts-only or ask-first, watch a week of runs, then promote specific tools to automatic one at a time as they earn it. We cover this progression in detail in our guide to AI agents with human approval.
Auto-pause: the guardrail that watches the guardrails
A single failed run is information. Repeated failed runs are a pattern, and a pattern of failures on a scheduled agent means the same failure will repeat forever on schedule, spending its budget each time, until a human intervenes.
Skopx closes this loop automatically: three budget failures auto-pause the agent. An agent that keeps slamming into its limits stops getting new runs entirely. No further scheduled executions, no further spend, until a person looks at what is wrong, fixes the instructions or the budget or the broken integration, and unpauses it.
This is a second-order guardrail, a guardrail on guardrail violations, and it encodes an important piece of honesty: budget limits contain individual bad runs, but only auto-pause contains a systematically broken agent. Without it, a per-run budget on a daily agent just converts "unbounded failure" into "bounded failure, daily, forever." With it, the system degrades toward silence rather than toward waste.
When an agent auto-pauses, the diagnostic trail is already there. Every run keeps a full step timeline, and the failed runs show exactly where the budget line was crossed and what the agent was attempting. Our guide to debugging agent runs walks through reading those timelines.
The stop button and the kill switch
Everything above is automatic. You also need manual controls, and you need two distinct ones, because there are two distinct emergencies.
Stop a run. A run is in flight and you can see, from its live step timeline, that it is heading somewhere wrong. You stop it mid-flight. The run ends where it is. This is the scalpel: one run, right now.
Pause the agent. Something is wrong at the agent level, bad instructions just went live, an upstream system is feeding it garbage, or you simply are not sure and want everything to hold. Pausing an agent is a kill switch for its queued runs: nothing pending executes, nothing scheduled fires, until you unpause. This is the breaker switch: the whole agent, until further notice.
The property that makes a kill switch trustworthy is that it always wins. In Skopx, stopping always wins: there is no agent state in which the stop or pause control is unavailable or deferred. A kill switch that only works when the agent is behaving is decoration. The details of both controls, including what happens to partially completed work, are in our guide to stopping and pausing AI agents.
One limit worth stating plainly: stopping a run does not undo tool calls that already executed. If step 6 sent a message and you stopped at step 9, the message was sent. This is precisely why approval gates exist on write actions, and why the layers below matter. Stop buttons bound the future. Only approval gates bound the writes.
The full guardrail stack at a glance
| Guardrail | What it bounds | Catches | Enforced by | Automatic or manual |
|---|---|---|---|---|
| Tokens per run | Cost and effort of one run | Runaway single runs, scope creep | Run loop | Automatic |
| Tokens per day | Total daily spend per agent | Trigger storms, too-frequent runs | Run loop | Automatic |
| Max steps | Actions per run | Retry loops, wandering | Run loop | Automatic |
| Minute cap | Wall-clock time per run | Hangs, slow external services | Run loop | Automatic |
| Approval tiers | Which writes execute | Wrong or premature actions | Grant system, per toolkit | Human decision per call |
| Drafts-only mode | Sending anything at all | All send-shaped mistakes | Grant system | Human sends manually |
| Auto-pause (3 budget failures) | Repeat offenders | Systematically broken agents | Platform | Automatic |
| Stop button | One run in flight | A run visibly going wrong | Human | Manual |
| Pause (kill switch) | All queued and future runs | Agent-level emergencies | Human | Manual |
Read the table top to bottom and a structure emerges: the automatic numeric limits contain cost and motion, the approval system contains actions, auto-pause contains repetition, and the manual controls contain everything else. No single row is sufficient. Together they mean an agent's worst day is bounded on every axis you care about: money, time, actions, and repetition.
Verification: guardrails you can audit
A guardrail you cannot verify is a claim, not a control. The last layer is transparency, and it is what turns the rest of the stack from "trust us" into "check for yourself."
Every Skopx run produces a step timeline with humanized labels and expandable raw results, plus the run's duration and token count, and ends in a markdown report. Run history is append-only: nothing is edited after the fact, failures and stopped runs stay on the record next to the successes. That means you can audit guardrails directly. Did the run stay under budget? The token count is on the run. Did the agent only touch the toolkits it was granted? The timeline lists every call. Did the approval gate hold? The parked calls and their outcomes are recorded. Success criteria you define for the agent are evaluated in the run report, so "did it do the job" is answered alongside "did it stay inside the lines."
Memory helps here too, in a way that is easy to miss. Skopx agents keep memory between runs: cursors, baselines, what was already seen. A second run that picks up from a cursor does less redundant work, produces a delta report instead of re-deriving everything, and is typically cheaper. Efficient agents live further from their budget lines, which means the budgets can be tighter, which means the guardrails are doing more work. Efficiency is itself a safety property.
All of this is configured in plain language when you build the agent. On Skopx's Create Agent you describe the agent in chat, and the assembled agent carries its instructions, trigger, grants, budgets, and success criteria as inspectable, editable settings. No code, and no canvas, but also no black box: every limit is visible before the first run.
FAQ
What guardrails should every AI agent have before its first real run?
Minimum set: a per-run token budget, a max-steps cap, a time cap, and write actions gated behind approval or drafts-only mode. Add a daily token budget if the agent runs on a schedule or a webhook, since those triggers can fire more often than you expect. First runs should be manual triggers so you are watching the step timeline live. Our guide to testing agents safely covers a fuller pre-launch sequence, but those four limits are the floor, not the ceiling.
How do I size a token budget without guessing?
Do not size it in advance. Run the agent a handful of times with a generous budget and its writes gated, look at the actual token counts on the run history, and set the per-run budget at two to three times the typical healthy run. Set the daily budget at expected daily runs times the per-run figure, plus margin for a heavy day. Then tighten over time as memory kicks in and runs get cheaper. Budgets set from real runs are defensible; budgets set from intuition are usually either uselessly loose or trip constantly.
What is the difference between stopping a run and pausing an agent?
Stopping ends one run that is currently executing; the agent itself stays active and its next trigger fires normally. Pausing the agent is the kill switch: it halts queued runs and prevents any new ones, scheduled or otherwise, until you unpause. Stop is for "this run is going wrong." Pause is for "I do not want this agent doing anything until I have looked at it." Neither one retroactively undoes tool calls that already executed, which is why write actions get approval gates in the first place.
Do approval gates slow agents down too much to be useful?
Less than you would expect, for one structural reason: reads flow without approval even under approval-required mode. An agent can do all of its gathering, querying, and analysis at full speed, and only the write-shaped actions park for review. For most monitoring and reporting agents that is zero or a handful of approvals per run. The slow path is reserved for exactly the actions where slowness is the feature. If an agent generates so many write approvals that reviewing them is a burden, that is usually a sign the agent's scope is too broad, not that the gate is too strict.
Can an agent raise or bypass its own limits?
No, and this is the property to verify on any platform you evaluate. In Skopx, budgets and caps are enforced by the run loop outside the model, grants are fixed at dispatch, approval executes only the exact parked call, and pausing always wins over anything the agent is doing. The agent's intelligence operates inside the limits; it has no channel to operate on the limits. Instructions can ask an agent to be careful. Only architecture can make carefulness non-optional.
Where to go next
Guardrails are one pillar of running agents responsibly; the other is knowing what your agents actually did. Pair this article with our guides to run transparency and agent audit trails for the observability side, and the AI agent security checklist for the credential and data-handling side.
If you want to see the full stack in one place, budgets, grants, approvals, auto-pause, and the kill switch are all standard equipment on every agent built through Skopx. Describe the agent in chat, set the limits in plain language, and start it with the guardrails already up. The point of autonomy is not that nobody is watching. It is that the watching is built in.
Skopx Team
The Skopx engineering and product team