Concepts
Human-in-the-Loop Confirmations
SSE-based real-time confirmation workflow for sensitive operations.
When the policy engine determines that a tool call requires human confirmation, the Gateway pauses the request and notifies confirmers via Server-Sent Events (SSE).
Confirmation Flow
How It Works
- A tool call arrives on MCP proxy/unified MCP (or tool-gate) and matches
require_confirmation - The Gateway creates a confirmation record with status
pending - The request is paused using the Request Pauser service
- A
CONFIRMATION_REQUIREDevent is emitted on the SSE stream - A confirmer (the end-user or an admin in the same tenant) sees the confirmation card in the dashboard
- The confirmer confirms or rejects the request
- If confirmed, the paused request is resumed and forwarded to the upstream server
- If rejected, the request is denied with an appropriate response
Confirmation States
| Status | Description |
|---|---|
pending | Awaiting human decision |
confirmed | Confirmed by a human, request will proceed |
rejected | Rejected by a human, or timed out with reason Request timed out |
SSE Stream
Connect to the SSE stream to receive real-time confirmation notifications:
GET /api/v1/streamThe stream emits events including CONFIRMATION_REQUIRED with the confirmation details (tool name, arguments, risk level).
Responding to Confirmations
# Confirm a request
POST /api/v1/confirmation/:id/confirm
# Reject a request
POST /api/v1/confirmation/:id/reject
# Respond with details
POST /api/v1/confirmation/:id/respond
{ "confirmed": true, "reason": "Looks good" }See Confirmation API Reference for full endpoint details.