# Approval Gates Human in Loop

> Gate agent side effects behind request, approve and execute steps, so only a human Approve click runs them.

Approval Gates Human in Loop is a paid AI agent skill on Agensi by Mohamed Mostafa Metawea, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $12.99 (one-time purchase)
- Creator: [Mohamed Mostafa Metawea](https://www.agensi.io/creators/mohamed-mostafa-metawea)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/approval-gates-human-in-loop
- Tags: ai-agents, human-in-the-loop, governance, safety-gate

## About this skill

Every side-effecting agent action goes through one gate: request, approve, execute. Agents only propose actions; a human Approve click is what runs them. It comes from a small Python reference app (AI Office) and was checked against that code.

### What it does
- A simple state machine: an action is requested, then approved or rejected, and only approval executes it.
- Refuses to approve anything that is not pending, so a double click cannot run an action twice.
- Shows the exact email text or event that will run, not a summary.
- Email is draft-only and goes to the original sender only.
- Commitments can need a second level of approval.
- The reference app gates five kinds of action: email, calendar write, hire, job description change and new skill.

### How it works
The skill lays out the states, the handler for each action kind, and the rules that keep the gate trustworthy.

### Frameworks & tools
Plain Python with the standard library and SQLite. A written playbook, not an installable package.

### Use cases
- Letting an agent draft emails that a person reviews and sends.
- Requiring sign-off before an agent writes to a calendar or changes records.

### Known limitations
The gate stops unreviewed execution. It does not judge whether an action is a good idea, so the reviewer still has to read it.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Approval Gates Human in Loop skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill prevent an agent from taking unauthorized actions?

This skill solves the risk of agents executing sensitive actions autonomously by forcing every side effect through a request, review, and execute loop. It prevents model hallucinations or jailbreaks from triggering outbound emails or financial commitments without a manual human trigger.

### What specific components are included in this skill?

You receive a code verified human in the loop gate pattern that manages four distinct states: pending, approved, rejected, and failed. It includes specialized handlers for email drafts, calendar events, agent hiring, and skill creation, all utilizing immutable payloads to ensure what you approve is exactly what is executed.

### How does this skill handle email security?

The skill implements a draft only flow where agents can only propose replies to original senders. This prevents the agent from sending unsolicited outbound spam or addressing emails to the wrong person, as the final send command is only reachable through the approval path.

### Are there any specific limitations to what the gate can verify?

The skill manages the approval workflow and state but does not evaluate the quality or logic of the agent's proposed action. Additionally, payloads must be complete and immutable at the time of the request to prevent post approval tampering.

### How should I instruct my agent to use these approval gates?

You can tell your agent to draft a specific proposal, such as an email reply or a new calendar event, and submit it for your review. The agent will confirm that the request is pending and will inform you that nothing will be executed until you provide explicit approval.

### What are the primary use cases for these gates?

This skill is designed to protect high risk actions such as spending money, modifying core system prompts, managing calendar bookings, and orchestrating the creation or modification of sub agents. It provides a robust layer of governance for any tool that interacts with the outside world or changes your team structure.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
