Skip to main content
Gating is MobKit’s risk-based approval system. Before an agent takes a high-risk action — sending an external message, modifying production data, spending money — the action can be routed through a gate that evaluates the risk and either approves, queues for human review, or denies.

Risk tiers

Every gated action is classified into a risk tier: Risk tier classification is performed by the gating module via MCP tool call.

Evaluation flow

1

Request evaluation

The runtime sends a GatingEvaluateRequest to the gating module with the action details:
2

Risk assessment

The gating module evaluates the action and returns a GatingEvaluateResult with a risk tier, explanation, and recommended handling.
3

Decision

Based on the risk tier:
  • SafeDraft / SafeDispatch: Auto-approved, recorded in audit log
  • ReviewRequired: Queued as a GatingPendingEntry with a timeout deadline
  • Blocked: Denied immediately
4

Resolution

Pending entries are resolved by a human approver calling gating.decide, or by timeout fallback to SafeDraft.

Pending entries

When an action requires review, it enters the pending queue:
Pending entries have a configurable timeout. When the deadline passes without a decision, the action falls back to SafeDraft and an audit entry is recorded with event_type: "timeout_fallback".

Deciding on pending actions

Resolve a pending action with a GatingDecideRequest:

Audit log

Every gating interaction is recorded in the audit log:
The audit log retains the most recent entries (bounded by GATING_AUDIT_MAX_RETAINED) for inspection via the RPC API.

Memory conflict integration

Gating integrates with the memory subsystem to detect conflicts. Before approving a delivery, the gate can check for conflicting assertions in Elephant’s truth maintenance system via the memory.conflict_read MCP tool.

See also