Research & Memory

Clew provides a built-in deep research system and cross-session semantic memory — both designed to work with local files, web sources, and a persistent knowledge store.

Research System

The research system lives in src/research/ and supports deep, source-grounded research across local files, wiki content, and memory:

  • Citation extraction — Automatic extraction of citations from research sources
  • Claim verification — Fact-check claims against multiple sources
  • Dossier generation — Structured reports with source attribution
  • Truth checking — Cross-reference claims for accuracy
  • Source ranking — Prioritize authoritative sources

Research Commands

CommandDescription
/researchDeep source-grounded research across local files, wiki, and memory

Memory System

The memory system lives in src/memory/ and provides cross-session persistent knowledge storage with SQLite FTS5 search:

  • SQLite FTS5 search — Find relevant memories using FTS5 similarity
  • Cross-lingual — Search across languages using FTS5 indexing
  • Memory age tracking — Automatically prune old memories
  • Auto-memory capture — Automatically save important information
  • Token-aware chunking - 3000-token chunks with word-boundary splitting
  • Secret redaction - Strips API keys and tokens before indexing

Memory Commands

CommandDescription
/memoryEdit Claude memory files
/memory-searchSearch memories using SQLite FTS5 search (cross-lingual)

Architecture Files

PathRole
src/research/Deep research, dossier generation, truth checking, source ranking
src/memory/SQLite FTS5 memory search (14 files, no embeddings)