v4.0 — Invisible Context Hydration

Claude that remembers
across sessions

Semantic memory for Claude Code. Research checkpoints, persistent knowledge, failure tracking, and invisible context hydration—so Claude never forgets.

Memory that persists

Checkpoints trigger at meaningful moments—synthesis, branch points, topic shifts. Context auto-restores after compaction. System folder and failures are always available.

     Research  ──────►  Trigger  ──────►  Save
         │            detected         checkpoint
         │                                 │
         │    ┌────────────────────────────┘
         │    │
         │    ▼     ~/.sage/checkpoints/
         │    │     watcher queues for session
         │    │
         │    └────────────────────────────┐
         │                                 │
         ▼                                 ▼
     Continue  ◄──────  Inject  ◄──────  Compaction
    seamlessly       from queue         detected
        

Triggers: synthesis, branch point, constraint, topic shift, manual, context threshold, pre-compact

What Sage does

📍
Semantic Checkpoints
Captures thesis, confidence, sources, tensions, and open questions. Not just text—structured research state.
v1.0+
📚
Knowledge Base
Store reusable insights with keyword triggers. Hybrid retrieval (70% semantic + 30% keyword) for accurate recall.
v1.0+
🔄
Session Continuity
Watcher daemon detects compaction and auto-injects context on next tool call. No manual restore needed.
v2.4+
Proactive Recall
Knowledge matching your project context is automatically surfaced at session start. Claude remembers what's relevant.
v2.5+
🧠
Skills Architecture
Methodology lives in Claude Skills that load on-demand. Progressive disclosure—complexity when you need it.
v2.6+
🔍
Structural Triggers
70/30 hybrid scoring detects topic drift, convergence, and synthesis moments automatically.
v2.3+
💻
Code-Aware Memory
Checkpoints track files explored/changed. AST-aware indexing with BGE embeddings. Semantic code search.
v3.1+
🔀
Git Context
Checkpoints capture branch, commit, and dirty state. Knowledge staleness detection via git diff.
v3.2+
📂
System Folder
Agent-managed pinned content in .sage/system/. Objectives, constraints, and context auto-injected every session.
v4.0+
Failure Memory
Track what didn't work and why. Failures auto-recalled to avoid repeating mistakes.
v4.0+
🔗
Knowledge Linking
Connect related knowledge items for multi-hop reasoning. Related, supersedes, contradicts, extends.
v4.0+
📎
MCP Resources
Direct @sage:// syntax for checkpoints, knowledge, and system files. No tool calls needed.
v4.0+
🌐
Local Web UI
Browse checkpoints and knowledge with sage ui. REST API for custom frontends. Obsidian-compatible markdown.
v3.2+

Methodology on demand

Sage ships methodology as Claude Skills. They load when context matches triggers—no always-on overhead.

sage-memory
Background Task pattern for non-blocking saves. Triggered by: checkpoint, save knowledge, autosave
sage-research
When and how to checkpoint during research. Triggered by: research, synthesis, hypothesis, branch point
sage-session
Session start ritual—call sage_health() for context injection. Triggered by: session start, hello, new session
sage-knowledge
Recall and save insights using sage_recall_knowledge and sage_save_knowledge. Triggered by: recall, remember, knowledge
sage-knowledge-hygiene
Evaluate and maintain knowledge freshness. Triggered by: stale knowledge, outdated, update knowledge

Install with: sage skills install

How it integrates

MCP Server
Model Context Protocol
30+ tools for checkpoints, knowledge, code search, todos, and config. Always available to Claude.
Skills
Claude Agent Skills
~/.claude/skills/sage/ — methodology loaded on-demand when context matches triggers.
Watcher Daemon
Session continuity
sage watcher start — detects compaction, queues checkpoints, injects context on restore.
Storage
Fully local, Obsidian-compatible
~/.sage/ — checkpoints, knowledge, failures, system folder. Markdown + YAML frontmatter.
MCP Resources
Direct context access
@sage://checkpoint/id — fetch data without tool calls. System files, knowledge, failures.

Get started

Install as a plugin for teams, or via pip for individual use.

Team Setup

Add to repo for automatic team installation. Teammates get prompted on folder trust.

// .claude/settings.json
{
"extraKnownMarketplaces": {
"b17z": { "source": { "source": "github", "repo": "b17z/sage" } }
},
"enabledPlugins": { "sage@sage": true }
}

Gets you: Auto-prompt for all team members

pip Install

Manual install for individual use or development.

$ pip install claude-sage[mcp]
$ sage mcp install # Add MCP server to Claude
$ sage skills install # Install methodology skills

Gets you: MCP server + skills + CLI

With Code Indexing

Include AST-aware code search and semantic indexing.

$ pip install claude-sage[mcp,code]
$ sage mcp install && sage skills install

Gets you: Everything + code search with sage_search_code()

Build from Source

For contributors or custom setups.

$ git clone https://github.com/b17z/sage
$ cd sage && pip install -e ".[dev,mcp,code]"

Then: sage mcp install && sage skills install