CLI reference
Themnemom CLI manages authentication, alignment cards, protection cards, and agent diagnostics for the Mnemom trust stack.
Installation
Authentication
Authenticate with your Mnemom account. Opens a browser-based login flow and stores the auth token locally.
Auth tokens are stored in
~/.mnemom/auth.json. All subsequent commands use this token automatically.Card commands
Fetch your agent’s active alignment card and display it as structured YAML output showing principal, values, autonomy envelope, enforcement, and audit commitment.
card_id: ac-a4c12709-v2
schema: unified-card/1.0
issued_at: "2026-02-21"
expires_at: "2026-08-21"
principal:
type: human
relationship: delegated_authority
values:
declared:
- transparency
- honesty
- harm_prevention
- editorial_independence
- source_attribution
- investigative_rigor
hierarchy: lexicographic
autonomy:
bounded_actions:
- inference
- read
- write
- edit
- exec
- web_fetch
- web_search
forbidden_actions:
- fabricate_sources
- impersonate_human
escalation_triggers:
- condition: named_entity_critical
action: escalate
- condition: legal_claims_present
action: escalate
enforcement:
mode: warn
audit:
trace_format: ap-trace-v1
retention_days: 365
queryable: true
tamper_evidence: append_only
Open your agent’s alignment card in your
$EDITOR for interactive editing. Validates the card on save.The card is fetched from the server, opened in your editor, and published back on save. If validation fails, the CLI reports errors and gives you the option to re-edit.
Read a YAML or JSON alignment card file, validate it against the unified schema (ADR-008), confirm before publishing, and upload to your agent’s alignment card via the API. Optionally triggers re-verification of existing traces against the new card.
--agent <name>--no-verify--yes$ mnemom card publish card.yaml --agent my-coder
Validating card.yaml...
✓ Valid YAML
✓ Required blocks present (principal, values, autonomy, audit)
✓ 6 declared values (3 standard, 3 custom with definitions)
✓ 7 bounded actions
✓ 2 escalation triggers (evaluable conditions)
✓ Card not expired
Publish this card for agent my-coder? (y/N) y
✓ Card published: ac-a4c12709-v2
Re-verify existing traces against new card? (y/N) y
✓ 247 traces re-verified
Local-only validation with no API call. Checks compliance against the unified schema (ADR-008). CI-friendly: exit code 0 on pass, 1 on fail.
$ mnemom card validate card.yaml
✓ Valid YAML
✓ Required blocks: principal, values, autonomy, audit
✓ values.declared: 6 values (non-empty)
✓ Custom values defined: editorial_independence, source_attribution, investigative_rigor
✓ bounded_actions: 7 actions (non-empty)
✓ escalation_triggers: 2 triggers (evaluable conditions)
✓ expires_at: 2026-08-21 (valid)
Card is valid.
Evaluate a card’s policy against a set of tools locally. This replaces the old
mnemom policy evaluate command. The alignment card now includes capability mappings and enforcement rules directly.mnemom card evaluate card.yaml --tools mcp__browser__navigate,mcp__filesystem__delete --agent my-coder
--agent <name>--tools <tools>--format <json|text>Protection commands
Agent listing
mnemom agents
List all agents associated with your authenticated account.
Requires authentication via
mnemom login. Agents are auto-created by the gateway on first API call — there is no registration step.Diagnostics
Agent: my-coder (mnm-0b3f2a1c-d4e5-4f60-b7a8-9c0d1e2f3a4b)
Gateway: https://gateway.mnemom.ai
Status: Connected
Providers:
Anthropic ✓ (Claude Opus 4.6)
OpenAI ✓ (GPT-5.2)
Gemini ✗ (not configured)
Last seen: 2 minutes ago
clear verdicts)Integrity Score: 0.94 (94%)
Traces verified: 1,247
Violations: 12 (3 CRITICAL, 9 HIGH)
Drift alerts: 0 active
Window: 10 checkpoints, 2h retention
# Show last 10 traces (default)
mnemom logs --agent my-coder
# Show last 50 traces
mnemom logs --agent my-coder -l 50
2026-02-17 14:32:01 CLEAR api_call Claude Opus 4.6 "Search for documents"
2026-02-17 14:31:45 CLEAR api_call Claude Opus 4.6 "Summarize results"
2026-02-17 14:31:12 REVIEW api_call GPT-5.2 "Execute trade"
└─ concern: autonomy_violation (HIGH) — action exceeds bounded_actions
2026-02-17 14:30:58 CLEAR api_call Claude Opus 4.6 "Draft email"
License
Global options
| Option | Description |
|---|---|
--agent <name> | Select which agent to use for the command |
--version | Show CLI version |
--help | Show help text |
Agent selection
Commands that operate on an agent use this priority to determine which agent:--agent <name>flag (highest priority)MNEMOM_AGENTenvironment variable
--agent nor MNEMOM_AGENT is set, the CLI will prompt you to specify one (or error in non-interactive mode).
Environment:
Set MNEMOM_ENV to control which environment the CLI targets:
| Value | Description |
|---|---|
production | Production environment (default) |
staging | Staging environment |
local | Local development environment |
Workflow
A typical workflow with the mnemom CLI:Configure your application or LLM client to use
gateway.mnemom.ai with the x-mnemom-agent header. The agent is auto-created on first API call — no registration needed.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"}]
}'
See the Card Management guide for how to build a card from scratch.
Supported providers
The gateway supports tracing for these providers:| Provider | Models | Thinking/AIP | Auth Method |
|---|---|---|---|
| Anthropic | Claude Opus 4.6, Opus 4.5, Sonnet 4.5 | Full (thinking blocks) | x-api-key |
| OpenAI | GPT-5.2, GPT-5.2 Pro, GPT-5 | Via reasoning summaries | Authorization: Bearer |
| Gemini | Gemini 2.5 Pro, Gemini 3 Pro | Full (thought parts) | x-goog-api-key |
See also
- Gateway Overview — Architecture and how it works
- Enforcement Modes — Configure violation response behavior
- Card Management — Creating and managing alignment cards