Approval Gates: How to Make AI Agents Safe for Real-World Operations
Source: Dev.to
How It Works
Every tool in Bridge ACE is classified into one of three categories:
AUTO — Execute Immediately
- Reading files, analyzing code, internal messaging between agents
- No risk of external impact
- Agent acts autonomously
LOG — Execute and Record
- Web searches, research queries
- Low risk but worth tracking
- Agent acts; action is logged for audit
REQUIRE_APPROVAL — Queue for Human
- Sending emails
- Making phone calls
- Posting on social media
- Making purchases
- Pushing code to production
- Any irreversible external action
When an agent triggers a REQUIRE_APPROVAL action, the request appears in the Fleet Management UI. A human reviews the action, the recipient, and the content, then approves or denies it.
Why This Matters
Most AI‑agent frameworks offer a binary choice: either the agent can do everything (dangerous) or it needs approval for everything (unusable). Bridge ACE’s three‑tier system finds the sweet spot:
- Agents work autonomously on safe tasks (reading, analyzing, coordinating).
- Agents pause and wait for approval on risky tasks (sending, purchasing, deploying).
- Everything is logged for audit trails.
Combined with Scope Locks
Approval Gates handle external actions, while Scope Locks handle internal file access. Together they form a complete governance layer:
- Agent A cannot edit Agent B’s files (Scope Lock).
- No agent can send an email without approval (Approval Gate).
- Every action is logged with timestamps and agent identity.
This makes it safe to give agents powerful tools: the tools exist, the guardrails exist, and the human stays in control.
Implementation
# approval_gate.py
from enum import Enum
class ApprovalPolicy(Enum):
AUTO = 'auto' # Safe — execute immediately
LOG = 'log' # Low risk — execute and log
REQUIRE_APPROVAL = 'require' # Risky — queue for human
The classification is configurable per agent via the guardrails system. You can make a trusted agent more autonomous and a new agent more restricted.
Open Source
git clone https://github.com/Luanace-lab/bridge-ide.git
cd bridge-ide && ./install.sh
Apache 2.0. Self‑hosted. Your agents, your rules.
GitHub: