Answer

How do you stop an AI agent doing something expensive or wrong?

This is the question every serious buyer asks second, right after price.

The five layers

A production AI agent is kept safe by five controls working together: human approval gates on anything irreversible or money-touching, scoped permissions so an agent can only reach the systems its job requires, hard spend caps that stop runaway model usage, an audit trail recording what the agent did and on what basis, and reversibility — no action taken that cannot be undone without a human decision.

This is the model built as TripWire for the Microsoft agentic-security hackathon, and it is what every client build inherits rather than an enterprise upsell.

The failure everyone worries about, and the one that actually happens

The imagined failure is an agent going rogue. The real failure is far more boring: an agent doing exactly what it was told, at volume, when the instruction was slightly wrong. Approval gates and spend caps catch the second case, which is the one that shows up.

A concrete example from my own systems: a chat endpoint without rate limiting is one scripted loop away from a large API bill. That limiter exists because of a real incident, not a hypothetical one.

Common questions

Will approval gates make the automation useless?
They are set by threshold, not applied to everything. Routine work runs unattended; the exceptions and the expensive decisions surface to you. Getting those thresholds right is a real part of the build.
Can I see what the agent did?
Yes — audit trail per action, including what triggered it and what it based the decision on. If a system cannot tell you that, it should not be touching your operations.

Describe the problem in your own words.

No technical language needed. I reply personally within 24 hours. Most engagements start with a ₹35,000 Diagnostic Sprint, credited in full against the project if you proceed within 30 days.

Start here