Getting Started with Palimem
Palimem is governed, local-first memory for coding agents. It keeps facts current through supersession, routes context by scope, and preserves a full audit trail — all on your own disk. No cloud account required.
This guide gets you running in under five minutes. npm and the Claude Code plugin are the recommended paths — cloning the repository is optional for contributors and advanced setups.
What is Palimem?
Section titled “What is Palimem?”Palimem stores agent memory as a layered structure — a palimpsest. Every write appends to an immutable log. Derived semantic units hold current truth. When facts change, new writes supersede old ones rather than silently overwriting history.
- Write — Append to the write-ahead log; supersede on conflict
- Derive — Current semantic units reflect truth on top
- Recall — Scoped search (user / session / repository)
- Audit — Point-in-time recall and export when you need proof
Before you begin
Section titled “Before you begin”- Node.js 18+ (for
@palimem/mcpon npm) @palimem/mcpv1.7.2 on npm (npx -y @palimem/mcp@latest) or the Claude Code plugin — spec v1.7.0 (behavior); component metadata 1.7.1- For clone-based install: Python 3.13+ and Git
Install
Section titled “Install”MCP harnesses — Cursor, Windsurf, Copilot CLI, Codex, VS Code, Gemini CLI. No clone required:
npx -y @palimem/mcp@latest ai-memory connect <harness> \ --project-root "$(pwd)" \ --launcher npx \ --data-dir .ai-memory/dataReplace <harness> with cursor, windsurf, copilot, codex, vscode, or gemini.
--launcher npx writes MCP config with npx -y @palimem/mcp. See the matching integration page for harness-specific targets.
Run the MCP server directly:
npx -y @palimem/mcp@latestManual MCP config (npm) — if you prefer to hand-edit instead of using ai-memory connect:
{ "mcpServers": { "memory-service": { "command": "npx", "args": ["-y", "@palimem/mcp"], "env": { "MEMORY_SERVICE_DATA_DIR": ".ai-memory/data" } } }}Simplest path for Claude Code — plugin, MCP server, and hooks in one install:
claude plugin marketplace add palimem/palimemclaude plugin install memory-service@palimemSee Claude Code plugin for hooks and verification.
For contributors or when you need the full source tree:
-
Clone and install Node dependencies
Terminal window git clone https://github.com/palimem/palimemcd palimemcd app && npm install && cd .. -
Claude Code — copy MCP config
Terminal window cp examples/claude-code/.mcp.json . -
Enable lifecycle hooks (recommended)
Terminal window cp examples/claude-code/hooks.json .claude/hooks.json -
Other harnesses — connect helper
Terminal window node app/scripts/ai-memory.js connect cursor \--project-root "$(pwd)" --data-dir .ai-memory/data
Fallback without npm registry: npx github:palimem/palimem ai-memory connect <harness> --launcher npx …
Verify
Section titled “Verify”Ask your agent (in Claude Code, Cursor, or your connected harness):
- Call
tools/list— expect 11 tools (includingmemory_query_temporalandmemory_audit_export). - Call
memory_statuswith scoperepositoryand your project namespace — expectok: trueandindex_status.state: "current".
If tools/list shows 9 tools instead of 11, update to spec v1.7.0.
Agent prompt
Section titled “Agent prompt”Paste this into your agent chat to configure Palimem:
Install Palimem as governed local memory for this project.
- Project: Palimem (spec v1.7.0)- Prefer: Claude Code plugin if available, else npx -y @palimem/mcp@latest ai-memory connect <harness> --launcher npx- Data directory: .ai-memory/data- Verify: tools/list shows 11 tools; memory_status reports ok and index current
Use the install instructions at: https://palimem.com/docs/getting-started/#installDo not enable cloud services unless I ask.Seed memory (optional, clone path)
Section titled “Seed memory (optional, clone path)”Pre-load your user profile and project notes from Markdown files (requires a cloned repository):
python3 app/import_markdown.py \ --data-dir .ai-memory/data \ examples/markdown/USER.md.sample \ examples/markdown/MEMORY.md.sampleNext steps
Section titled “Next steps”- v1.7.2 release notes — current npm package; version matrix (spec / component / npm)
- v1.7.0 release notes — component spec highlights, Phase 6 integrations, verification commands
- Installation — platform prerequisites, Docker image, data directory details
- Use with Claude Code — full hooks setup and troubleshooting
- Claude Code plugin — marketplace install path
- Palimpsest model — how supersession and layered memory work
- MCP tools reference — all 11 tools with arguments and behavior