$ ~/.claude/memory/
├── shared/ # Cross-agent knowledge
└── agents/ ├── dev/ # Dev agent's notes ├── research/ # Research agent's notes └── ops/ # Ops agent's notes
~/.claude/memory/
├── shared/ # Cross-agent knowledge
└── agents/ ├── dev/ # Dev agent's notes ├── research/ # Research agent's notes └── ops/ # Ops agent's notes
~/.claude/memory/
├── shared/ # Cross-agent knowledge
└── agents/ ├── dev/ # Dev agent's notes ├── research/ # Research agent's notes └── ops/ # Ops agent's notes
---
tier: working
created: 2026-03-15
source: dev
expires: 2026-06-13
tags: [-weight: 500;">docker, decision]
---
---
tier: working
created: 2026-03-15
source: dev
expires: 2026-06-13
tags: [-weight: 500;">docker, decision]
---
---
tier: working
created: 2026-03-15
source: dev
expires: 2026-06-13
tags: [-weight: 500;">docker, decision]
--- - Persistent — context survives across sessions. Monday's agent knows what Friday's agent decided.
- Searchable — agents find relevant context automatically, not by loading everything into the prompt.
- Scoped — different agents see different things. Your infrastructure agent doesn't need your code review history. - Who you are and how you work (role, preferences, communication style)
- Your infrastructure overview (hosts, IPs, key services)
- Rules that apply everywhere (don't push to main, don't SSH without asking) - What this project is and what the agent's scope covers
- Project-specific conventions and constraints
- Pointers to where relevant documentation lives - Indexes your memory directories into a local vector store
- At session -weight: 500;">start, searches the index for context relevant to the conversation
- Auto-injects matching notes into the context window
- Captures session summaries automatically via a Stop hook - memsearch = automatic recall. Surfaces relevant context at session -weight: 500;">start without being asked. Good for "remind me of things I should know."
- qmd = intentional search. Agent explicitly queries when it needs specific information. Good for "find the decision about X" or "what does the architecture doc say about Y." - Scans session notes from the past week across all project stores
- Promotes durable items to working tier
- Reviews working notes older than 14 days
- Promotes qualifying notes to the distilled tier (-weight: 500;">git-backed)
- Expires stale working notes past 90 days
- Deduplicates (merges topical duplicates)
- Logs metrics and generates a health report - User profile (role, key skills, cognitive style)
- Active projects and their current -weight: 500;">status
- Key constraints (things every agent must know)
- Recent decisions (the last few important choices made across any project) - search — query SearXNG, get structured results with titles, URLs, snippets, and source engines
- search_and_fetch — search + fetch full text of the top result
- fetch_url — fetch and extract readable text from any URL - Write your global ~/.claude/CLAUDE.md — who you are, your infrastructure, your rules
- Write project CLAUDE.md files for each project directory
- Create the memory directory structure (~/.claude/memory/shared/, ~/.claude/memory/agents/)
- Define your frontmatter format (tier, created, source, expires, tags)
- Tell your agents (via CLAUDE.md) to write notes during sessions - Install memsearch — automatic context recall and session capture
- Deploy qmd — intentional search over memory + docs
- Index your memory directories and any infrastructure documentation - Start manually reviewing working notes — promote the important ones, delete the stale ones
- Write the core context file and inject it via a SessionStart hook
- When manual curation becomes a burden, automate with a nightly sync agent - Deploy SearXNG + searxng-mcp for private web search
- Add the knowledge graph if you're hitting relationship query limits
- Build skills (reusable instruction sets) for common memory operations