Skip to main content
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 add feedback to a later request, usually the next one. The agent sees it and can self-correct.

Enforce

Blocked in the same turn on both streaming and non-streaming requests: HTTP 200 with a refusal in your provider’s format; detect it with X-Mnemom-Verdict or X-Policy-Verdict: fail. On streaming this adds latency because the response is evaluated before it is delivered.
Enforce is under active development; for day-to-day work we currently recommend observe or nudge.

Mode details

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 model response; some are recorded unanalyzed (see Provider compatibility)
  • Drift alerts are generated when behavioral patterns shift
  • No modification to agent requests or responses
When to use:
  • 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
Configuration: set 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 always block a violation immediately. When a card’s grace period is above 0, the policy engine grants that many hours of grace to any tool the agent has not been seen using before. During that window, what would otherwise be a fail verdict is downgraded to a warn (the violation is relabelled unmapped_tool), the gateway forwards the request, and the model gets to call the tool. Grace applies to every policy violation on a newly seen tool: unmapped tools, forbidden_tools matches, tools named in forbidden_actions, and escalation triggers with action: deny. Agents created today are born with grace_period_hours: 0, so grace is off for them unless you raise it. A card where no scope sets grace_period_hours (for example, an agent created before this default) falls back to 24 hours. That fallback 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.
When no scope sets grace_period_hours, brand-new tools — including ones an attacker introduces, and including tools your card forbids — get a 24h pass on enforce.If an attacker injects an unmapped tool through prompt injection, an upstream MCP server compromise, or a tool-name overlap, the gateway will let the call through for the first 24 hours after it’s first observed for that agent. Mature agents with stable tool inventories aren’t exposed; agents that add tools dynamically, run untrusted MCP servers, or accept tool definitions from user input absolutely are.If your threat model includes adversarial tool introduction, make sure the agent’s alignment card carries grace_period_hours: 0 (new agents already do) to disable the grace path entirely.
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.
Programmatic. PUT /v1/alignment/agent/{agent_id} with the full canonical card, or PUT /v1/alignment/agent/{agent_id}/modes to update just autonomy_mode/integrity_mode without a full read-modify-write. See Card Management for the read-modify-write flow and the alignment-card schema for the field requirements.

Nudge strategy

When enforcement mode is nudge or enforce, you can further control when nudges are created using the nudge strategy setting: Configuration:
Use threshold mode to avoid alert fatigue. The agent only receives a nudge after repeated violations in the same session, giving it a chance to self-correct naturally first.

Per-agent feature toggles

Team operations require the team_reputation entitlement, enabled on enterprise agreements. See Pricing for how plans and entitlements work.
Each agent has independent controls for the transparency and integrity pipeline: Configuration:
These settings are also available in the Agent Settings panel on the web dashboard for claimed agents.

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

The policy engine checks tool usage against the card’s capabilities + enforcement sections, but it does not have its own independent enforce switch — whether a violation is logged or blocks the request is governed by the same autonomy_mode field documented above (off/observe/nudge all evaluate-and-log without blocking; nudge and observe behave identically for policy today; enforce blocks on critical/high violations). The X-Policy-Verdict response header is always present when the canonical card carries a policy section: See Policy Engine for full details on how policies are evaluated, including the allow_unmapped_tools field and the grace-period mechanics above.
In enforce mode, only CRITICAL/critical and HIGH/high severity violations trigger a hard block. MEDIUM/medium (and lower) severity violations are logged/nudged instead, even in enforce mode. This applies to both alignment violations and policy violations.

Safe House front-door enforcement

The modes above govern the agent’s own behaviour — alignment, integrity, and policy. Safe House is a third, parallel enforcement system, and it acts on the request on the way in rather than on the response on the way out. Its enforcement point is worth stating explicitly here, because it is the one place where the gateway intervenes between the provider response and the next inbound request. The front door does not fire once per turn. It fires once per inbound surface a request carries. When screen_surfaces.tool_responses is enabled on the protection card, a request that hands tool results back to the model is screened for the message and for each of those tool results — synchronously, in the request path, before anything is forwarded upstream. Enforcement on a flagged tool result is turn-internal and does not fail the request: This is a front-door check, not an AIP check, and it is not deferred to the agent’s next turn. AIP (the integrity_mode pipeline documented above) runs afterwards on the model’s reasoning; by then the model has already read whatever the front door let through.

Response headers

The gateway reports every enforcement decision on the response, whether or not anything fired:
A number of legacy per-phase headers — X-Mnemom-Autonomy-Verdict, the X-Safe-House-* family (Verdict, Quarantine-Id, Session-Risk, Mode, Simulated-Verdict, Canary-Triggered, DLP, Advisory, Event), and most of the old X-AIP-* family (Action, Proceed, Synthetic, Source, Analysis-Scope, Certificate-Id, Chain-Hash, Reason, Nudge-Count, Enforcement) — were retired in a clean break in favor of the structured X-Mnemom-Verdict/X-Mnemom-Advisory pair above. The gateway actively strips any of these names from every outbound response as defense-in-depth. If you integrated against one of them before this cutover, migrate to the fields above — the old names will never reappear.
For the front-door table above, a pass/warn per-tool verdict never raises front past observed; a quarantine/block verdict is what produces front=enforced on X-Mnemom-Verdict.

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 blocks in the 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.
OpenAI: Chat Completions only. Responses API requests (/openai/v1/responses) pass through without policy evaluation or integrity analysis, in every mode.
What integrity analysis grades depends on the turn:
  • Streamed turns are graded on the model’s readable reasoning when the provider returns it, and otherwise on the visible output (the reply text and tool calls).
  • Non-streamed turns without readable reasoning are not analyzed. The checkpoint is recorded unanalyzed (reason no_thinking_block), and the response still carries X-AIP-Verdict: clear and integrity=pass, so a pass on such a turn does not mean it was checked.
  • The gateway does not apply a minimum-evidence (100-token) gate: that threshold is an AIP SDK setting. See Provider support for per-provider detail.

See also


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 — including the per-surface front-door screening described above, which can fire several times within one request — 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:
details.reason is agent_paused or agent_killed depending on the containment state. The HTTP status code is 403 Forbidden (distinct from 402 Payment Required used for billing enforcement — see Errors).

Auto-containment

Agents can be configured to automatically pause after consecutive boundary violations:
When auto-containment triggers, it:
  • Sets the agent status to paused with actor system
  • Logs the action in the containment audit log
  • Emits an agent.paused webhook 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 reactivated
  • agent.killed — Agent was killed
Each event includes:

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 system for auto-containment)
  • The reason provided
  • Previous and new containment states
  • Timestamp