Mnemic

Mnemic

Local-first memory kernel for coding agents that provides a shared, auditable, graph-backed long-term memory layer with features like write preview, temporal recall, and provenance explanations.

Category
Visit Server

README

Mnemic

Mnemic: local-first memory kernel for coding agents

Mnemic is a local-first memory kernel for coding agents and LLM applications.

It gives Codex, Claude Code, Cursor, Copilot-style agents, and custom MCP clients one shared, auditable, graph-backed long-term memory layer. Agents write source-keyed memories, preview changes before they become durable, recall facts as of a point in time, explain why recall selected a record, and turn the memory graph into prompt-ready context packs and session briefings.

The repo is TypeScript-first, MCP-native, and shaped for the 2026 agent-memory stack: durable memory outside the context window, inspectable provenance, local defaults, governance before writes, and reproducible evals.

Mnemic Studio graph preview

Why Mnemic

Mnemic is not a vector-store wrapper or a hidden chat-summary cache. It is a repo-scoped memory plane that agents can inspect, replay, and govern.

Modern agent platforms already treat memory as infrastructure: MCP standardizes tool and data connections, agent SDKs expose session state, and long-term memory benchmarks increasingly test temporal recall, workflow knowledge, and stale facts. Mnemic focuses on the missing developer layer between those pieces.

Hot-path problem Mnemic answer
Every coding agent relearns the same project facts Shared MCP, CLI, SDK, and HTTP memory surface
Memory writes drift or duplicate across sessions Source-keyed idempotent writes plus preview before save
"Why did the agent remember this?" is hard to debug Recall explanations with matched fields, score parts, and relation paths
Old facts keep beating corrected facts validFrom / validTo plus asOf temporal recall
Audit and handoff need more than final state Append-only events, first-class diffs, JSONL export/import, rollback preview
Launch claims need proof demo, benchmark, doctor, openapi:check, package:check, and launch:check

Five-Minute Demo

npm install
npm run demo

The demo starts an isolated backend on a random local port, writes a small coding-agent memory graph, previews an idempotent update, explains recall, builds a context pack, prints a session briefing, audits memory hygiene, shows the append-only timeline, replays an event-log snapshot, and writes a launch report.

The same replay path is available from the CLI as mnemic snapshot, from MCP as mnemic_snapshot, and from HTTP as GET /api/agent-memory/snapshot.

Expected landmarks:

Mnemic Memory Write Preview
sourceKeyMatched: true
changedFields: confidence, content, importance, updatedAt

Mnemic Recall Explanation
matchedFields: content, sourceKey, tags, title
relationPaths: ...

Mnemic Memory Audit
blocks: 0
warnings: 0

Mnemic Memory Snapshot
eventsReplayed: 5
relations: 2

Demo artifacts are written to target/mnemic-launch-demo/, including mnemic-launch-report.md. Demo details live in examples/coding-agent-memory.

Quickstart

Initialize local config for a clone:

npm run init

This generates .env.mnemic, .mnemic/policy.json, .mcp.json, and AGENTS.mnemic.md without overwriting existing files. Use node mnemic-cli/dist/index.js init --force to refresh generated files.

Run the readiness doctor:

npm run doctor

Validate the OpenAPI contract:

npm run openapi:check

Run the deterministic benchmark:

npm run benchmark

It writes target/mnemic-benchmark/mnemic-eval-report.md and currently checks recall@5, mean hit rank, stale false positives, relation-path coverage, and latency without requiring a model provider. See docs/benchmark-baseline.md and docs/benchmark-landscape.md.

Docker

docker compose -f docker-compose.agent-memory.yml up -d --build mnemic-memory-backend
curl -fsS http://127.0.0.1:8088/actuator/health

See docs/docker-quickstart.md for SQLite mode, stop commands, optional Neo4j profile, and Docker readiness checks.

What Ships Today

Surface Current capability
HTTP API remember, preview, temporal recall, explain, context pack, briefing, stats, policy, audit, timeline, JSONL export/import, rollback
API contract OpenAPI 3.1 contract plus a local/CI drift check for route and schema coverage
SDK shared TypeScript contracts plus MnemicClient for every backend endpoint
CLI mnemic remember, preview, link, explain, context, briefing, audit, snapshot, eval, rollback
MCP mnemic_* tools for agent clients, including write preview, recall explanation, policy, audit, and JSONL handoff
Studio React workbench for memories, graph neighborhoods, write diffs, recall explanations, runtime policy, audit, and timelines
Storage zero-setup JSON store plus local SQLite mode with normalized memory, tag, relation, and event tables
Governance secret blocking, source-key requirements for high-impact memory, confidence/staleness warnings, configurable policy file
Benchmark deterministic coding-agent eval with terminal, JSON, and Markdown report output
Doctor local readiness checks for source workspace, build artifacts, MCP config, policy, audit, and backend health
Package check npm pack dry-run verification for SDK, CLI, server, and MCP packages
CI workspace tests, production build, package readiness, MCP live smoke, model-free eval, policy checks, audit checks, and release-script checks

Launch Gates

npm run launch:check
npm run docs:check
npm run rewrite:check
npm run completion:check
npm run fresh:check
npm run github:launch:check
npm run docker:check
npm run repository:check
npm run public:check
npm run supply:check
npm run community:check
npm run security:check
npm run benchmark:landscape:check
npm run market:check
npm run release:notes
npm run release:check
npm run package:check
npm run ci:smoke

npm run completion:check verifies the completion audit that maps the original rename, TypeScript rewrite, and 2026 agent-memory direction to current source evidence and remaining release blockers.

npm run repository:check verifies package metadata and launch docs point at the final Mnemic repository target and that non-Mnemic repository identities do not leak into the public tree.

npm run public:check summarizes public-launch state: target origin, clean worktree, remote repository reachability, GitHub About metadata, hosted CI/CodeQL proof, and npm publication blockers. Use strict mode after the repository is renamed and pushed.

npm run supply:check verifies lockfile shape, npm audit at the high threshold, package-manager pinning, npm token boundaries, trusted-publishing docs, and private package status.

npm run community:check verifies GitHub community-health files such as support policy, code of conduct, Dependabot config, and release checklist coverage.

npm run security:check verifies CodeQL workflow configuration, security docs, Dependabot coverage, and security hardening release gates.

npm run launch:check verifies the GitHub-facing path: README visual card, Studio preview image, demo, benchmark/readiness commands, temporal snapshot messaging, release checklist coverage, Docker link, and package discovery keywords.

npm run docs:check verifies README Docs Map coverage and local Markdown links/images across the public documentation surface.

Refresh the Studio preview asset after meaningful UI changes:

npm run studio:capture

Connect An Agent

Run a local backend:

cp .env.mnemic.example .env.mnemic
scripts/start-agent-memory-stack.sh

Install the Codex MCP entry:

scripts/install-codex-mcp.sh

Generic MCP client snippets are in docs/mcp-client-configs.md. Detailed API, CLI, MCP, governance, SDK, and storage usage lives in docs/usage.md.

Docs Map

Workspace

  • mnemic-sdk/ contains the shared TypeScript contracts and HTTP client.
  • mnemic-cli/ contains the command-line workflow entrypoint.
  • mnemic-server/ is the TypeScript backend.
  • mcp-server/ exposes Mnemic memory through MCP tools.
  • studio/ is the React workbench. The active product path is the TypeScript workspace.

Open Source

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured