AgenTomte

August 10, 2026 · 7 min read

AI agent guardrails for production: the layers that hold

By Anna, co-founder, build and content

AI agent guardrails for production are the controls that let an agent run without someone watching every action: tool permissions scoped to the smallest set of actions the job needs, rate limits and spend caps, approval gates on anything that touches a customer or money, a human merge step before changes ship, and an audit log you can replay after the fact. Skip any one of those and the agent stops being unattended. It just becomes unsupervised.

Most teams find out the difference the first time something goes wrong.

What guardrails does an agent need before it runs unattended?

Five things, in this order: scoped tool permissions so a runaway loop cannot touch what it does not need, a rate limit or spend cap so the loop is cheap even if it happens, an approval gate on the specific actions that are hard to undo, a human merge step before anything reaches production, and an audit log that shows exactly what ran and why. Miss one and the others end up compensating for it, badly.

Blast-radius scoping comes before anything else

Scoping means the agent gets read access to the systems it needs and write access to nothing else by default. OWASP’s Top 10 for Agentic Applications for 2026, released December 9, 2025 by the OWASP GenAI Security Project, names “least agency” as a core principle: grant an agent the minimum autonomy required for a bounded task, because tool misuse and privilege abuse are two of the failure modes that show up most once an agent has more reach than the job requires.

In practice that means a support agent that reads a ticket and drafts a reply does not also hold the key that issues refunds. A reporting agent that reads a ledger does not get write access to the ledger.

Scoping is tedious to set up correctly. It is also the one guardrail that caps how bad the worst case can get, before anything else even runs.

Rate limits and spend caps stop a bug from becoming a bill

Anthropic’s April 9, 2026 post on making Cowork ready for enterprise describes admin-set group spend limits, a control that caps what a team or an agent can spend before a human has to raise it manually. That pattern is worth copying regardless of which model or platform sits underneath your build.

A cap does not make an agent smarter. It makes its mistakes cheap. An agent stuck retrying a paid API call, or one that decides to reprocess an entire dataset instead of the ten records it was asked for, is a rounding error under a cap and a real incident without one. We set both on every fleet we run: a ceiling on calls per hour, and a ceiling on spend per day, independent of whether the agent believes it is behaving correctly.

Where approval gates actually belong

The Claude Agent SDK’s permissions system, live since the SDK launched on September 29, 2025, runs every tool call through a four-layer pipeline: deny rules first, then the permission mode, then allow rules, then a runtime canUseTool callback that can halt execution and wait for a person. Permission modes range from full auto-approval, fine for read-only actions, to a mode where that callback stops the agent cold until someone signs off.

Gates belong on actions, not on agents. An agent can be trusted to draft an email without being trusted to send it, trusted to open a pull request without being trusted to merge it. Put the gate at the point where the action gets hard to undo, not earlier.

Gate everything and the approval stops meaning anything. Nobody reads the fiftieth one the same way they read the first.

The human merge step catches what the gates miss

Our own blog publishing pipeline runs on this pattern directly. A queue of drafts moves through a build check and a content scan, and nothing goes live until a human, or an automated merge step gated by those checks, lets it through. The agent does the drafting. It does not do the publishing.

That split is the guardrail, not a formality bolted on afterward. A human merge step has nothing to do with distrusting the model; it is one deliberate checkpoint between “the agent produced this” and “this is now true in production,” so a bad output costs a review cycle instead of a live incident.

Audit logs turn “what happened” into a question you can answer

Anthropic’s April 2026 enterprise post also describes what a usable audit trail actually records: tool and connector calls, files read or modified, which skills ran, and whether each AI-initiated action was approved manually or automatically. That last field is the one most homegrown logging skips, and it is the one you need most, because “the agent did X” and “a human approved the agent doing X” are different facts with different consequences.

A log without that distinction tells you what happened. A log with it tells you whether your guardrails were being used, or just sitting there unenforced while everything ran through on auto-approval anyway. Replayability is the whole point: if you cannot reconstruct the sequence of tool calls and approvals that led to an outcome, you do not have an audit log, you have a history of outputs.

Unattended, gated, or human-merge: what each posture costs you

Unattended, gated, and human-merge describe three postures toward an action, not three levels of trust in the model. Unattended costs nothing per action but concentrates all the risk into scoping and caps done correctly up front. Gated and human-merge each cost a delay per action, in exchange for a person seeing the decision before it becomes permanent.

Match the posture to how reversible the action actually is.

PostureWhat runs without a personWhat it stopsWhat it costs you
Fully unattendedRead-only lookups, internal drafts, reports nobody acts on directlyNothing, by design, if scoping and caps holdDemands the tightest scoping, no per-action delay
Approval-gatedEverything up to the specific gated action, which pauses for a decisionIrreversible or customer-facing actions going out uninspectedA delay measured in how long someone takes to look, per gated action
Human mergeThe agent’s output sits in a queue until a person or a passing check lets it throughA bad draft or a bad change becoming the live versionA review cycle before anything ships, on every change

When a gate or a merge step gets skipped anyway and something bad ships, the next guardrail that matters is whether you can undo it. That means changes move through something reversible, a pull request, a draft state, a versioned record, rather than a direct write with no history behind it. Anything an agent touches with no undo path is not something that belongs unattended, full stop.

Deciding what actually earns full autonomy

Most organizations are not close to having this solved by default. McKinsey’s State of AI in 2025 report, published November 2025 from a survey of 1,993 respondents fielded in June and July 2025, found 62% of organizations experimenting with AI agents but only 23% scaling them past pilots. High performers were far more likely than everyone else to have defined human-in-the-loop validation, 65% versus 23%. That gap is the guardrail gap. The agents are not worse at the companies stuck at 23%. Those companies just never decided, in writing, which actions need a human and which do not.

Stanford HAI’s 2026 AI Index Report, covering 2025 data, is a useful check on how much to trust an agent by default: task success on the OSWorld benchmark went from roughly 12% to about 66% over the year, real progress, but agents still fail on the order of one in three attempts on structured benchmarks. A one-in-three failure rate is fine for a draft a human will review before it goes anywhere. It is not fine for an action with no undo path. The question worth asking before anything runs unattended is not whether the agent is usually right. It is what happens the one time in three it is not, and whether that outcome is a shrug or an incident.

AI agent vs. automation goes deeper on which jobs should be agents at all versus a fixed script, which is the decision that comes before any of this. Getting that choice wrong upstream is usually why the guardrails downstream feel like they are fighting the system instead of protecting it.

We build these controls into every system we hand over, because a system nobody can leave running unattended isn’t saving anyone real time. It’s supervised work wearing an AI badge.

Our AI Workforce Sprint scopes the permissions, the caps, and the audit trail into the build from week one, not added after something breaks. The same discipline sits underneath our ad spend reconciliation build, where every number the system produces has to trace back to the ledger line it came from, because a reconciliation nobody can audit is not one anyone should trust. For the shorter version of how a build like this gets scoped end to end, our sprint walkthrough covers the weeks in order.

Describe the job you want running unattended and what it touches, and you get a written answer back within one business day: which parts can run without you, which need a gate, and what the audit trail looks like. No discovery call, no meetings. Start async.

Tell us what you want automated

Describe the work in writing. You get a written reply within one business day: a fixed-price proposal, a scoping question, or an honest referral out.

Start at /start

▸ written reply within one business day · no call scheduled, ever

Doesn't fit a package? Tell us what you need anyway.

Questions? Ask in writing

no chatbot · a human replies

Ask us anything, in writing

A founder replies within one business day. That is the same promise clients get.