{"id":49506996,"url":"https://github.com/veerps57/memento","last_synced_at":"2026-05-15T07:05:01.603Z","repository":{"id":354152123,"uuid":"1222468859","full_name":"veerps57/memento","owner":"veerps57","description":"Persistent memory for AI assistants","archived":false,"fork":false,"pushed_at":"2026-05-01T15:43:30.000Z","size":712,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-01T17:32:19.090Z","etag":null,"topics":["ai","ai-tools","cli","llm","mcp","memory","model-context-protocol","sqlite","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@psraghuveer/memento","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veerps57.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":null},"created_at":"2026-04-27T11:52:57.000Z","updated_at":"2026-05-01T15:41:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/veerps57/memento","commit_stats":null,"previous_names":["veerps57/memento"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/veerps57/memento","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veerps57%2Fmemento","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veerps57%2Fmemento/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veerps57%2Fmemento/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veerps57%2Fmemento/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veerps57","download_url":"https://codeload.github.com/veerps57/memento/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veerps57%2Fmemento/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32595279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-tools","cli","llm","mcp","memory","model-context-protocol","sqlite","typescript"],"created_at":"2026-05-01T17:00:59.228Z","updated_at":"2026-05-15T07:05:01.580Z","avatar_url":"https://github.com/veerps57.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memento\n\n[![CI](https://github.com/veerps57/memento/actions/workflows/ci.yml/badge.svg)](https://github.com/veerps57/memento/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/@psraghuveer/memento)](https://www.npmjs.com/package/@psraghuveer/memento) [![MCP Registry](https://img.shields.io/badge/MCP_Registry-com.runmemento%2Fmemento-2EA043)](https://registry.modelcontextprotocol.io/v0.1/servers/com.runmemento%2Fmemento/versions) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) [![Node.js: 22.11+](https://img.shields.io/badge/Node.js-22.11%2B-339933)](.nvmrc)\n\n\u003e A local-first, LLM-agnostic memory layer for AI assistants — **[runmemento.com](https://runmemento.com)**\n\nEvery AI session starts the same way: re-explaining your preferences, your project's conventions, the decisions you made last week, the dead-ends to avoid. Each tool solves this in its own siloed way (`CLAUDE.md`, `.cursorrules`, `copilot-instructions.md`, ChatGPT Memory) — but you, the human, are the one constant. Your memory shouldn't fragment across vendors.\n\nMemento is one place where that memory lives. It runs an [MCP](https://modelcontextprotocol.io) server over a local SQLite file, so any MCP-capable AI assistant — Claude Desktop, Claude Code, Cursor, GitHub Copilot, Cline, OpenCode, Aider, a research bot, a custom agent — can read and write durable, structured memory about you, your work, and your decisions. Local-first, no outbound network calls by default, no vendor lock-in.\n\n## Quickstart\n\nThree steps from zero to a working memory layer:\n\n### 1. Initialize Memento\n\n```bash\nnpx @psraghuveer/memento init\n```\n\nCreates the database under the XDG default (`$XDG_DATA_HOME/memento/memento.db`, typically `~/.local/share/memento/memento.db` on POSIX), runs migrations, and prints copy-paste MCP snippets for every supported client. Idempotent — re-run any time to reprint the snippets.\n\n### 2. Connect your AI client\n\n`init` prints, for each client, either a one-line subcommand (e.g. `claude mcp add memento …` for Claude Code) or a JSON snippet to merge into the client's MCP config (Claude Desktop, Cursor, Cline, VS Code Agent mode, OpenCode). Pick the one for your client, paste it, then **restart the client** so it loads the new MCP server.\n\nThe full per-client walkthrough lives in [docs/guides/mcp-client-setup.md](docs/guides/mcp-client-setup.md).\n\n### 3. Teach your assistant when to use Memento\n\nMemento exposes the MCP tools, but the assistant still needs to know *when* to call them. Two paths, depending on your client:\n\n- **If your client loads Anthropic-format skills:** install the bundled [Memento skill](skills/memento/SKILL.md). One `cp -R` command, printed by `init`, copies it into `~/.claude/skills/` — the path most skill-capable clients read from. (A few use a client-specific directory; check your client's docs and re-target the `cp` if the skill doesn't pick up after a restart.) Restart the client; the skill auto-loads on intent match.\n- **If your client doesn't support skills:** paste the persona snippet from [docs/guides/teach-your-assistant.md](docs/guides/teach-your-assistant.md) into your client's persona file (`.cursorrules`, custom system prompt, etc.).\n\nThat's it. Verify with `npx @psraghuveer/memento doctor --mcp` (scans known client configs and flags shape mismatches) and try a fresh session: *\"Remember that I prefer pnpm over npm for Node projects.\"* In the next session, ask *\"What's my preferred package manager?\"* and the assistant should recall it without you re-explaining.\n\n## Seed your store with a pack\n\nA fresh Memento install is empty. Packs are curated YAML bundles of memories you can install in one step — a stack guide (Rust + Axum, TypeScript + pnpm, Python + uv…), a team's conventions, or a personal set you authored on another machine.\n\n```bash\nmemento pack install engineering-simplicity\n```\n\nThat command installs the bundled `engineering-simplicity` pack — eleven memories distilled from John Maeda's *The Laws of Simplicity*. Preview before installing with `memento pack preview \u003cid-or-path\u003e`; list what's installed with `memento pack list`; remove any time with `memento pack uninstall \u003cid\u003e --confirm` (dry-run by default).\n\nPacks are also how you share. Author one from your existing memories with `memento pack create`, then distribute it as a file, an HTTPS URL, or a community contribution. The reserved `pack:\u003cid\u003e:\u003cversion\u003e` tag stamps every pack-installed memory so provenance never drifts. Full guide: [docs/guides/packs.md](docs/guides/packs.md). Design rationale: [ADR-0020](docs/adr/0020-memento-packs.md).\n\n## Getting started\n\n**Prerequisites.** Node.js ≥ 22.11, and a C/C++ toolchain so `better-sqlite3` can compile on platforms without a prebuild (Xcode command-line tools on macOS, `build-essential` on Debian/Ubuntu).\n\nRun `init` once to set things up:\n\n```bash\nnpx @psraghuveer/memento init\n```\n\n`init` defaults the database to the XDG data dir; pass `--db /custom/path/memento.db` (or set `MEMENTO_DB=/custom/path/memento.db`) if you want a non-default location.\n\nTo run the server directly (e.g. for debugging):\n\n```bash\nnpx @psraghuveer/memento serve\n```\n\nThe server listens on stdio for [MCP](https://modelcontextprotocol.io) requests. To pass extra flags (e.g. a custom database location):\n\n```bash\nnpx @psraghuveer/memento serve --db ~/.local/share/memento/memento.db\n```\n\nYou can also point at an existing database with the `MEMENTO_DB` environment variable.\n\n**Verify the install** by running `npx @psraghuveer/memento doctor` (add `--quick` to skip the DB and embedder probes; add `--mcp` to also scan known MCP client config files). For a one-screen summary of what's in your store, `npx @psraghuveer/memento status`. To inspect what your install can do — registered commands, current config, database location — without speaking MCP, run `npx @psraghuveer/memento context`. To smoke-test the MCP transport end-to-end, `npx @psraghuveer/memento ping`.\n\n**Wiring Memento into an MCP client** (Claude Desktop, Claude Code, Cursor, Cline, OpenCode, VS Code Agent mode, …) is covered step by step in [docs/guides/mcp-client-setup.md](docs/guides/mcp-client-setup.md). The TL;DR is the three-step quickstart above: `init`, paste the snippet, install the skill or paste the persona.\n\n**Vector retrieval** (paraphrase matching on top of FTS) is on by default. The first search triggers a one-time model download (~110 MB) into `$XDG_CACHE_HOME/memento/models` (or `~/.cache/memento/models` / `%LOCALAPPDATA%\\memento\\Cache\\models`); after that, both FTS and vector arms run automatically. If the model has not yet downloaded, search degrades gracefully to FTS-only. For configuration options and library-wiring details, see [docs/guides/embeddings.md](docs/guides/embeddings.md).\n\n**Operating the store** day-to-day — `compact`, `backup`, `status`, scheduling — is covered in [docs/guides/operations.md](docs/guides/operations.md). The conflict workflow is in [docs/guides/conflicts.md](docs/guides/conflicts.md). To prime an AI assistant on how to use Memento well, see [docs/guides/teach-your-assistant.md](docs/guides/teach-your-assistant.md) — or, if your client supports Anthropic skills (Claude Code, Cowork), install the bundled [skill](skills/memento/SKILL.md) for a no-config alternative.\n\n**See and curate your store in a browser.** `npx @psraghuveer/memento dashboard` launches a local-first web UI that reads against your `MEMENTO_DB`: memory counts by kind and scope, audit trail, conflict triage, config inspection, installed packs. Localhost-only, gated by a per-launch random token in the URL the launcher hands the browser, no telemetry. The dashboard is a sibling package ([`@psraghuveer/memento-dashboard`](packages/dashboard/)) shipped under [ADR-0018](docs/adr/0018-dashboard-package.md); see [docs/guides/dashboard.md](docs/guides/dashboard.md) for the full walkthrough.\n\n**Stuck?** Common failure modes (better-sqlite3 build errors, `command not found: memento`, `STORAGE_ERROR`s, missing embedder dependency) are covered in [docs/guides/troubleshooting.md](docs/guides/troubleshooting.md).\n\nFor the contributor workflow (branching, commit conventions, PR checklist) see [CONTRIBUTING.md](CONTRIBUTING.md). AI agents working on the codebase **must** also read [AGENTS.md](AGENTS.md).\n\n## Guiding principles\n\nThese are the four principles every design decision is judged against. They are documented at length in [ARCHITECTURE.md](ARCHITECTURE.md).\n\n1. **First principles.** Every construct exists because we proved we need it, not because it's how things are usually done.\n2. **Modular.** Any component can be replaced without rewriting the rest.\n3. **Extensible.** New variants don't require breaking changes.\n4. **Config-driven by the user.** Behavior is shaped by configuration, not by code.\n\n## What Memento is\n\nFour pillars. Same four words used everywhere else this is described.\n\n- **Local.** One SQLite file under your home directory. No cloud, no telemetry, no outbound network calls by default. Fully offline.\n- **Typed.** Five memory kinds — `fact`, `preference`, `decision`, `todo`, `snippet` — with kind-specific fields (a decision carries its rationale, a todo its due date, a snippet its language). The assistant can reason about what's still true, not just retrieve text blobs.\n- **Audited.** Every write produces an event in an append-only log. Conflicts surface for triage instead of silently coexisting. Memories decay if you don't confirm them. You can answer \"why is this here?\" and \"when did it change?\" at any time.\n- **Yours.** Configurable behavior (every retrieval weight, every decay half-life, every scrubber rule), JSONL export and import, Apache-2.0. Carry your memory between machines, leave any time. No vendor lock-in.\n\nPlus: LLM-agnostic (works with whatever model your client talks to), MCP-native (Claude Desktop, Claude Code, Cursor, GitHub Copilot, Cline, OpenCode, Aider, custom agents), privacy-conscious (regex scrubber strips secrets before persistence; patterns are user-configurable).\n\n## What Memento is not\n\n- Not a chat history store. It records distilled, structured memory — preferences, facts, episodes, lessons — not raw transcripts.\n- Not a knowledge graph or semantic database. Use the right tools for that.\n- Not a cloud service. Memory lives on your machine; cloud embedders, sync across machines, and team-shared memory are not part of the product.\n- Not a plugin platform. The architecture leaves the door open, but Memento ships with a fixed surface to hold the line on quality.\n\nThe full list of out-of-scope and current limitations is in [KNOWN_LIMITATIONS.md](KNOWN_LIMITATIONS.md).\n\n## How it fits together\n\n```text\n┌─────────────────────────────────────────────────────────┐\n│  Clients: Claude Desktop, Claude Code, Cursor, Copilot, │\n│           OpenCode, custom agents, …                    │\n└──────────────────────┬──────────────────────────────────┘\n                       │ MCP (stdio)\n┌──────────────────────▼──────────────────────────────────┐\n│  memento-server (MCP adapter)                           │\n└──────────────────────┬──────────────────────────────────┘\n                       │ Command registry\n┌──────────────────────▼──────────────────────────────────┐\n│  memento-core: services, scope resolver, scrubber,      │\n│                conflict detector, decay engine          │\n└──────────────────────┬──────────────────────────────────┘\n                       │ Repository interfaces\n┌──────────────────────▼──────────────────────────────────┐\n│  SQLite (better-sqlite3) + FTS5 + optional sqlite-vec   │\n└─────────────────────────────────────────────────────────┘\n```\n\nA full architectural walkthrough lives in [ARCHITECTURE.md](ARCHITECTURE.md). Each significant decision has an [Architecture Decision Record](docs/adr/).\n\n## For contributors (human or AI)\n\nContributions are welcome from both human and AI-assisted authors. We treat them with the same standards.\n\n- **Read [AGENTS.md](AGENTS.md)** if you are an AI agent or working with one. It is the canonical instruction set; `CLAUDE.md` and `.github/copilot-instructions.md` are thin pointers to it.\n- **Read [CONTRIBUTING.md](CONTRIBUTING.md)** for development setup, branching, commit conventions, and the PR lifecycle.\n- **Open a [design proposal issue](.github/ISSUE_TEMPLATE/design_proposal.yml)** before any non-trivial change.\n- **Use the [PR template](.github/PULL_REQUEST_TEMPLATE.md).** It asks you to justify, not just describe, the change.\n\nWe use [GitHub Discussions](https://github.com/veerps57/memento/discussions) for questions and ideas; the [issue tracker](https://github.com/veerps57/memento/issues) is for bugs and accepted work.\n\n## License\n\n[Apache-2.0](LICENSE). See [NOTICE](NOTICE) for attribution.\n\n## Packages\n\nMemento is a small workspace of focused packages. The architecture is documented in [docs/architecture/](docs/architecture/) and the design decisions in [docs/adr/](docs/adr/); both are the source of truth for what Memento does and why.\n\n| Package                                              | Notes                                                                                                                                                                                                                                                                                                                                                                  |\n| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| [`@psraghuveer/memento-schema`](packages/schema)                 | Memory / event / scope / scrubber / conflict / config / result schemas, plus per-`ConfigKey` value schemas.                                                                                                                                                                                                                                                            |\n| [`@psraghuveer/memento-core`](packages/core)                     | Storage and migrations, memory + event repositories, scope resolver, scrubber, decay engine with `compact` archival pass, conflict detection + supersession workflow, embedding hook + bulk re-embed driver, `EmbeddingProvider` interface, FTS + brute-force vector retrieval pipeline + ranker, and the command registry with validating execute path (ADR 0003).    |\n| [`@psraghuveer/memento-server`](packages/server)                 | MCP adapter — `buildMementoServer` projects the `@psraghuveer/memento-core` command registry as MCP tools; `serveStdio` wires it to stdio. Used by `memento serve`.                                                                                                                                                                                                                |\n| [`@psraghuveer/memento-embedder-local`](packages/embedder-local) | Local `EmbeddingProvider` backed by transformers.js + `bge-base-en-v1.5`. Ships as a regular dependency; lazy single-flight init downloads the model on first use. See ADR [0006](docs/adr/0006-local-embeddings-only-in-v1.md).                                                                                                             |\n| [`@psraghuveer/memento`](packages/cli) (CLI)         | The published `memento` binary (`npx @psraghuveer/memento` or `npm i -g @psraghuveer/memento`). Lifecycle commands (`init`, `serve`, `dashboard`, `context`, `doctor`, `status`, `ping`, `backup`, `export`, `import`, `pack`, `store migrate`, `completions`, `explain`, `skill-path`, `uninstall`) plus a generic projection of the registry surface (`memento \u003cnamespace\u003e \u003cverb\u003e`). See [docs/reference/cli.md](docs/reference/cli.md).                                                                              |\n| [`@psraghuveer/memento-dashboard`](packages/dashboard) | Local-first web dashboard. Hono server in-process with the engine + Vite-built React SPA. Launched by `memento dashboard`; binds `127.0.0.1` only. See [ADR-0018](docs/adr/0018-dashboard-package.md) and [docs/guides/dashboard.md](docs/guides/dashboard.md). |\n| [`@psraghuveer/memento-landing`](packages/landing) | Marketing landing page. Static SPA, deployed to GitHub Pages on every push to main that touches `packages/landing/**`. Mirrors the dashboard's design tokens; light/dark toggle. Private (not published to npm). |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveerps57%2Fmemento","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveerps57%2Fmemento","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveerps57%2Fmemento/lists"}