npx shared-agent-memoryAI memory filesEvery 3 hours the collector reads each AI's memory files.
Secret scanA batch with a secret is refused
Local storeSQLite with sqlite-vec
memory_searchOne MCP tool for every AI
Claude Code, Codex CLI and Gemini CLI keep writing their own files.
shared-agent-memory copies them into one store any AI can search.
What this does
Get started
Go from install to your first shared search.
Run setup
It detects your AI tools, shows what it found and writes a scheduler entry that collects every 3 hours.
Set two keys
Supply different SAM_WRITE_KEY and SAM_READ_KEY values through your environment.
Check, collect and search
Run doctor, start the server, collect once and search across every AI.
Connect your AI
Point any MCP host at shared-agent-memory mcp --ai <tool>.
npx shared-agent-memory
shared-agent-memory doctor
shared-agent-memory serve
shared-agent-memory collect
shared-agent-memory search "project conventions"Setup never installs other tools or edits an AI's configuration.
Read the full overview
Requirements
Node 22 or newer
The store uses node:sqlite with the sqlite-vec extension.
gitleaks
The default scanner. Setup prints the official install command when it is missing.
Ollama
Runs nomic-embed-text locally for 768-dimension embeddings.
An AI tool with memory files
Claude Code, Codex CLI, Gemini CLI, or a ChatGPT export. Add a profile for another tool.
Collect from every AI you use.
One profile per tool says where its memory lives, from that tool's own docs. Transcripts stay off unless you turn them on.
Where each AI keeps memoryScan before anything is stored.
A batch holding a secret is refused whole, and no scanner means nothing is saved. Mass deletes and empty inventories are refused too.
Follow the 33 stepsSearch from any AI over MCP.
One tool, memory_search, with privacy tags applied before ranking. Hits come back framed as stored data.
Read the APIDocs and guides
- OverviewInstall, setup, commands and uninstall.
- How it worksEvery step from collection to search.
- Where is my memoryPaths for each AI tool, with sources.
- Write a profileAdd support for another AI tool.
- APIThe HTTP API and the MCP tool.
- Build briefA plain spec another AI can follow.
- Stack and budgetsWhy Node, SQLite and one dependency.
- ProvenanceWhere every part came from.
Common questions
Can every AI tool use this memory?
Any host that supports MCP stdio can search it. Source collection needs a profile; add one for a tool whose files are documented.
Where does my memory go?
It stays in the configured SQLite database and your existing source files. Embedding requests go to local Ollama by default.
How do I enable transcripts?
Edit a source entry in
sources.yamland setenabled: true. Only documented transcript kinds are offered.Why did collection refuse a batch?
Run
shared-agent-memory doctor. Check scanner availability, distinct keys, source readability and deletion counts.How do I use a private network?
Bind
serve --hostto its private address, setserverinconfig.json, and keep transport inside an encrypted private network.How do I uninstall it?
Run
shared-agent-memory uninstall --dryto preview, thenshared-agent-memory uninstall. Edited files and the database are kept unless you pass--purge.
Evidence you can inspect
- 57451 bytes
- Packed package sizeMeasured 2026-12-05 · Expires 2027-03-05
- 118 files
- Packed file countMeasured 2026-12-05 · Expires 2027-03-05
- 1 package
- Runtime dependencies (sqlite-vec)Measured 2026-12-05 · Expires 2027-03-05
- 82 cases
- Node test cases passedMeasured 2026-12-05 · Expires 2027-03-05
- 7 cases
- Conformance cases over the CLI and HTTP APIMeasured 2026-12-05 · Expires 2027-03-05
Dated package measurements you can re-run in the repository with npm test and npm pack --dry-run. The conformance cases include a planted key that is refused and never searchable.