How are actions on the user's behalf gated?
Approval / human-in-the-loop flows; permission scopes; dry-run or draft modes; audit trail.
Verdict
OpenBot has the strictest gate: no computer action runs before a policy decision and an audit row exist. QM is the strongest choice for a team, and Agenvoy has the most concrete guardrails for one person on a laptop.
Policy engines in front of every action. OpenBot resolves the clicked element from the server’s own snapshot, evaluates CEL deny/allow rules (errors deny, with a dry-run mode), then applies approval rules. Credentials, security settings and payments are always handed to the person, and this cannot be configured. QM gives the org a dangerous, auto or strict posture that narrower scopes can only tighten. A regex command floor asks before recursive rm, force-push or DROP TABLE, and an LLM screen checks tool results for prompt injection.
Per-tool approval with defaults you must check. Rakazo judges connector tools by name prefix, and unknown names ask. Shell, browser and file tools are exempt, so the sandbox is the boundary. Hermes Agent blocks hardline patterns and deny globs, sends other dangerous commands to a guardian LLM, and defaults cron runs to deny. Its default shell is still the host. Agenvoy asks before side effects, requires the sudo password for paths outside the home directory, runs run_command in bubblewrap with no network, and moves rm targets to trash. OpenClaw has full exec modes, but the editor found the unconfigured default is security: "full", ask: "off" with the sandbox off.
Narrow or no gate. In Inbox Zero, chat sends, replies and forwards become confirmation cards. The editor found that manageInbox (archive, trash, unsubscribe) runs at once, and so do active rules’ REPLY, FORWARD and DELETE actions. Waku has no approval step, but send_message only writes to a local outbox. Leon relies on prompt rules and allow/deny lists, and its pulse can act every 30 minutes. Khoj pauses only when its sandboxed operator asks the user.
Pick: OpenBot for audited browser agents in a team. Pick: QM for shared Slack assistants with per-scope rules. Pick: Agenvoy or Hermes Agent for a personal machine, after tightening their defaults.
Per-project answers
openclaw/openclaw
answeredApproval / human-in-the-loop. The Gateway manages exec approvals through src/gateway/exec-approval-manager.ts with Web Push notifications delivered to browsers via src/gateway/approval-web-push.ts:1. The agent-runtime-approval-authority.ts:12 module validates delegated authority for each agent action, checking worker turn claims and message action turn capabilities. Operator approval flows live in src/gateway/operator-approval-*.ts with structured scopes src/gateway/method-scopes.ts and src/gateway/operator-scopes.ts.
Permission scopes. The security audit subsystem (src/security/audit.ts:1) runs comprehensive checks on startup: it inspects dangerous config flags (dangerous-config-flags.ts), filesystem exec policy drift (exec-filesystem-policy.ts), code safety (audit-deep-code-safety.ts), agent roster config (audit-agent-roster.ts), gateway config (audit-gateway-config.ts), and installed plugin trust. The dangerous-tools.ts module flags risky tool configurations. Channel-specific security is handled by ChannelSecurityAdapter in src/channels/plugins/types.plugin.ts:75.
Dry-run / draft modes. The src/channels/draft-stream-controls.ts and src/channels/draft-stream-loop.ts modules handle draft streaming for channels — responses can be streamed as drafts before final delivery. The approval system in src/gateway/approval-session-audience.ts manages which sessions see which approvals.
Audit trail. The src/audit/ directory (separate from src/security/) contains the structured audit logging system. Gateway security events are emitted through src/infra/diagnostic-events.ts. The session-lifecycle-events.ts and session-state-events.ts in sessions provide an event-sourced audit trail. The SQLite state DB includes operator approval tables managed in src/state/openclaw-state-db-operator-approval-migration.ts.
Filesystem sandbox. The sandbox system (src/agents/sandbox/) provides optional Docker-based isolation for agent exec operations, with configurable workspace access modes (none, ro, rw).
NousResearch/hermes-agent
answeredApproval / human-in-the-loop: The approval system (tools/approval.py) gates dangerous actions through three entry points: check_all_command_guards(), check_execute_code_guard(), and request_tool_approval(). Each routes through prompt_dangerous_approval() which presents the user with a CLI prompt, gateway transport dialog (Telegram inline buttons, etc.), or MCP elicitation. Commands are classified by detect_dangerous_command()/detect_hardline_command() (approval_detection.py) — patterns like destructive shell commands, sudo usage, or FS modifications. A session-scoped permanent allowlist (_permanent_approved set) and per-session approved set (_session_approved) let users remember decisions. The denial breaker circuit (_denial_tally, default threshold=3) escalates after repeated smart-approval rejections.
Permission scopes: .hermes/config.yaml supports approvals section with denial_breaker_threshold, per-tool allowlist entries, and user-defined deny rules (_match_user_deny_rule). The smart_verdict module (approval_smart.py) delegates ambiguous commands to a guardian LLM for classification.
YOLO mode: HERMES_YOLO_MODE env var and /yolo slash command bypass all approval checks entirely (approval.py:46). The session DB row records yolo mode state (run_agent.py:339-347) so resumed sessions maintain the setting.
Dry-run / draft modes: Not implemented as a generic feature. The terminal tool infrastructure has sandbox backends (Docker, SSH, Modal, etc.) but no global dry-run mode. Individual tools handle safety through the approval gate rather than draft simulation.
Audit trail: Every approval decision (approve/deny/yolo) is logged via shared metrics harness (record_guardrail_decision, record_guardrail_warnings). SQLite session rows capture the model and provider used per session. Background review actions record their write origin.
khoj-ai/khoj
answeredKhoj has limited human-in-the-loop gating — actions are generally executed autonomously once triggered, with a few specific safeguards:
Operator/computer-use safety. The most powerful actions (clicking, typing, scrolling, file editing, running terminal commands) are executed inside the operator loop (processor/operator/__init__.py). The loop has a key safety valve: it can yield a RequestUserAction action type (operator_actions.py:RequestUserAction) which pauses the loop and asks the user for input via the status event stream. When this happens, the environment is left open (not closed) to wait for user response. The loop also has a hard iteration limit (KHOJ_OPERATOR_ITERATIONS, default 100) and responds to client disconnect cancellation events.
Rate limiting. Three tiers: ApiUserRateLimiter (per-minute and per-day for chat), ApiImageRateLimiter (max images and size), and ConversationCommandRateLimiter (per-command, with trial=20 / subscribed=75 limits). These are enforced as FastAPI dependency injections on the chat endpoint.
Subscription gating. ConversationAdapters.get_chat_model() splits users by subscription: subscribed users can use any ChatModel including paid-tier models; free/trial users are restricted to price_tier = FREE models. Server admins configure which models are free/paid via the Django admin.
Process locks. The ProcessLock model with named operations (index_content, schedule_leader, apply_migrations) provides distributed mutual exclusion via PostgreSQL. Used to ensure only one worker indexes content at a time and only one worker acts as scheduler leader.
No generic approval flow. There is no general "confirm this action before execution" flow for note searches, web searches, or code execution — those run automatically. The operator's RequestUserAction is the only mechanism that explicitly pauses for user consent. There is no persistent audit trail of actions performed beyond conversation history (which records what the assistant chose to do).
leon-ai/leon
answeredActions on the user's behalf are gated through several layers. First, the connection system: before any external API tool (Gmail, Notion, etc.) can execute, it must present a declared connection with required settings (tools/communication/gmail/tool.json, lines 13–14: required_settings: ["access_token"]). The agent cannot call a tool until the user completes the OAuth or API-key setup via a browser or the setup_connection tool — and the runtime validates declared fields, never exposes raw secrets (connection-tool.ts, lines 55–60: "Returns only a safe status, never provider errors"). Tool availability scoping is explicit: config.sample.yml (lines 121–130) defines availability.tools.allowed and availability.tools.disabled lists — when allowed is non-empty, only those tools are available. Native skills use a parallel availability.skills block. In the agent loop, the system prompt (agent-loop.ts, lines 108–154) enforces a safety policy: "Verify required paths, identifiers, accepted values, and prerequisites before side effects", "Do not invent... tool-produced facts", and "Never use computer or browser automation to hide automation, spoof identity, bypass CAPTCHA". Duplicate call detection prevents repeated bad calls (agent-loop.ts, line 29: findDuplicateToolInputMatch). The completion_review system prompt (agent-loop.ts, lines 184–196) serves as an audit trail: before a final answer is accepted, the LLM self-reviews its evidence against the original request, enforcing completion standards and flagging blockers. Argument validation uses AJV schemas (server/src/ajv.ts) with human-readable errors. The tool executor (tool-executor.ts) validates and parses inputs before execution. The PulseManager (server/src/core/pulse-manager.ts, lines 60–65) tracks proactive actions with a suppression policy that learns from owner declines, so Leon does not repeatedly push unwanted proactive behaviors. Satellite architecture provides physical isolation: bound tool calls route to the user's local device, and tools become unavailable when Satellite disconnects, preventing remote execution without the device.
yc-software/qm
answeredActions are gated at three layers: command policy, approvals, and security screening. Command policy (src/policy/command-policy.ts) defines an org-floor denylist of dangerous patterns (recursive delete, force push, destructive SQL, fork bombs, pipe-to-shell) with decisions of allow, deny, or require_approval. Policies are composed as org-floor + scope-specific rules, in either denylist or allowlist mode. The NeedsApproval / CommandDenied exceptions (src/tools/primitives.ts:118-149) are thrown by the authorization layer in createToolContext() and caught by the orchestrator. When a command requires approval, a PendingApprovalRecord is written to the approval store (src/core/approval-store.ts), which enqueues a delivery to the user via Slack. The orchestrator pauses the turn (pausedOnApproval) and awaits human resolution. Approval grants can be one-shot (session) or remembered (always). The security posture system (src/security/security-posture.ts) has three levels: dangerous (no tool approvals, no private network blocking), auto (no tool approvals but blocks private networks), strict (requires approval for every tool call). Security screening (SECURITY_SCREEN) can be off, observe (log only), or enforce (block), and uses an LLM classifier to detect prompt injection in tool results before they reach the agent. The orchestrator's security-screen.ts classifies each tool result and can taint entries or abort the turn. The audit trail includes src/admin/postgres-audit-log.ts, src/admin/egress-audit-sink.ts (outbound data), and src/admin/credential-usage-sink.ts. Background work (crons, webhooks) requires explicit grants before credentials can be used (SPEC.md line 28).
elie222/inbox-zero
answeredConfirmation/human-in-the-loop. The primary safety mechanism is a confirmation gate on all state-changing operations. The manageInboxTool (apps/web/utils/ai/assistant/chat-inbox-tools.ts) supports archive_threads, trash_threads, label_threads, bulk_archive_senders, unsubscribe_senders, etc. Destructive tools like sendEmail, replyEmail, and forwardEmail (gated by NEXT_PUBLIC_EMAIL_SEND_ENABLED) are registered conditionally in the toolset (apps/web/utils/ai/assistant/chat.ts:300-305). Before execution, the tool returns { requiresConfirmation: true, confirmationState: 'pending' } — this is rendered as a "card" in the UI. The user must click a confirm button which calls a server action (confirmAssistantEmailAction in apps/web/utils/actions/assistant-chat.ts:15). The confirmAssistantEmailActionForAccount function (apps/web/utils/actions/assistant-chat-confirmation.ts:69) then executes the real API call.
Rule creation gate. createRuleTool (apps/web/utils/ai/assistant/tools/rules/create-rule-tool.ts:65-76) checks actionsNeedChatRiskConfirmation before every rule creation. If the rule contains potentially risky actions (like auto-archiving or auto-sending), it returns requiresConfirmation: true with warning messages. Low-risk rules execute immediately. Delete and update rule tools follow the same pattern.
Memory write gate. The saveMemoryTool only auto-saves source: "user_message" memories after validating the evidence quote exists verbatim in the conversation. Inferred memories (source: "assistant_inference") always return requiresConfirmation: true (apps/web/utils/ai/assistant/chat-memory-tools.ts:152-164).
Sensitive data policy. The app has a sensitiveDataPolicy field on EmailAccount with values ALLOW/REDACT/BLOCK (apps/web/prisma/schema.prisma:179). The LLM layer enforces this: enforceSensitiveDataPolicy wraps messages and wrapToolsWithSensitiveDataPolicy wraps tool outputs, stripping or blocking PII before they reach the model (apps/web/utils/llms/index.ts:298-311). A default policy is configured server-side via SENSITIVE_DATA_POLICY_DEFAULT env var.
Tool budget / timebox. The assistant enforces a running tool execution budget — 720s for web, 60s for messaging (apps/web/utils/ai/assistant/chat.ts:57-60). After the budget expires, prepareStep in the ToolLoopAgent disables all tools and forces a direct text response (apps/web/utils/ai/assistant/chat.ts:370-381).
manageInbox (archive, trash, label, bulk-archive senders, unsubscribe) runs immediately. Automation-rule actions such as REPLY, SEND_EMAIL, FORWARD and DELETE also run unattended once a rule is active.CopilotKit/OpenBot
answeredThe gateway — mandatory choke point. Every action a Bot takes on its computer goes through ComputerGateway (server/src/computer/gateway.ts:1-15). The gateway has three jobs: (1) resolve the element ref from the server-fetched snapshot (never from what the model claims); (2) evaluate the action policy; (3) write an audit row and only then act. "An action that was not recorded did not happen, because there is no path that acts without writing the row first" is a stated invariant.
Action policy — CEL expressions. The policy (server/src/computer/policy.ts) uses cel-js to evaluate allow/deny rules against a PolicyContext that includes tool name, bot ID, page URL/host, actor ID, element role/name/type, and keyboard key. Deny beats allow. The policy supports dry-run mode (records decisions without blocking) for safe rule authoring. The three policy layers are: (1) CEL expressions (allow/deny lists), (2) approve/ask/hand-off decisions, (3) learning-based classification of action effects.
Approval gate — human-in-the-loop. The approvals service (server/src/approvals/service.ts) evaluates every action against a four-tier model: built-in safety requirements → team rules → personal rules → auto-review → default behavior. Outcomes are allow, ask, hand_off, or deny (server/src/approvals/types.ts:31-52). Safety requirements (server/src/approvals/policy.ts:83-108) automatically flag password changes, security settings, and payments for hand-off using regex patterns — these are non-configurable.
Auto-review model. Risky actions that are not caught by safety rules go through an LLM-based auto-review (server/src/approvals/policy.ts:210-218). The reviewer model gets the action context and user's request, then outputs a structured verdict (proceed | needs_approval | hand_off) with safety classification. It fails closed: errors become needs_approval. Actions marked as pre_approved skip approval if the person explicitly requested them.
Audit trail. Every policy decision, approval request, and action is recorded in the auditEvents table (server/src/audit.ts). Audit event types include everything from configuration.changed and credential.created to detailed agent action records. Sensitive fields (tokens, passwords, credentials, prompts, tool arguments/results) are identified by key name and stripped from audit logs (server/src/audit.ts:17-46).
elie222/rakazo
answeredApproval / human-in-the-loop. All tool calls by the agent go through a gating pipeline in packages/core/src/action-approval.ts. The toolRequiresApproval() function (line 92) classifies each tool into one of four buckets:
- Exempt tools (
APPROVAL_EXEMPT_TOOLS— line 3-23):computer_observe,browser_navigate,shell,remember,write_file, etc. — run immediately. - Builtin tools requiring approval (
APPROVAL_REQUIRED_BUILTIN_TOOLS— line 25-35):delete_bot,archive_bot,forget_secret,forget_memory,cloud_agent_launch, etc. — must be approved. - Explicit-approval tools (
EXPLICIT_APPROVAL_BUILTIN_TOOLS— line 36):create_space— always prompts the user; cannot be pre-allowed. - Connector (integration) tools — the
connectorToolRequiresApproval()function (line 85) uses naming heuristics: tools withget_,list_,search_,find_,read_prefixes are read-only (no approval); tools withcreate_,delete_,send_,update_,pay_, etc. require approval. A declaredreadOnly=falseoverride always requires approval. Compound action patterns (_and_,_or_,_then_) are always gated.
Permission scopes. User-defined ActionApprovalRule records allow fine-grained overrides: rules match by exact tool name, connector kind, or category (email or purchase). The resolveActionApprovalDetail() function (line 182) applies deterministic resolution: most-specific matching rule wins. Always-allow and require-approval both beat the default. The planActionGate() function (line 220) adds a third outcome — "judge" — routing consequential default-rule tools to an Auto Review LLM judge when configured.
Auto Review. packages/adapters/src/auto-review.ts defines an LLM-based judge that reviews tool calls before execution. Configured via RAKAZO_AUTO_REVIEW=true env var, plus optional TypeSafe Jev integration (TYPESAFE_API_KEY). applyJudgeDecision() (line 240) maps verdicts: pass → allow, ask → human prompt, error → fail closed for consequential tools.
Unattended / webhook runs. unattendedTriggerToolRequiresApproval() (line 110) applies stricter rules: webhook-triggered runs can only use UNATTENDED_SAFE_BUILTIN_TOOLS (read-only: browser_snapshot, recall_memory, web_fetch, etc.) without approval. Any connector tool in a webhook run needs approval.
Audit trail. Every tool execution records an ExternalEffect via recordEffect() in executor.ts (line 7433) with idempotency keys to prevent replay. Effects transition through statuses (executing → intended → approved, or denied) and are the durable audit log of all actions.
ShenSeanChen/waku-agent
answeredWaku does not have a general human-in-the-loop approval gate for tool execution. Safety is layered: ToolRegistry.execute() catches exceptions and returns error strings. The graph engine enforces per-node max_visits and global max_steps. The loop has two guardrails: stop when model does not ask for tools, and a final tools-off call at max_iterations. OAuth integrations require explicit browser sign-in that cannot be automated. The MCP client isolates external tools via subprocess or network boundaries. The retrieval gate fails open to retrieve. The slot gate defaults to keeping every fact when Jev is unavailable. Consolidation is_ops_state() prevents operating state from persisting. Tools are opt-in via Settings flags (apple_tools, apple_calendar, google_calendar, gh_tool, experimental default off). SOUL.md stores the assistant persona rules. There is no dry-run/draft mode or explicit permission-scope system per tool. Audit trail is trace JSONL files and chat_log, not a dedicated actions table.
send_message writes each message to ~/.waku/outbox for the user to review and send, and nothing is sent (waku/tools/messages.py L1-L22). Real calendar writes (Apple, Google) are also behind opt-in flags.agenvoy/Agenvoy
answeredActions are gated through a multi-level permission system in internal/agents/exec/toolCall.go. The toolNeedsConfirmation() function determines if a tool call requires user approval by checking: (1) whether reading sensitive paths (isSensitiveReadFile), (2) whether the tool is in destructive mode (remove/restore), (3) whether the tool is read-only (list/read/search), (4) whether the HTTP method is a GET, (5) whether the run_command is in the ReadOnlyCommand list, and (6) whether the tool is on the user's allowlist. If confirmation is needed, the runtime.Ask() function sends a runtime.Request{Kind: KindToolConfirm} to the TUI or web dashboard. The user can approve/deny, mark as "remember" (adds an allowlist rule), or "allow this turn". Restricted paths (outside work dir or on the sensitive path list from sensitive_path.json) trigger a password verification gate via boundary.Restricted(). The allowlist is session-level and tool-argument-aware: allow/tool/list.go loads work-dir specific allowlist entries. Sandboxing via bubblewrap (go_pkg_sandbox) wraps command execution: run_command.go and script_ tools execute in a sandbox that blocks sensitive paths and credentials. The configs/jsons/guardrail_rules.json embeds refusal rules, and configs/jsons/refusal_messages.json provides refusal response templates. File boundary enforcement (internal/tools/file/boundary/) includes the sensitive-path checker and the ExcludeList/DeniedPath lists. An audit trail is recorded: all tool calls are logged via sessionLog.Record() with full tool name, arguments, results, and errors. The action_history SQLite table stores every action per task hash with model, reasoning level, objective, tool results, and final reply, supporting replay and review.
boundary.Restricted), not to paths outside the work directory; remembered allowlist rules are stored per work directory and persist, not per session.← How is memory and user context stored and retrieved? · How are LLM providers selected and configured? →