Alignment

Explain policy evaluation for the alignment card

Calls the policy engine in dry-run mode against the agent's composed alignment card and returns a structured trace + care-framed remediations. Optional enrich: true runs an LLM pass over the structured remediations to produce long-form prose; off by default. Read-style POST — no state mutation, no Idempotency-Key.

request_snippet.tool_name is REQUIRED and is a TOOL IDENTIFIER (Read, Grep, Bash) — the name matched against capabilities.<name>.tools[], never a card action from autonomy.bounded_actions (code_read, inference). A request without it returns 400 with error code missing_tool_name: a verdict computed over zero tools would report pass having checked nothing (MNE-5820).

This rejection lands on API version 2026-08-17 (ADR-006) and applies to callers sending no X-Mnemom-Version header. A caller pinned to 2026-04-15 still receives 200 with the verdict shape, but the response labels the empty check explicitly in reasoning and in the first suggested_remediations entry — the old verdict is NOT reproduced, because it was produced by matching card-action names against the tool namespace, which is the defect this fixes.

post/alignment/agent/{agent_id}/explain

Request

  • Base URL: https://api.mnemom.ai/v1
  • URL: https://api.mnemom.ai/v1/alignment/agent/{agent_id}/explain
  • Auth: one of:
    • HTTP bearer
    • API key in header X-Mnemom-Api-Key
    • API key in cookie mnemom_session

Path parameters

agent_idstring required

Agent identifier (e.g. smolt-abc123)

Request body

turn_idstring

Optional — bind to a specific gateway turn.

enrichboolean

When true, runs an LLM pass over the structured remediations. Off by default.

Response

Policy evaluation trace + remediations.

oktrue required
resource'alignment' required
traceobject nullable

EvaluationResult from @mnemom/policy-engine. Null for protection in V1.

reasoningstring required

Care-framed prose summary.

enrichedboolean required

True when the LLM enrichment ran.

Changes

No recorded changes to this operation across all 1 revision of this API.