SuperAPI AI Directory

mnemos

Persistent memory for coding agents storing architecture decisions, bug root causes and conventions, with full-text search and token-budgeted context assembly.

Open website

About this tool

Mnemos is an autopilot knowledge base for coding agents. Its core goal is to let agents automatically build and maintain a project knowledge base during coding, without the user needing to manually write prompts, call remember() or learn the API. Once installed, the agent can automatically accumulate memories such as architectural decisions, defect root causes, and project conventions.

Main Capabilities

What distinguishes Mnemos from other memory servers is that it compiles a knowledge base rather than merely storing text. It runs a complete pipeline in the background, including quality gating, three-layer deduplication, automatic summarization, file linking, and MMR context assembly. These processes are all completed automatically, and the agent does not need to orchestrate deduplication, summarization, ranking, packaging, or lifecycle maintenance itself.

The system is divided into three layers:

  • Layer 1: MCP transport. A standard MCP server using stdio, compatible with any MCP client.
  • Layer 2: Autopilot hooks. A single command (such as mnemos setup claude) configures hooks, bootstrap files, and MCP configuration. Relevant context is automatically injected at session start; when a prompt is submitted, a search is automatically performed when the topic changes; coverage is verified at session end.
  • Layer 3: Automatic knowledge base compilation. Includes quality gating, three-layer deduplication, automatic summarization, file linking, and MMR context assembly, all triggered automatically. In addition, there is a passive background daemon that continuously detects outdated content, contradictions, and missing associations in the memory repository.

Usage

After installation, configure it for a client using the mnemos setup <client> command. Support is provided for replacing claude with cursor, kiro, gemini-cli, codex, or trae. This command writes: bootstrap files (such as CLAUDE.md, .cursorrules, .kiro/steering/mnemos.md), which tell the agent what content is worth storing; hook configuration (such as .claude/hooks.json), which connects lifecycle events; and MCP configuration (.mcp.json), which registers mnemos serve as a tool provider.

Three hooks run automatically:

  • Session start → mnemos hook session-start: assembles relevant memories within the token budget (MMR diversification, file weighting), injects context, with cold start under 200 milliseconds.
  • Prompt submission → mnemos hhook prompt-submit: Detects topic and intent changes, automatically searches the knowledge base when changes are meaningful, and respects a cooldown to avoid noise.
  • Session end → mnemos hook session-end: Verifies whether persistent memory was captured, optionally stores a minimal breadcrumb, and cleans up session state.

After upgrading Mnemos, verify the CLI and the running MCP server. Have the agent call mnemos_runtime, which reports information about the MCP server process actually handling tool calls, including version, host, pid, start time, executable file, data directory, and project ID. If it still shows the old version, close the MCP client and reopen it. Use pkill -f "mnemos serve" only after closing active MCP clients, or when you intentionally accept reconnecting all active Mnemos transports.

Daily mnemos check does not require MCP runtime JSON. Public releases or upgrade verification should pass --mcp-runtime to catch stale MCP servers before release.

Passive Autopilot Daemon

In addition to hooks, Mnemos also runs a background daemon that continuously improves the knowledge base:

  • Staleness detection: Flags memories that reference deleted files or outdated patterns.
  • Contradiction detection: Finds mutually conflicting memories.
  • Relationship inference: Automatically links related memories.
  • Backfill: Retroactively generates summaries for memories that lack them.
  • Automatic compilation: Compiles eligible source memories into reusable project knowledge.

Verification Automatic Loop

Mnemos provides independent views of configuration, raw activity, knowledge quality, and end-to-end loop readiness. mnemos check opens the database read-only, does not run migrations, does not start worker processes, and does not modify memories. The scope of mnemos check --fix is intentionally narrow: it only archives older automatically generated reports after generating a verified cleanup plan.

Performance Benchmarks (Latency)

Hardware: M1 Pro, 16GB RAM, SQLite on SSD. Latency may vary by environment. Most operations stay under 60 milliseconds, independent of dataset size. Hook subcommands use InitLight mode, with no background worker processes, and do not interrupt sessions. Value benchmarks (token savings, precision, pitfall avoidance) are still in progress; see DOGFOODING_RUNBOOK.md for the methodology.

After installationQuick Start

Most users do not need to do anything manually. The configuration resolution order is: explicit --config, project-local .mnemos/config.yaml, then ~/.mnemos/config.yaml. Environment variables use the MNEMOS_ prefix. Mnemos auto-classifies, and this can be manually overridden with the --type flag.

Automatic Configuration

One command per client. Flags: --global (install for all projects), --force (overwrite existing), --project <id> (override project ID). For Claude Code, --project <id> writes MNEMOS_PROJECT_ID into the MCP entry and hook commands. Claude subagents may not receive the session start hook context; the main agent should call mnemos_context before delegation and include the relevant memories or memory IDs in the subagent task prompt. Codex uses a single global configuration shared by the CLI and the VSCode extension; --global and --local are ignored, and both need to be restarted after setup.

Working with Other MCP Clients

For Trae, OpenClaw, Paperclip, or Claude Desktop, etc., you can connect manually. Mnemos uses standard MCP over stdio; simply add the JSON snippet to the client's MCP configuration file (such as trae.json, openclaw.json, paperclip.config.json, or claude_desktop_config.json).

Use Cases and Limitations

Mnemos is not a chatbot memory SaaS, and it is not suitable for recalling user preferences in customer service bots (Mem0 is recommended). It is not a temporal knowledge graph database, and it is not suitable for valid-at/invalid-at reasoning about business facts (Zep is recommended). It is not a cloud product; there is no Mnemos cloud, and there never will be. It is not framework-specific, is MCP-native, and works with any tool that supports MCP. Mnemos does only one thing: provide agents with a knowledge base they can compile themselves.

Roadmap: v1.1.14 (current) includes the full automatic pipeline, automatic compilation, passive automatic injection, loop verification, source-backed benchmarks, and Codex support; v1.2(next) includes distribution, public benchmark evidence, MCP Registry, and HN launch; v1.3 (planned) implements team memory via git, sharing .mnemos/shared/; v2.0+ (TBD) cross-project memory scope and memory compression, driven by user feedback.