Skip to main content

Mnemom Gateway overview

Mnemom is a transparent AI agent tracing gateway. It observes your AI agent’s API calls and builds verifiable alignment traces — what decisions were made, what alternatives were considered, and whether behavior matches declared values. Your prompts and responses are never stored. Mnemom is AAP-compliant and AIP-compliant. It produces structured AP-Traces and runs per-turn AIP integrity checks on every agent interaction.

Architecture

Request flow

Named agents use the x-mnemom-agent header to specify an agent name (e.g., x-mnemom-agent: my-coder). The provider path stays unchanged (/anthropic/v1/messages). When the gateway first encounters an API key, it registers a new agent with a server-assigned mnm-{uuid_v4} identifier. The API key hash is used to recognize the same agent on subsequent requests, so multiple named agents can share an API key while maintaining distinct trace histories. See Agent Identity for details. The system consists of five components:
  1. Gateway — A Cloudflare Worker that intercepts API requests to Anthropic, OpenAI, and Gemini. It identifies your agent via API key hash (zero-config), attaches tracing metadata, and injects thinking/reasoning per provider. What the gateway does with the analysis depends on the integrity mode. In observe and nudge modes, streaming responses (99%+ of traffic) are returned to the client immediately (zero added latency) while AIP analysis runs in the background — extracting thinking blocks, running integrity analysis with Claude Haiku (~3s), creating cryptographically attested checkpoints (Ed25519 + hash chain + Merkle tree), and — in nudge mode — recording the verdict for carryover into the agent’s next turn. Non-streaming responses in these modes are analyzed post-hoc after the response returns. In enforce mode the guarantee is stronger: the gateway gates the same turn on both streaming and non-streaming, evaluating the response before it is delivered so a violating response is blocked rather than delivered — on streaming this adds latency.
  2. Observer — A scheduled Cloudflare Worker (1-minute cron) that processes AI Gateway logs to build AAP-compliant AP-Traces. It extracts thinking blocks from logged responses, analyzes decisions with Claude Haiku, builds AP-Traces, and verifies them against alignment cards using the AAP SDK. The observer links its traces to gateway-created AIP checkpoints via linkCheckpointToTrace(). AIP integrity analysis is handled entirely by the gateway.
  3. API — Serves agent data, traces, integrity scores, drift alerts, enforcement status, and a unified conscience timeline. Powers both the CLI and the web dashboard.
  4. CLI — The mnemom command. Configures your local environment and queries your agent’s transparency data. See the CLI Reference for details.
  5. Dashboard — Web UI at mnemom.ai where you can view the conscience timeline, claim your agent, and monitor alignment.

Supported providers

What gets traced

Mnemom Gateway builds AP-Traces that record:
  • Action — What the agent did (type, name, category)
  • Decision — What alternatives were considered and why one was selected
  • Escalation — Whether the agent escalated to a human and why
  • Verification — Whether the trace is consistent with the agent’s declared alignment card
  • Integrity — Per-turn AIP analysis of thinking blocks, with verdict (clear/review_needed/boundary_violation)
  • PolicyPolicy evaluation results including verdict (pass/warn/fail), violations, warnings, and coverage report. The X-Policy-Verdict response header indicates the result.

What is NOT stored

Your prompts, responses, and API keys are never stored. Only SHA-256 hashes of API keys are used for agent identification.

AIP compatibility matrix

Claiming your agent

After you run mnemom login and route your first request through the gateway, your agent is registered automatically. To link it to your Mnemom account:
  1. Run mnemom status to get your agent ID
  2. Go to mnemom.ai/claim
  3. Paste your agent ID and prove ownership with your API key hash
Claiming gives you a private dashboard with full trace history, integrity scores, and drift detection.

Current limitations

  • API key auth only — Agent identification uses API key hashing (SHA-256, works identically across all providers). OAuth and other auth methods are not supported.
  • Multi-agent support — Multiple named agents can share a single API key with distinct identities using the x-mnemom-agent header. See the Multi-Agent Setup guide and the Agent CRUD API for programmatic registration.
  • AIP requires reasoning models — AIP integrity checking requires models with exposed thinking (Anthropic, Gemini, GPT-5 Thinking). Models without thinking get synthetic clear verdicts.
  • Hosted gateway — The default gateway runs on Mnemom infrastructure. Self-hosting is possible but requires manual setup.

Dependencies

Next steps

CLI Reference

Learn about all CLI commands and usage

Enforcement Modes

Configure how the gateway responds to violations

Observability

Export traces to your observability platform via OpenTelemetry

EU Compliance

Map AAP/AIP to EU AI Act Article 50 obligations