← Back to Dashboard

Approvals

Human-in-the-loop checkpoint for sensitive agent actions

Table of Contents

Overview

Non-technical summary: The Approvals page is your safety net. When an agent tries to do something sensitive — like sending an email, making a financial transaction, or deleting data — it pauses and asks for your permission here. You see what the agent wants to do, why, and how risky it is. Then you approve or reject. The agent only proceeds if you say yes.

The Approvals page (ApprovalsPage) implements the human-in-the-loop approval workflow for AgenticMail Enterprise. When agents attempt actions that match configured approval policies (based on risk level or side effect type), the action is paused, a request is created, and it appears in the pending queue for human review. The page has two tabs: Pending (requests awaiting decision) and History (past decisions).

The page is organization-aware — when an org is selected via the context switcher, only agents from that org show approval requests.

How It Works

  1. Agent triggers a sensitive action — For example, sending an email, executing code, or making a financial API call.
  2. System checks approval policy — Based on the agent's permission configuration (risk level thresholds and side effect types).
  3. Request is created — If approval is required, the action is paused and a request appears in the Pending tab with full context.
  4. Admin reviews and decides — Click Approve or Reject. A rejection prompts a confirmation dialog.
  5. Agent resumes or aborts — Approved actions are executed; rejected actions are cancelled. The agent receives the decision and adapts accordingly.

Key Concepts

Risk Levels

LevelBadgeExamples
LowlowReading data, searching, internal queries
MediummediumSending messages, modifying files, updating records
HighhighSending external emails, executing code, API calls to third parties
CriticalcriticalFinancial transactions, data deletion, device control

Approval Request Fields

FieldDescription
typeThe action type (e.g., "send-email", "execute-code", "delete-record")
descriptionHuman-readable explanation of what the agent wants to do
contextAdditional context data (JSON) about the action parameters
agentIdWhich agent initiated the request
riskLevelAssessed risk level of the action

Pending Approvals

The Pending tab shows all requests awaiting a decision. Each request is rendered as a card with:

When no pending requests exist, an empty state is displayed: "No pending approvals — When agents need approval for sensitive actions, they'll appear here."

Pending count badge: The Pending tab label includes a red badge showing the number of waiting requests. This is visible in the tab bar so you can quickly see if attention is needed.

Approval History

The History tab shows the last 50 resolved requests in a table format:

ColumnDescription
TypeThe action type that was requested
AgentAgent badge with name/avatar
DecisionGreen "approved" or red "rejected" badge
ByWho made the decision (e.g., "admin")
DateWhen the decision was made

Configuration

Approval policies are configured per-agent during creation (Step 4: Permissions in the Create Agent Wizard) or in the agent detail view. Key settings:

// Agent permission configuration
{
  "requireApproval": {
    "enabled": true,
    "forRiskLevels": ["high", "critical"],
    "forSideEffects": ["sends-email", "sends-message", "financial"],
    "approvers": [],
    "timeoutMinutes": 60
  }
}
SettingDescription
enabledMaster toggle for approval requirements
forRiskLevelsWhich risk levels require approval (array of: low, medium, high, critical)
forSideEffectsWhich side effect types require approval (sends-email, sends-message, sends-sms, posts-social, runs-code, financial)
timeoutMinutesHow long the agent waits for approval before timing out (default: 60)
Approval timeout: If an approval request isn't acted upon within the timeout period, the action is automatically rejected and the agent is notified. This prevents agents from hanging indefinitely on unapproved actions.

API Reference

EndpointMethodDescription
/api/engine/approvals/pendingGETList all pending approval requests
/api/engine/approvals/historyGETList resolved requests (supports ?limit=)
/api/engine/approvals/{id}/decidePOSTApprove or reject a request

Decision Payload

POST /api/engine/approvals/{requestId}/decide
Content-Type: application/json

{
  "decision": "approved",     // or "rejected"
  "decidedBy": "admin",
  "reason": "Optional explanation for the decision"
}

Best Practices

Troubleshooting

Agent is "stuck" waiting for approval

Check the Pending tab — there may be an unresolved request. If the request has timed out, the agent should have received a rejection notification. Restart the agent if it remains stuck.

Actions happen without approval

Check the agent's permission configuration: (1) Is requireApproval.enabled set to true? (2) Does the action's risk level or side effect type match the configured thresholds? Actions below the configured levels won't trigger approval requests.

Too many approval requests flooding the queue

Lower the approval sensitivity. Change forRiskLevels from ["medium", "high", "critical"] to ["high", "critical"] to reduce volume while maintaining safety for high-risk actions.

Reject confirmation dialog doesn't appear

The reject action uses the system's showConfirm utility. Ensure popup blockers or browser extensions aren't interfering with modal dialogs.

AgenticMail Enterprise Documentation Report an issue