Enforcement modes
The Mnemom Gateway supports three enforcement modes that control how the system responds when alignment or integrity violations are detected. You can choose the level of intervention appropriate for your use case — from passive observation to active blocking.Modes overview
Observe
Detect violations, record them, take no action. This is the default mode. Ideal for initial deployment and monitoring.
Nudge
Detect violations and inject feedback into the agent’s next request via system prompt. The agent sees it and can self-correct.
Enforce
Gates same-turn on both streaming and non-streaming requests (HTTP 403 for non-streaming); on streaming this adds latency because the response is evaluated before it is delivered.
Mode details
- Observe
- Nudge
- Enforce
Observe mode (default)
In observe mode, the gateway detects and records all violations but takes no action to modify agent behavior. This is the default mode for all new agents.Behavior:- All API calls pass through unchanged
- Violations are detected and recorded in the trace database
- Integrity checkpoints are created for every interaction
- Drift alerts are generated when behavioral patterns shift
- No modification to agent requests or responses
- During initial deployment to establish behavioral baselines
- When you want to monitor without affecting agent behavior
- For compliance auditing where you need a record but not intervention
- When evaluating whether to enable more active enforcement
integrity_mode: observe (and/or autonomy_mode: observe) on the agent’s alignment card. See Setting enforcement mode below for the three paths (dashboard / CLI / API).Grace period (read this before enabling enforce)
Enforce mode does not block every violation immediately. By default, the policy engine grants a 24-hour grace period to any tool the agent has not been seen using before — during that window, what would otherwise be afail verdict is silently downgraded to a warn, the gateway forwards the request, and the model gets to call the tool. This is intentional ergonomics for production rollouts (operators have a day to amend the alignment card after adding a new MCP server) but it has a real security trade-off you must understand.
The setting lives in enforcement.grace_period_hours on the alignment card and accepts any non-negative number. 0 disables grace and makes enforce strict from the moment a card is published.
The grace decision is per-(agent, tool) and is tracked in the platform’s
tool_first_seen table — first observation timestamps the row, subsequent calls within the window pass, calls after the window enforce. There is no API to back-date a tool_first_seen row, so disabling the grace period is the only way to make enforce strict from the moment a card is published. See Policy Engine § Grace period for the full mechanism.
Setting enforcement mode
Enforcement mode is a top-level field on the alignment card —autonomy_mode for the action-policing pipeline (CLPI tool-use policy + bounded actions) and integrity_mode for the values/conscience pipeline (AIP + drift). The legacy PUT /v1/agents/{id}/enforcement endpoint was retired 2026-05-14.
Three paths, pick the one that fits your workflow:
Dashboard. Open https://mnemom.ai/dashboard/agents/{your-agent-id}/card, toggle autonomy_mode and/or integrity_mode, save. Easiest path for one-off changes.
CLI.
PUT /v1/alignment/agent/{agent_id} with the full canonical card. See Card Management for the read-modify-write flow and the alignment-card schema for the field requirements.
Nudge strategy
When enforcement mode isnudge or enforce, you can further control when nudges are created using the nudge strategy setting:
Configuration:
Per-agent feature toggles
Team operations require the
team_reputation feature flag, available on Team and Enterprise plans. See Pricing for plan details.
Configuration:
Violation types and enforcement
Enforcement applies to all violation types detected by the AAP verification engine, AIP integrity checks, and the policy engine:Alignment violations
Policy violations
Policy enforcement operates as a parallel system alongside alignment enforcement. While alignment enforcement checks agent behavior against card values, policy enforcement checks tool usage against governance rules.
Policy enforcement is controlled independently via the
enforcement_mode field in the Policy DSL:
warn— Log violations, returnX-Policy-Verdict: warnheader, allow request to proceedenforce— Block requests with violations (HTTP 403), returnX-Policy-Verdict: failheaderoff— Skip policy evaluation entirely
X-Policy-Verdict response header is always present when a policy is active:
See Policy Engine for full details on how policies are evaluated, and Policy Management for setup instructions.
In enforce mode, only
CRITICAL and HIGH severity violations trigger hard blocks on non-streaming requests. MEDIUM severity violations are always handled via nudge, even in enforce mode. This applies to both alignment and policy violations.Conscience timeline
All enforcement actions are tracked in the conscience timeline, accessible via the API and the web dashboard at mnemom.ai. The timeline records:- When a violation was detected
- What type and severity
- What enforcement action was taken (observed, nudged, blocked)
- Whether the agent self-corrected after a nudge
- Drift patterns across enforcement events
Provider compatibility
Enforcement works across all providers where AIP is supported:
Enforce gates same-turn on both streaming and non-streaming across all three providers; on streaming this adds latency because the response is evaluated before it is delivered.
See also
- Mnemom Gateway Overview — Architecture and how it works
- CLI Reference — CLI commands for monitoring enforcement
- Observability — Export enforcement data to your observability platform
Agent containment
Agent containment is a separate enforcement layer that operates above the per-request enforcement modes. While enforcement modes (observe/nudge/enforce) control individual request handling, containment controls whether the agent can make requests at all.
Containment states
Paused agents can be resumed by an org owner or admin. Killed agents require explicit reactivation by an owner only. The distinction matters for audit: pause means “we need to investigate,” kill means “this agent is compromised.”
Containment API
Error response
When a contained agent attempts an API request through the gateway, it receives:403 Forbidden (distinct from 402 Payment Required used for billing enforcement).
Auto-containment
Agents can be configured to automatically pause after consecutive boundary violations:- Sets the agent status to
pausedwith actorsystem - Logs the action in the containment audit log
- Emits an
agent.pausedwebhook event - Purges the gateway cache so the block takes effect immediately
RBAC requirements
Webhook events
Three webhook events are emitted for containment actions:agent.paused— Agent was paused (manually or automatically)agent.resumed— Agent was resumed or reactivatedagent.killed— Agent was killed
Containment audit log
Every containment action is recorded in a tamper-evident audit log. Each entry includes:- The action taken (pause, resume, kill, reactivate, auto_pause)
- Who triggered it (user ID or
systemfor auto-containment) - The reason provided
- Previous and new containment states
- Timestamp