Claude Code
Plugin for Claude Code with lifecycle hooks. Reads your Working Memory at session start, searches when relevant, and saves insights at the right moment.
claude plugin marketplace add nowledge-co/community && claude plugin install nowledge-mem@nowledge-communityPlugin-Native
Claude Code supports plugins -- install once for built-in autonomous behavior. No system prompts or MCP configuration needed.
Your agent searches what you know, saves what matters -- without you asking.
Your first success state
Install the plugin, make sure nmem is available, start a new Claude Code session, and verify one real behavior: Working Memory loads at session start, or /search / /save works without extra wiring.
Before You Start
- Nowledge Mem running locally (installation) or a reachable remote Mem server
- Claude Code installed
Setup
Install the plugin
# Add the Nowledge community marketplace
claude plugin marketplace add nowledge-co/community
# Install the Nowledge Mem plugin
claude plugin install nowledge-mem@nowledge-communityThe plugin requires nmem CLI:
# Option 1 -- uvx (no installation needed)
curl -LsSf https://astral.sh/uv/install.sh | sh
uvx --from nmem-cli nmem --version
# Option 2 -- pip
pip install nmem-cliOn Windows/Linux with the Nowledge Mem desktop app,
nmemis already bundled. On macOS or remote servers, useuvxor install manually.
Use it
Slash commands:
/save-- Save the current session to Nowledge Mem/sum-- Distill insights from this conversation/search <query>-- Search your knowledge base/status-- Check server connection and status
Natural language: Say "Save this session" or "Distill this conversation" and Claude runs the right nmem command automatically.
Autonomous (skills): The plugin includes three skills that run on their own:
- Read Working Memory -- loads your daily briefing at session start and after context compaction
- Search Memory -- searches when you reference past work
- Distill Memory -- suggests distillation at breakthrough moments
On request: Save Thread -- saves sessions when you ask ("save this session", "checkpoint this")
Update the plugin:
claude plugin marketplace update
claude plugin update nowledge-mem@nowledge-community
# Restart Claude Code to apply changesLifecycle Hooks
The plugin uses Claude Code hooks for automatic lifecycle management:
| Event | Trigger | Action |
|---|---|---|
SessionStart (startup/resume/clear) | New session, resume, or clear | Loads Working Memory via nmem wm read (API), falls back to local file |
SessionStart (compact) | After context compaction | Re-loads Working Memory + prompts Claude to checkpoint progress |
UserPromptSubmit | Every user message | Injects search/save syntax as context Claude can see |
Stop | Model finishes responding | Captures session to knowledge graph (async, idempotent) |
Working Memory context is always present. The Stop hook ensures sessions are captured even when Nowledge Mem runs on a different machine (remote mode).
Local vs Remote
The plugin works transparently in both modes:
- Local (Mem on same machine): Working Memory read from API or
~/ai-now/memory.md. Sessions captured by both the desktop app file watcher and the Stop hook. - Remote (Mem on different machine): Create
~/.nowledge-mem/config.jsonwith your connection settings. ThenmemCLI reads this automatically -- no environment variables needed.
{
"apiUrl": "https://your-server:14242",
"apiKey": "your-key"
}You can also use environment variables (NMEM_API_URL, NMEM_API_KEY) which override the config file. Priority: CLI flags > env vars > config file > defaults.
When the Stop hook runs nmem t save --from claude-code, Claude's session files are read locally on the machine running Claude Code, then uploaded to Mem as normalized thread messages. The remote Mem server does not need direct access to ~/.claude.
Go Further
AGENTS.md -- a complete memory-keeper agent example using the agents.md standard. Works with any AI coding agent.
Related
- Integrations overview -- native integrations, reusable packages, MCP, and browser capture
- Claude Desktop · Codex CLI · Alma · OpenClaw · Raycast · Other Chat AI