Skip to main content

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 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
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 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 a fail 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.
Brand-new tools — including ones an attacker introduces — get a 24h pass on enforce by default.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, set grace_period_hours: 0 on the agent’s alignment card 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. 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 feature flag, available on Team and Enterprise plans. See Pricing for plan details.
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

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, return X-Policy-Verdict: warn header, allow request to proceed
  • enforce — Block requests with violations (HTTP 403), return X-Policy-Verdict: fail header
  • off — Skip policy evaluation entirely
The X-Policy-Verdict response header is always present when a policy is active:
Alignment enforcement (observe/nudge/enforce) and policy enforcement (off/warn/enforce) can be configured independently. For example, you might use nudge for alignment violations while using enforce for policy violations, or vice versa.
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


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:
The HTTP status code is 403 Forbidden (distinct from 402 Payment Required used for billing enforcement).

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