{"_id":"@alarv/lethe","_rev":"7-41f2a4c3b79da545bdeb1bf549d336de","name":"@alarv/lethe","dist-tags":{"latest":"0.1.3"},"versions":{"0.0.0":{"name":"@alarv/lethe","version":"0.0.0","keywords":["memory","agent","mcp","llm","consolidation","rag"],"author":{"name":"alarv","email":"alarvfm@gmail.com"},"license":"Apache-2.0","_id":"@alarv/lethe@0.0.0","maintainers":[{"name":"alarv","email":"alarvfm@gmail.com"}],"homepage":"https://github.com/alarv/lethe#readme","bugs":{"url":"https://github.com/alarv/lethe/issues"},"dist":{"shasum":"639ad5af1cb4cc71c43f338eee69e1a03513f369","tarball":"https://registry.npmjs.org/@alarv/lethe/-/lethe-0.0.0.tgz","fileCount":6,"integrity":"sha512-NdWGVwbQluWn4UrUDEiNymM9gLAciJXBcj4ARDGXXWP21R3BzUo5lPCIBPTRO6Yel6Ob9ccXxao4NuT8qRmz1A==","signatures":[{"sig":"MEQCICt966TgjR4QosITtrAKB5fGgwoFf/Pf7TDSXWcCdiZhAiBq1ZJr8+/kKCxCwIQUUETA+cFMx0NDP+YYhxexoDUtdA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47165},"type":"module","engines":{"node":">=22"},"gitHead":"abcfbb20e8de0e332f2fa434a649d3fcb1f45ff2","scripts":{"eval":"node --experimental-strip-types evals/run.ts","test":"node --test","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"alarv","email":"alarvfm@gmail.com"},"repository":{"url":"git+https://github.com/alarv/lethe.git","type":"git"},"_npmVersion":"10.8.2","description":"A memory harness for coding agents that forgets on purpose.","directories":{},"_nodeVersion":"20.19.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/lethe_0.0.0_1787256409835_0.10371614702459753","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"name":"@alarv/lethe","version":"0.0.1","keywords":["memory","agent","mcp","llm","consolidation","rag"],"author":{"name":"alarv","email":"alarvfm@gmail.com"},"license":"Apache-2.0","_id":"@alarv/lethe@0.0.1","maintainers":[{"name":"alarv","email":"alarvfm@gmail.com"}],"homepage":"https://github.com/alarv/lethe#readme","bugs":{"url":"https://github.com/alarv/lethe/issues"},"bin":{"lethe":"dist/cli.js"},"dist":{"shasum":"5251bb141e010661b4226119e8ae4b7ef4bd07c3","tarball":"https://registry.npmjs.org/@alarv/lethe/-/lethe-0.0.1.tgz","fileCount":54,"integrity":"sha512-ZKliv8X05IGlMtHY4FQ6bsvcFNeSqvvAKnKy7d/n0esm7FvoYOLpWGb3nMr0td3acn6lp0gkoTT2/t7fnTjYXg==","signatures":[{"sig":"MEYCIQCsrDyHAK7FH3ITaIAK2CWrjviIt7Bb2RRJFFdrsAPVkAIhAPMazJ2mCKmUwpI1lviSt4dX65sm7jMptld4EmSy/v36","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alarv%2flethe@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":348965},"type":"module","engines":{"node":">=22"},"gitHead":"fe872c15471028e8b2a32183d1b512802de3085e","scripts":{"eval":"node --experimental-strip-types evals/run.ts","test":"npm run build && node --test \"dist/**/*.test.js\"","build":"tsc -p tsconfig.json && chmod +x dist/cli.js","assets":"sh scripts/assets.sh","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"alarv","email":"alarvfm@gmail.com"},"repository":{"url":"git+https://github.com/alarv/lethe.git","type":"git"},"_npmVersion":"10.9.8","description":"A memory harness for coding agents that forgets on purpose.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/lethe_0.0.1_1787858607810_0.8780420707001257","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@alarv/lethe","version":"0.0.2","keywords":["memory","agent","mcp","llm","consolidation","rag"],"author":{"name":"alarv","email":"alarvfm@gmail.com"},"license":"Apache-2.0","_id":"@alarv/lethe@0.0.2","maintainers":[{"name":"alarv","email":"alarvfm@gmail.com"}],"homepage":"https://github.com/alarv/lethe#readme","bugs":{"url":"https://github.com/alarv/lethe/issues"},"bin":{"lethe":"dist/cli.js"},"dist":{"shasum":"a3d1a118c5034ca3de15b5027e19216b2bc43af0","tarball":"https://registry.npmjs.org/@alarv/lethe/-/lethe-0.0.2.tgz","fileCount":54,"integrity":"sha512-DjdrkNZu/98Ms/FsxQuoUT/Y0DXgflvuGJiOVlSLtnOCXr2l6LKrwzelsnwWwDZoScRBSJU1cjaDc3F0qQCpgQ==","signatures":[{"sig":"MEQCICSAABuBoQWHjYkhrEvoasU5VCKoWacou2sKl1glfT8wAiB4EvcxlH9IHppXaaHfOV76KiOn24hClCcrxY8mRglelA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alarv%2flethe@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":345520},"type":"module","engines":{"node":">=22"},"gitHead":"894a8ac9bc2cb0d00f2daa4071b92a4284c38c7c","scripts":{"eval":"node --experimental-strip-types evals/run.ts","test":"npm run build && node --test \"dist/**/*.test.js\"","build":"tsc -p tsconfig.json && chmod +x dist/cli.js","assets":"sh scripts/assets.sh","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2729ef3f-c5ee-45ef-9a2b-0ad228d14349"}},"repository":{"url":"git+https://github.com/alarv/lethe.git","type":"git"},"_npmVersion":"11.19.1","description":"A memory harness for coding agents that forgets on purpose.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/lethe_0.0.2_1787859836603_0.36676177426208056","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@alarv/lethe","version":"0.1.0","keywords":["memory","agent","mcp","llm","consolidation","rag"],"author":{"name":"alarv","email":"alarvfm@gmail.com"},"license":"Apache-2.0","_id":"@alarv/lethe@0.1.0","maintainers":[{"name":"alarv","email":"alarvfm@gmail.com"}],"homepage":"https://github.com/alarv/lethe#readme","bugs":{"url":"https://github.com/alarv/lethe/issues"},"bin":{"lethe":"dist/cli.js"},"dist":{"shasum":"61a84f8b19a3d56b4b991779fec614a4fc065bcd","tarball":"https://registry.npmjs.org/@alarv/lethe/-/lethe-0.1.0.tgz","fileCount":66,"integrity":"sha512-pmuU0nq/yWR9IeB7XsbrBtIOVTRQIxb3ncvLG18Tn+9e/l/CSqMvwRk7GFxZgVFSbTJWF+TFKSDImb+MebpTtA==","signatures":[{"sig":"MEYCIQDzGdQ4ZxW4b3SVOZEtW9dRRUGxVSSNGjJPBxHIdF6/HAIhAKkR9qdDqg2MuFCflY9dI0pai6lh/zMSbshTDBSUo7tk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alarv%2flethe@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":528187},"type":"module","engines":{"node":">=22"},"gitHead":"331aaee1c2ad93b6db3fcec24f0a085a882569b8","scripts":{"eval":"node --experimental-strip-types evals/run.ts","test":"npm run build && LETHE_HOME=\"${TMPDIR:-/tmp}/lethe-test-$$\" node --test \"dist/**/*.test.js\"","build":"tsc -p tsconfig.json && chmod +x dist/cli.js","assets":"sh scripts/assets.sh","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2729ef3f-c5ee-45ef-9a2b-0ad228d14349"}},"repository":{"url":"git+https://github.com/alarv/lethe.git","type":"git"},"_npmVersion":"11.19.1","description":"A memory harness for coding agents that forgets on purpose.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/lethe_0.1.0_1788186747870_0.725729713454158","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@alarv/lethe","version":"0.1.1","keywords":["memory","agent","mcp","llm","consolidation","rag"],"author":{"name":"alarv","email":"alarvfm@gmail.com"},"license":"Apache-2.0","_id":"@alarv/lethe@0.1.1","maintainers":[{"name":"alarv","email":"alarvfm@gmail.com"}],"homepage":"https://github.com/alarv/lethe#readme","bugs":{"url":"https://github.com/alarv/lethe/issues"},"bin":{"lethe":"dist/cli.js"},"dist":{"shasum":"d4821e1734df47186258582e83c1a1f023522f7c","tarball":"https://registry.npmjs.org/@alarv/lethe/-/lethe-0.1.1.tgz","fileCount":69,"integrity":"sha512-MWTuuPv6xwsaN+suvZfx/uIKlMJnEkfI9Fmz/wtrjw9+sTvAUHg+b++i5f5eHw2+7GKZS5iDk/tASWJPzH8VnA==","signatures":[{"sig":"MEUCIQCONIT+Th6s4EbzMJj7BamOOIOBLmWW9ITif9vqN1z86AIgIEAaKf8kXGCDQo5KvQyHHhNfdLGMARWbYrWIFWvyHNQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alarv%2flethe@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":533632},"type":"module","engines":{"node":">=22"},"gitHead":"75239327f38c4a7a8532db58676f4a54d06f4d0f","scripts":{"eval":"node --experimental-strip-types evals/run.ts","test":"npm run build && LETHE_HOME=\"${TMPDIR:-/tmp}/lethe-test-$$\" node --test \"dist/**/*.test.js\"","build":"tsc -p tsconfig.json && chmod +x dist/cli.js","assets":"sh scripts/assets.sh","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2729ef3f-c5ee-45ef-9a2b-0ad228d14349"}},"repository":{"url":"git+https://github.com/alarv/lethe.git","type":"git"},"_npmVersion":"11.19.1","description":"A memory harness for coding agents that forgets on purpose.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/lethe_0.1.1_1788418624327_0.8833859650614724","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@alarv/lethe","version":"0.1.2","keywords":["memory","agent","mcp","llm","consolidation","rag"],"author":{"name":"alarv","email":"alarvfm@gmail.com"},"license":"Apache-2.0","_id":"@alarv/lethe@0.1.2","maintainers":[{"name":"alarv","email":"alarvfm@gmail.com"}],"homepage":"https://github.com/alarv/lethe#readme","bugs":{"url":"https://github.com/alarv/lethe/issues"},"bin":{"lethe":"dist/cli.js"},"dist":{"shasum":"e924689403e564ad08807fefd07413d673ffdcb9","tarball":"https://registry.npmjs.org/@alarv/lethe/-/lethe-0.1.2.tgz","fileCount":69,"integrity":"sha512-NbN6bPLfzNje6clcWBR6AvxSNzKZm7/Jeovj266tc95mRhKwg7nKkHbatZA7/FQbNCqxNXlJ/bFglV/SL+Rj4Q==","signatures":[{"sig":"MEUCIQDRACs0RXz56lCGtdxZm//3TBMe+9+LLie/JbijFBaR9AIgOzRf7vgGtWg1qm7O6HIfuQ1szzhYWVfnQD4RXvdXzmQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIFhUXPR6qmq2UfmGxko1Z9NgMnooEpycvNoy0aqpS2JhAiEA0SDaiqZv006q0D+cszrMU2xOTVJFeJe0gm0kNpNJuz8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alarv%2flethe@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":543164},"type":"module","engines":{"node":">=22"},"gitHead":"3d9e3e4353c1b50443a244f8d2baf271377069fb","scripts":{"eval":"node --experimental-strip-types evals/run.ts","test":"npm run build && LETHE_HOME=\"${TMPDIR:-/tmp}/lethe-test-$$\" node --test \"dist/**/*.test.js\"","build":"tsc -p tsconfig.json && chmod +x dist/cli.js","assets":"sh scripts/assets.sh","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2729ef3f-c5ee-45ef-9a2b-0ad228d14349"}},"repository":{"url":"git+https://github.com/alarv/lethe.git","type":"git"},"_npmVersion":"11.19.1","description":"A memory harness for coding agents that forgets on purpose.","directories":{},"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/lethe_0.1.2_1789478876319_0.41423559969146595","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"_id":"@alarv/lethe@0.1.3","bin":{"lethe":"dist/cli.js"},"bugs":{"url":"https://github.com/alarv/lethe/issues"},"dist":{"shasum":"929d258e555ecae401446f3b4a5ee7d2fef6cd50","tarball":"https://registry.npmjs.org/@alarv/lethe/-/lethe-0.1.3.tgz","fileCount":69,"integrity":"sha512-W8mBWetEKHarieaALU6muQZjxeNvkPezksudOdD0mscfIULp9Vq4fsGuv2/E9BpKZQ2RN2JwzdsHTVjFXctc4g==","signatures":[{"sig":"MEUCIFIjk6Yuj70XG2mccoaTDd4feX0eMy4B7d+D/c5A0W15AiEAoIdjVEyEFUJ/k9AhjfJg/mXXd0OLbmBWYbMDPZEoosw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICqbvtvnbtDVfqKB/AANWNzsCmanzEJaMm34u78U/cOzAiAF/DsIwuhdSyWmNvHTfJtnV9M0O573ElsGTVOSn3SOuQ=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alarv%2flethe@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":565843},"name":"@alarv/lethe","type":"module","author":{"name":"alarv","email":"alarvfm@gmail.com"},"engines":{"node":">=22"},"gitHead":"47431bcf62b47653e8fbdebaf38e6694816ca3e0","license":"Apache-2.0","scripts":{"eval":"node --experimental-strip-types evals/run.ts","test":"npm run build && LETHE_HOME=\"${TMPDIR:-/tmp}/lethe-test-$$\" node --test \"dist/**/*.test.js\"","build":"tsc -p tsconfig.json && chmod +x dist/cli.js","assets":"sh scripts/assets.sh","typecheck":"tsc -p tsconfig.json --noEmit","prepublishOnly":"npm run build"},"version":"0.1.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"2729ef3f-c5ee-45ef-9a2b-0ad228d14349"}},"homepage":"https://github.com/alarv/lethe#readme","keywords":["memory","agent","mcp","llm","consolidation","rag"],"repository":{"url":"git+https://github.com/alarv/lethe.git","type":"git"},"_npmVersion":"11.20.0","description":"A memory harness for coding agents that forgets on purpose.","directories":{},"maintainers":[{"name":"alarv","email":"alarvfm@gmail.com"}],"_nodeVersion":"22.23.2","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lethe_0.1.3_1790679014832_0.7243904693225789"}}},"time":{"created":"2026-08-20T20:06:49.674Z","modified":"2026-09-29T10:50:15.252Z","0.0.0":"2026-08-20T20:06:49.989Z","0.0.1":"2026-08-27T19:23:28.002Z","0.0.2":"2026-08-27T19:43:56.806Z","0.1.0":"2026-08-31T14:32:27.993Z","0.1.1":"2026-09-03T06:57:04.515Z","0.1.2":"2026-09-15T13:27:56.425Z","0.1.3":"2026-09-29T10:50:14.940Z"},"bugs":{"url":"https://github.com/alarv/lethe/issues"},"author":{"name":"alarv","email":"alarvfm@gmail.com"},"license":"Apache-2.0","homepage":"https://github.com/alarv/lethe#readme","keywords":["memory","agent","mcp","llm","consolidation","rag"],"repository":{"url":"git+https://github.com/alarv/lethe.git","type":"git"},"description":"A memory harness for coding agents that forgets on purpose.","maintainers":[{"name":"alarv","email":"alarvfm@gmail.com"}],"readme":"<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"assets/dark-seahorse.jpeg\">\n    <img src=\"assets/seahorse.jpeg\" alt=\"\" width=\"420\">\n  </picture>\n</p>\n\n<h1 align=\"center\">lethe</h1>\n\n<p align=\"center\"><b>A memory harness for coding agents that forgets on purpose.</b></p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/alarv/lethe/actions/workflows/ci.yml\"><img src=\"https://github.com/alarv/lethe/actions/workflows/ci.yml/badge.svg\" alt=\"ci\"></a>\n  <a href=\"https://www.npmjs.com/package/@alarv/lethe\"><img src=\"https://img.shields.io/npm/v/@alarv/lethe?color=cb3837&logo=npm\" alt=\"npm\"></a>\n  <a href=\"https://nodejs.org\"><img src=\"https://img.shields.io/node/v/@alarv/lethe\" alt=\"node\"></a>\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/license-Apache--2.0-blue\" alt=\"license\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#install\">install</a> ·\n  <a href=\"#what-it-does\">what it does</a> ·\n  <a href=\"docs/brain.md\">how memory works</a> ·\n  <a href=\"#contributing\">contributing</a>\n</p>\n\n---\n\nYour agent solved it on Tuesday. On Thursday, in a new session, it has no idea.\n\nEvery memory tool answers that by storing more. lethe answers it by storing **less,\nbetter** — it distils what happened into what is true, and throws the rest away.\n\n```\ntue 14:02  tests failed — 14 errors, all \"connection refused\"\ntue 14:09  checked the test DB config, looked fine\ntue 14:15  tried resetting the test database, still refused\ntue 14:31  postgres container wasn't running. `docker compose up` fixed it\n                              │\n                              ▼      later, off the latency path\n        ┌────────────────────────────────────────────────┐\n        │  Tests need `docker compose up` first.         │\n        │  \"Connection refused\" is almost always the     │\n        │  missing container, not the test code.         │\n        └────────────────────────────────────────────────┘\n```\n\nFour episodes in, one rule out. On Thursday your agent reads one line instead of\nrediscovering it over twenty-nine minutes — and you never see any of it, because it\nhappened while you weren't waiting.\n\n## Install\n\nWorks in any host that speaks MCP.\n\n**Claude Code**\n\n```sh\nclaude mcp add lethe --scope user -- npx -y @alarv/lethe mcp\n```\n\n**opencode** — `~/.config/opencode/opencode.json` for every project, or `opencode.json`\nin a repo for just that one:\n\n```json\n{\n  \"mcp\": {\n    \"lethe\": {\n      \"type\": \"local\",\n      \"command\": [\"npx\", \"-y\", \"@alarv/lethe\", \"mcp\"],\n      \"enabled\": true\n    }\n  }\n}\n```\n\n**Cursor · Windsurf · Zed** — anything reading `mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"lethe\": { \"command\": \"npx\", \"args\": [\"-y\", \"@alarv/lethe\", \"mcp\"] }\n  }\n}\n```\n\n**Codex CLI** — `~/.codex/config.toml`:\n\n```toml\n[mcp_servers.lethe]\ncommand = \"npx\"\nargs = [\"-y\", \"@alarv/lethe\", \"mcp\"]\n```\n\nThen confirm it:\n\n```sh\nnpx @alarv/lethe doctor\n```\n\nNeeds Node 22+. On older versions retrieval falls back to a simpler ranker rather than\nfailing.\n\n### Sharing memory\n\nEpisodes (raw session logs) never leave `~/.lethe` — always private. Claims (distilled,\nreusable facts) land in `<repo>/.lethe/memory/`, and `lethe init` asks once per project\nwhether to commit them:\n\n```sh\nnpx @alarv/lethe init\n```\n\nCommit only in a private repo — claims can name internal services, deploy steps, and the\nreasoning behind decisions. The answer just toggles two lines in `.lethe/.gitignore`, so\nchanging your mind later moves no files. Skip the prompt with `lethe init --share` or\n`lethe init --private`. `lethe doctor` flags the one bad state: sharing on, nothing\ncommitted.\n\n### Seeding memory\n\nAn empty store teaches an agent to stop calling `recall`. So there's a `learn` tool: ask\nyour agent to call it, and it reads the repo and writes down what the project already\nsays about itself — conventions, commands, gotchas — instead of starting from nothing.\n\nEvery fact it writes must cite a real file and quote it verbatim, or it's rejected.\nSeeded claims start weak and decay if nothing ever confirms them; one that proves useful\ngets reinforced.\n\n```sh\nlethe learn      # what has been seeded from this repo, and how strong it still is\n```\n\n### Make recall automatic\n\nLeft alone, an agent mostly doesn't call a memory tool — it has other things on its mind.\nA hook fixes that by running `recall` before the model even sees your message, so\nwhatever it finds is already in context:\n\n```sh\nlethe hook show      # prints a hook config to add to your host\n```\n\nIf your organisation manages Claude Code with `allowManagedHooksOnly`, hooks you add\nyourself are skipped without an error, so this one will never run. `lethe doctor` and\n`lethe hook show` check for that and say so; the fix is to have an administrator deploy\nthe hook as a managed one.\n\nopencode gets the same via [`plugins/opencode.js`](plugins/opencode.js).\n\n## What it does\n\nThree kinds of memory, and **where a memory lives is decided by what it is, not by who\nasks**:\n\n| | | |\n|---|---|---|\n| `episode` | what happened | raw, verbose, never leaves your machine |\n| `claim` | what is true | distilled from episodes, shareable |\n| `pattern` | how we do things here | promoted once a claim has earned it |\n\nAnd three things memory tools generally don't do:\n\n**Consolidation.** A deferred pass hands your raw episodes to a model, which decides which\nof them are about the same underlying problem and writes down what was invariant across\nthem. Runs off the latency path, never while you wait.\n\n**Forgetting.** Memories decay, are reinforced when used, and are evicted under a capacity\nbudget — weakest first, cheapest loss first. Capacity is treated as fixed.\n\n**Reconsolidation.** A memory that turns out to be wrong gets corrected, instead of sitting\nin the index being confidently wrong forever.\n\n### Memory is text, in your repo\n\n```\n.lethe/memory/\n  a1b2c3d4-tests-need-containers.md\n  e5f6a7b8-async-state-is-a-race.md\n```\n\nReadable, diffable, reviewable in a pull request. `git blame` works on your agent's\nmemory. Nothing is locked in a database you can't inspect — and if you delete lethe\ntomorrow, you keep the markdown.\n\nClaims land in the repo so your team can review what the agent learned before it becomes\nshared knowledge; whether they are committed is one line in `.lethe/.gitignore` — see\n[Sharing memory](#sharing-memory). Episodes never move: they are a private scratchpad\nthat consolidation eventually consumes.\n\n### Day to day\n\n```sh\nlethe recall \"why do the tests fail\"   # search\nlethe ls                               # everything recorded\nlethe status                           # is it working?\nlethe metrics                          # is it being used, and is it distilling?\nlethe learn                            # what has been seeded from this repo\nlethe compact --dry-run                # preview consolidation\nlethe gc                               # what is in ~/.lethe, and what is dead in it\n```\n\nAnything slow reports progress — a bar where the fraction is knowable, and elapsed time\nagainst the timeout where it isn't, because one model call can't report a percentage\nwithout inventing it. It all goes to **stderr**, never stdout: stdout is the MCP transport,\nand it's also what `lethe status | grep` reads. Outside a terminal, and under CI, the\nanimation is off and each phase prints once instead. `LETHE_PROGRESS=0` silences it,\n`LETHE_PROGRESS=1` forces it on.\n\n### It cleans up after itself\n\n`~/.lethe` is the one directory lethe grows where you are not looking, so nothing in it is\nleft to accumulate:\n\n- **The index prunes itself.** Rows for files that no longer exist go on the next sync.\n  Recall reads only the files that changed and only the results it returns — it never\n  parses the whole store, which is what used to make one recall cost 4.4 seconds on a\n  36,000-memory store.\n- **The log is off by default**, because appending forever to a file in your home\n  directory is not a diagnostic. `lethe init --debug` turns it on; it rotates at 512 KB\n  and keeps one previous copy. With it off, `lethe metrics` and the activity rows in\n  `status` and `doctor` say so rather than reporting zero.\n- **Dead project directories are collected** as compaction passes — but only ones holding\n  no memories. A directory that still has memories is never removed automatically, however\n  missing its repository looks, because a path that is gone today is as likely to be an\n  unmounted disk or a moved checkout. `lethe gc` names those; `lethe gc --dead` removes\n  them once you have looked.\n\n```sh\nlethe gc --dry-run     # say what would go, change nothing\nlethe gc --dead        # also drop directories whose project is gone\nlethe gc --reindex     # throw the index away; it rebuilds on the next recall\n```\n\n## Why a seahorse\n\nNamed for the river of forgetting. The seahorse is the hippocampus — *hippos*, horse;\n*kampos*, sea monster — which is what early anatomists thought the structure looked like,\nand where episodic memory is written before it is either consolidated or lost.\n\nThat is not decoration. The brain doesn't have one memory system, it has several with\ndifferent physics, and the reason is a constraint we share: anything that learns fast\nenough to record a one-off event cannot also extract stable general structure without\noverwriting itself. So the brain runs a fast sparse episodic buffer alongside a slow dense\nsemantic store, and moves memory between them during sleep by replaying it.\n\nlethe borrows that architecture on purpose, rather than as a metaphor:\n\n| brain | lethe |\n|---|---|\n| hippocampus — fast episodic buffer, small, overwritten | `episode` store, hot, bounded |\n| neocortex — slow semantic store, large, general | `claim` store, curated |\n| sharp-wave ripple replay during rest | consolidation, off the latency path |\n| synaptic downscaling during sleep | global decay, reinforcement on access |\n| pattern completion — a partial cue reinstates the whole | a query in the old wording still finds the new claim |\n\nForgetting is the part people find surprising, and it's the whole point. Sleep\n*downscales* synapses globally: weak traces fall below threshold and vanish, and\nsignal-to-noise improves because the total was cut back. A system that retained every\nepisode in full detail could never form the concept \"dog\" — it would have a million\nunrelated animal encounters. **Forgetting the incidental is the same operation as\nextracting the general rule.**\n\n[`docs/brain.md`](docs/brain.md) has the full account, with citations and an honest\nsection on where we break from biology.\n\n## Evaluations\n\n[`docs/evals.md`](docs/evals.md) — public, and it reports where lethe loses.\n\nThe claim under test: an agent with distilled memory reaches a correct answer in fewer\nturns and fewer tokens than one with raw session logs. If distillation can't beat raw\nlogs, the project should stop.\n\n## Design\n\n- [`docs/brain.md`](docs/brain.md) — how memory actually works: complementary learning\n  systems, ripple consolidation, synaptic downscaling, reconsolidation.\n- [`docs/architecture.md`](docs/architecture.md) — the three stores, why text is the\n  source of truth, how retrieval is layered, salience.\n- [`docs/compact.md`](docs/compact.md) — the consolidation pass, when it runs, and who\n  provides the model.\n- [`docs/evals.md`](docs/evals.md) — what we measure and why.\n- [`docs/api-design.md`](docs/api-design.md) — the rules the tool surface is held to.\n- [`CHANGELOG.md`](CHANGELOG.md) — what changed, and which failure it fixed.\n\n## Contributing\n\nIssues and pull requests welcome, particularly:\n\n- **Host integrations.** If lethe doesn't work cleanly in your editor or agent, that's a\n  bug worth reporting.\n- **Eval tasks.** The eval needs real pairs: something discovered in one session that a\n  later session needs. Invented ones encode our assumptions about what memory is for,\n  which is exactly what's being tested.\n- **Retrieval and consolidation quality.** Both are measured, so an improvement can be\n  demonstrated rather than argued.\n\n```sh\ngit clone https://github.com/alarv/lethe.git && cd lethe\nnpm install && npm test\n```\n\nCommit messages here are prose explaining the *why* and the failure being fixed, rather\nthan a conventional-commit prefix. [`AGENTS.md`](AGENTS.md) has the conventions,\nincluding how releases work.\n\n## The rule\n\nA memory that only grows is a log file. The value of a memory system is not what it\nstores — it is what it refuses to store.\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}