# shared-agent-memory

Source: https://aunysillyme.dev/projects/shared-agent-memory/

Shared memory for AI coding agents: installs a collector, a local SQLite vector store and one MCP search tool so Claude Code, Codex and Gemini CLI share memory

[npm](https://www.npmjs.com/package/shared-agent-memory) [Docs](https://aunysillyme.dev/projects/shared-agent-memory/docs/)

v0.1.0 · Runs on your machine · Scanned before stored · One MCP search tool · MIT licensed

`npx shared-agent-memory`

[Star on GitHub](https://github.com/aunysillyme-dev/shared-agent-memory)

## What this does

[shared-agent-memory trailer](https://aunysillyme.dev/projects/shared-agent-memory/assets/trailer.mp4)

Silent video

## Get started

Go from install to your first shared search.

1. ### Run setup

   It detects your AI tools, shows what it found and writes a scheduler entry that collects every 3 hours.
2. ### Set two keys

   Supply different SAM_WRITE_KEY and SAM_READ_KEY values through your environment.
3. ### Check, collect and search

   Run doctor, start the server, collect once and search across every AI.
4. ### 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](https://aunysillyme.dev/projects/shared-agent-memory/docs/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 memory](https://aunysillyme.dev/projects/shared-agent-memory/docs/where-is-my-memory/)

### Scan 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 steps](https://aunysillyme.dev/projects/shared-agent-memory/docs/how-it-works/)

### Search from any AI over MCP.

One tool, memory_search, with privacy tags applied before ranking. Hits come back framed as stored data.

[Read the API](https://aunysillyme.dev/projects/shared-agent-memory/docs/api/)

## Docs and guides

- [Overview Install, setup, commands and uninstall.](https://aunysillyme.dev/projects/shared-agent-memory/docs/overview/)
- [How it works Every step from collection to search.](https://aunysillyme.dev/projects/shared-agent-memory/docs/how-it-works/)
- [Where is my memory Paths for each AI tool, with sources.](https://aunysillyme.dev/projects/shared-agent-memory/docs/where-is-my-memory/)
- [Write a profile Add support for another AI tool.](https://aunysillyme.dev/projects/shared-agent-memory/docs/writing-a-profile/)
- [API The HTTP API and the MCP tool.](https://aunysillyme.dev/projects/shared-agent-memory/docs/api/)
- [Build brief A plain spec another AI can follow.](https://aunysillyme.dev/projects/shared-agent-memory/docs/ai-brief/)
- [Stack and budgets Why Node, SQLite and one dependency.](https://aunysillyme.dev/projects/shared-agent-memory/docs/stack/)
- [Provenance Where every part came from.](https://aunysillyme.dev/projects/shared-agent-memory/docs/provenance/)
- **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.yaml` and set `enabled: 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 --host` to its private address, set `server` in `config.json`, and keep transport inside an encrypted private network. **How do I uninstall it?**

  Run `shared-agent-memory uninstall --dry` to preview, then `shared-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.

[How it works](https://aunysillyme.dev/projects/shared-agent-memory/docs/how-it-works/) [Conformance suite](https://github.com/aunysillyme-dev/shared-agent-memory/tree/main/conformance)

## Releases

### Version history

- [`v0.1.0`](https://github.com/aunysillyme-dev/shared-agent-memory/tree/v0.1.0) · 5 Dec 2026

[Full version history](https://aunysillyme.dev/projects/shared-agent-memory/versions/)
