Skip to main content

Mnemom Gateway

The Mnemom Gateway is a transparent AI gateway that sits between your application and any LLM provider. It provides the full Mnemom trust stack out of the box: verifiable AP-Traces, real-time AIP integrity checks, policy enforcement from the alignment card’s capabilities and enforcement sections, Safe House protection configured via the protection card, and verification against the agent’s alignment card. Your prompts and responses pass through unchanged. Your API keys never leave your machine.
1

Install the CLI

npm install -g @mnemom/mnemom
2

Authenticate

Log in to your Mnemom account:
mnemom login
This opens a browser-based login flow and stores your auth token in ~/.mnemom/auth.json.
Your provider API keys are not sent to Mnemom. Only SHA-256 hashes are used to identify your agent. The hash cannot be reversed to recover your key.
3

Make an API call

Use the gateway URL instead of the provider’s direct URL. Include the x-mnemom-agent header to name your agent — it will be auto-created on first call. No registration step needed.
# Instead of https://api.anthropic.com/v1/messages
curl https://gateway.mnemom.ai/anthropic/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "x-mnemom-agent: my-agent" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5-20250514",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'
The gateway supports all three providers at their standard paths:
ProviderGateway PathDirect Equivalent
Anthropicgateway.mnemom.ai/anthropic/*api.anthropic.com/*
OpenAIgateway.mnemom.ai/openai/*api.openai.com/*
Geminigateway.mnemom.ai/gemini/*generativelanguage.googleapis.com/*
Most SDKs and frameworks let you override the base URL. Set it to the gateway path for your provider and everything else works unchanged.
4

Check status

Verify the gateway is reachable and your agent is connected:
mnemom status --agent my-agent
Output
Agent:    my-agent (mnm-a1b2c3d4e5f6)
Gateway:  https://gateway.mnemom.ai (healthy)
Status:   Connected
Providers: anthropic, openai
Last seen: just now
5

View traces

After making API calls through the gateway, view what was traced:
mnemom logs --agent my-agent
Output
2026-02-17T10:30:00Z  tr-abc123  recommend  bounded   verified  0.82
2026-02-17T10:30:05Z  tr-abc124  search     bounded   verified  0.76
2026-02-17T10:30:12Z  tr-abc125  respond    bounded   verified  0.91
Use mnemom logs --agent my-agent -l 20 to show more entries.
6

Check integrity

View AIP integrity scores for your agent’s recent activity:
mnemom integrity --agent my-agent
Output
Agent: agent-a1b2c3d4
Checkpoints: 12
Verdicts:
  clear: 11
  review_needed: 1
  boundary_violation: 0
Integrity score: 0.94
Drift: none detected
7

View your alignment card

See the alignment card assigned to your agent:
mnemom card show --agent my-agent
Customize it by publishing your own card:
mnemom card publish my-card.yaml --agent my-agent
8

Explore the dashboard

Your agent’s data is available at mnemom.ai/dashboard once you are logged in. The dashboard shows:
  • Conscience timeline — A chronological view of every trace, integrity checkpoint, and enforcement action
  • Alignment card — Your agent’s declared values and boundaries
  • Integrity scores — AIP verdict history and trend analysis
  • Drift alerts — Notifications when behavior diverges from declared alignment
  • Enforcement log — Records of nudges and blocks (if enforcement is enabled)

Named agents

If you run multiple agents behind the same API key, use the x-mnemom-agent header to give each one a distinct identity. The provider path stays unchanged — the gateway hashes SHA256(apiKey + '|' + agentName) to derive a unique agent ID.
curl https://gateway.mnemom.ai/anthropic/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "x-mnemom-agent: my-coder" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-5-20250514",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello"}]
  }'
Each named agent gets its own trace history, integrity scores, and drift detection — even though they share an API key. Agents are auto-created on first API call — no registration step is needed.
You can also create agents programmatically via the Agent CRUD API if you want to pre-create agents with metadata before they make their first request.

Supported providers

ProviderModelsThinking / AIP SupportAuth Header
AnthropicClaude Opus 4.6, Opus 4.5, Sonnet 4.5Full (thinking blocks analyzed directly)x-api-key
OpenAIGPT-5.2, GPT-5.2 Pro, GPT-5Via reasoning summaries (reduced confidence)Authorization: Bearer
GeminiGemini 2.5 Pro, Gemini 3 ProFull (thought parts analyzed directly)x-goog-api-key

AIP compatibility

Provider / ModelAIP SupportMethod
Anthropic reasoning models (Opus, Sonnet)FullThinking blocks analyzed directly
OpenAI GPT-5 Thinking seriesPartialReasoning summaries (reduced confidence)
Gemini 2.5/3 with thinkingFullThought parts analyzed directly
Non-reasoning modelsTracing onlySynthetic clear verdict
Legacy OpenAI (o3/o4-mini)UnsupportedReasoning encrypted

What gets traced

The 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 — Real-time AIP analysis of thinking blocks, with verdict (clear / review_needed / boundary_violation)

What is NOT stored

Your prompts, responses, and API keys are never stored by Mnemom. The gateway processes requests in memory and forwards them to the provider. Only structured trace metadata (actions, decisions, verdicts) and thinking block analysis results are persisted.

Enforcement modes

The Mnemom Gateway supports three enforcement modes when an integrity violation is detected:
ModeBehavior
observeDetect violations, record them, take no action (default)
nudgeDetect violations, inject feedback into the agent’s next request via system prompt. The agent sees it and can self-correct.
enforceHard block with HTTP 403 for non-streaming requests. Falls back to nudge for streaming.
Set enforcement mode via the API:
curl -X PUT https://api.mnemom.ai/v1/agents/YOUR_AGENT_ID/enforcement \
  -H "content-type: application/json" \
  -d '{"mode": "nudge"}'

Next steps