Local long-term memory store for AI agents (Claude, Antigravity, ChatGPT).
mem is a fast single-binary memory daemon with a command-line interface, a Model Context Protocol (MCP) server over stdio, an embedded web UI dashboard, and hybrid search combining BM25 keyword matching and vector search with embedded SQLite and wazero WASM runtime.
Documentation: https://07prajwal2000.github.io/memory/
Install globally via npm:
npm i -g @07prajwal2000/agent-memoryThe package provides three equivalent command aliases: mem, memory, and agent-memory.
Note on global conflicts: A global install fails with
EEXISTif another global package already owns one of those command names. Runnpm i -g --force @07prajwal2000/agent-memoryto overwrite or use localnpxto avoid conflicts.
Initialize the data directory and configuration:
mem initOr run one-off without global installation:
npx @07prajwal2000/agent-memory initmem provides an MCP server over stdio with tools for semantic search, memory retrieval, upsert, and deletion.
Global installation:
claude mcp add mem -- mem mcpVia npx:
claude mcp add mem -- npx -y @07prajwal2000/agent-memory mcpAdd to your MCP client configuration (such as Claude Desktop claude_desktop_config.json):
Global:
{
"mcpServers": {
"mem": {
"command": "mem",
"args": ["mcp"]
}
}
}Via npx:
{
"mcpServers": {
"mem": {
"command": "npx",
"args": ["-y", "@07prajwal2000/agent-memory", "mcp"]
}
}
}Install the skill for agent runtimes:
npx skills add 07prajwal2000/memoryStart the embedded web dashboard server:
mem serverAccess the dashboard at http://127.0.0.1:18945 to inspect stored memories, search indices, and daemon health.
Memories are organized into scoped contexts (default: global):
mem context ls # List contexts
mem context create [slug] # Create permanent context
mem context create [slug] --temp # Create temporary context (default 7 days)
mem context create [slug] --expiry 14 # Create context with custom expiry (days)
mem context expiry <slug> <days|none> # Update or remove expiry
mem context rm <slug> --yes # Delete context and its memoriesBy default, all data (SQLite database, vector index, and Markdown files) is stored in:
~/.mem
Override the data directory with the --data-dir flag or the MEM_DATA_DIR environment variable.
MIT