Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 4 min read

Human Approval Is Not Enough: Building Runtime Enforcement for Autonomous AI Agents

AI agents are becoming increasingly capable of interacting with tools, APIs and enterprise systems. But there is an important question we need to address: When a human approves an action proposed by an AI agent, how do

Human Approval Is Not Enough: Building Runtime Enforcement for Autonomous AI Agents

AI agents are becoming increasingly capable of interacting with tools, APIs and enterprise systems.

But there is an important question we need to address:

When a human approves an action proposed by an AI agent, how do we ensure that the exact action approved is the action that actually gets executed?

A human approval button alone does not answer that question.

An agent might change its parameters after approval. An approval could be replayed. An execution request might arrive twice. A workflow might continue while approval is still pending.

These are not just interface problems. They are runtime control problems.

I've started building an open-source research demonstrator to explore this problem: Enterprise Agent Safety Lab.

GitHub: https://github.com/shakarbisetty/enterprise-agent-safety-lab

What is Enterprise Agent Safety Lab?

Enterprise Agent Safety Lab is an independent, synthetic Python implementation for exploring:

  • Human-in-the-loop approval
  • Deterministic action policies
  • Approval-bound action integrity
  • Runtime execution enforcement
  • Duplicate execution prevention
  • Audit-event integrity

The intention is to make these controls understandable, executable and testable rather than leaving them as architecture diagrams or design principles.

See the demonstrator

The local web interface brings together three stages:

  1. An agent proposes a synthetic enterprise action.
  2. A human reviewer approves or rejects the proposal.
  3. The execution gate checks the approval before allowing the synthetic action to proceed.

The local synthetic demonstrator: agent proposal, human approval and approval-gated execution. Reviewer identity is simulated; no external enterprise systems are contacted.

The central design principle

An agent should not be able to execute a protected action merely because it has proposed that action or received an approval status.

The execution path must independently verify that the action is permitted and that it matches the action approved by the human reviewer.

The current Version 2 workflow follows this sequence:

  1. An agent proposes an action represented as JSON.
  2. A deterministic policy checks the target and operation against an allowlist.
  3. The system creates a pending approval record and calculates a SHA-256 digest of the action.
  4. A human reviewer approves or rejects the proposal.
  5. The approval decision is recorded against the proposed action.
  6. At execution time, the runtime gate checks the approval state, policy and action digest again.
  7. An execution claim is made before the synthetic executor is invoked.

If approval is pending or rejected, the action has been modified, or the policy check fails, execution is blocked.

What changed in Version 2?

Version 1 established the basic approval-gated workflow.

Version 2 strengthened the enforcement path:

Capability Implementation
Target and operation policies Deterministic allowlists
Action representation Canonical JSON
Approval integrity SHA-256 action digest
Execution enforcement Central runtime execution gate
Concurrent requests Process-local atomic execution claim
Failure handling Terminal failure state without blind automatic retry
Audit evidence Hash-linked in-memory event trail

The project currently has 18 automated tests covering approval gating, policy denials, action integrity, input mutation, concurrency, executor invocation, failure handling and audit-chain verification.

These are software verification checks, not an independent security certification or statistically validated benchmark.

Try it yourself

The project uses Python's standard library and does not require third-party packages.

Clone the repository:

git clone https://github.com/shakarbisetty/enterprise-agent-safety-lab.git

cd enterprise-agent-safety-lab

Run the tests:

python -m unittest discover -s tests -v

Start the local demonstration:

python -m src.server

Open:

http://127.0.0.1:8080

You can submit a synthetic action, inspect its approval state, approve or reject it, and observe the execution and audit workflow.

What this project does not claim

It is important to be precise about the current implementation.

This is not production-ready enterprise security software.

The current demonstrator uses:

  • Simulated reviewer identity supplied through request headers
  • In-memory approval and audit storage
  • A process-local concurrency lock
  • A synthetic execution adapter

It does not provide enterprise SSO, distributed transaction guarantees, durable audit storage or exactly-once execution across real downstream systems.

Those are important areas for future engineering and research.

Where I want to take this next

The next stage is an adversarial evaluation benchmark.

I want to investigate scenarios such as:

  • Can an agent execute before approval?
  • Can an agent modify action parameters after approval?
  • Can an approval decision be replayed?
  • Can concurrent requests cause duplicate execution?
  • Can an agent bypass deterministic policy checks?
  • What happens when downstream execution fails after an action has been claimed?

The objective is to compare progressively stronger control architectures and measure unsafe execution, policy enforcement, task completion, recovery behaviour and execution overhead.

These are proposed experiments. I have not yet established comparative benchmark results.

Why I am working on this

My professional background is in enterprise integration, architecture and automation. Through that work, I have become increasingly interested in the challenges of introducing autonomous agents into business processes where actions have real consequences.

I have also worked on an enterprise multi-agent AI implementation involving human approval and actual enterprise integrations. That implementation is confidential and remains within the company environment. This public repository is an independent synthetic demonstrator, not a copy of that implementation.

I want to explore how practical enterprise engineering experience can contribute to more reliable and controllable autonomous AI systems.

I would welcome your feedback and contributions

If you work on AI agents, AI safety, enterprise architecture, security engineering or runtime policy enforcement, I would be interested in your perspective.

In particular:

  1. What additional controls should be enforced at the execution boundary?
  2. How should approval be cryptographically or transactionally bound to an action?
  3. What adversarial scenarios should a meaningful evaluation benchmark include?
  4. How should we measure the effectiveness and cost of human oversight?

Explore the repository:

https://github.com/shakarbisetty/enterprise-agent-safety-lab

If you find the project useful, please consider starring it, forking it to experiment, opening an issue or contributing a test case. Constructive criticism is just as welcome.

This is the beginning of an iterative open-source research effort. I plan to publish implementation and evaluation improvements as the project evolves.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.