Created by: Xule LinGitHub: linxule/memex-pluginCore insight: “The context window is the only thing that makes a given instance of Claude this instance. Memex preserves it.”
Why This Matters for Research
Research projects span weeks or months. Each session with Claude builds understanding — which papers matter, what theoretical tensions you’re tracking, why you chose one methodology over another. Without persistent memory, every new session starts from scratch. Memex captures the collaborative journey:- Decisions and rationale — not just what you decided, but why
- Perspectives and tensions — disagreements and tradeoffs, not just conclusions
- Evolving understanding — how your thinking developed across sessions
How It Complements Claude’s Built-in Memory
Claude Code’s native auto-memory stores preferences and conventions — “always use uv”, “prefer Sonnet for quick tasks.” Think of it as working memory: how you work. Memex is collaborative long-term memory: what you’ve worked on together, how you got there, and what’s still open.| Auto-memory (built-in) | Memex | |
|---|---|---|
| Scope | Session-scoped preferences | Cross-session archive |
| Captures | Conventions, patterns | Full transcripts + structured memos |
| Granularity | Key-value pairs | Per-compaction-window transcripts |
| Search | Exact match | Hybrid FTS + semantic |
| Answers | ”What does this user prefer?" | "Why did we choose this approach 3 weeks ago?” |
How It Works
Two-Layer Memo System
- Layer 1: Lived Experience
- Layer 2: Safety Net
The active Claude instance writes memos after substantial collaborative work (~20 messages). These memos carry the weight of having been there — the nuanced understanding that comes from working through a problem together.Layer 1 memos capture:
- Key decisions and their context
- Tensions between competing approaches
- Insights that emerged through dialogue
- What was tried and why it worked (or didn’t)
Obsidian Vault Integration
Memos organize into an Obsidian vault with:- Project folders — memos grouped by research project
- Wikilinks — connections across sessions and projects
- Hybrid search — full-text + optional semantic search
- Knowledge graphs — visualize how your research connects
Commands
| Command | What it does |
|---|---|
/memex:search <query> | Search memos — hybrid FTS + vector |
/memex:save [title] | Save current context as a memo |
/memex:load <topic> | Load past context into the current session |
/memex:synthesize | Find patterns across recent memos — contradictions, drift |
/memex:status | Show vault statistics |
/memex:maintain | Check vault health — broken links, orphans |
/memex:merge | Synthesize multiple memos into a concept note |
/memex:open | Open vault in Finder/Obsidian |
/memex:retry | Retry failed memo generations |
Automatic Hooks
The plugin hooks into Claude Code’s session lifecycle automatically:| Hook | When | What |
|---|---|---|
SessionStart | New session | Loads project context, recent memos, open threads |
UserPromptSubmit | Each message | Tracks activity, nudges to save after ~20 messages |
SessionEnd | Session closes | Archives transcript |
PreCompact | Before compaction | Writes signal file for safety-net memo generation |
Research Workflow Example
Week 1: You and Claude analyze 20 papers, develop initial coding framework. Memex captures the framework rationale and which papers were pivotal. Week 3: You return after a break./memex:search coding framework loads the context — not just the framework itself, but why you made each decision.
Week 5: You’re writing up methodology. /memex:synthesize surfaces how your analytical approach evolved across sessions, giving you the reflexivity narrative for your paper.
Installation
Prerequisites
Required
- Claude Code CLI
- Python 3.10+ with uv
Optional
- Obsidian for visual graph navigation
GEMINI_API_KEYor LM Studio for semantic search (keyword search works without it)
Quick Start
Configuration
Create~/.memex/config.json to customize your vault location:
config.json.example in the plugin repo for all available options.
Import Existing Sessions
If you’ve been using Claude Code already, you have transcripts worth importing. Thediscover_sessions.py tool scores existing sessions by file edits, commits, and duration to find the ones with real collaborative work:
Semantic Search (Optional)
Without embeddings, keyword search (FTS5) works out of the box. For semantic search:Part of the Research Memex Ecosystem
Memex Plugin works alongside:- Interpretive Orchestration Plugin — Persistent memory across stages of qualitative analysis
- Obsidian Setup Guide — Your knowledge management hub where memos live
- Claude Code Setup Guide — The research environment where Memex operates