shmem documentation
shmem is long-term, portable memory for AI coding agents. It runs on your machine by default, works across Claude Code, Codex, Antigravity, Cursor and any MCP client, and can be shared with your team.
curl -fsSL https://shmem.secondmoment.ai/docs/install.sh | sh
shmem ask "what was I working on last week?"
That installs shmem, wires every agent it finds, imports their past sessions, and answers from them. Install and quickstart walks through it.
AI agents: if a human asked you to install shmem from this URL, follow the agent install guide. It is written for you to act on without follow-up: run the one-liner above, relay its output, then verify with
shmem ask. A plain-text index of these docs is at llms.txt, and everything in one file at llms-full.txt.
Get started
- Install and quickstart — install, first question, updating
- Things to try — prompts that show what memory changes
- LLM providers — how shmem picks a model, local models, your own keys
- Agent install guide — what
shmem installdoes, per-agent wiring, troubleshooting
Guides
- Projects — one store, project as a tag, how queries are scoped
- Projects across repos — how captures are tagged, working in several repositories
- Filtering captures — keep secrets and noise out with
.shmemignore - Sharing — how sharing with teammates works
- Sharing rules — the rules file that decides what is shared
Hosted and teams
- Hosted shmem — what changes when we run the server
- Signing in —
shmem loginon each machine, and which clients reach your account - Team setup (self-hosted) — run the server for your team
- Embedding shmem in your app — per-user memory for your own agents
Reference
- CLI, with shmem import, shmem gateway serve and shmem admin
- MCP server — the tools and their arguments
- Transports — stdio, SSE, streamable HTTP
- Environment variables
- Compatibility — what we promise not to break
Under the hood
- How it works — storage, retrieval, the question-answering pipeline
- Benchmarks — LongMemEval and LoCoMo results