Skip to main content
PluginDefault onclawql-memory

Plugins · Registry · Plugin model

Memory (vault)

Plugin ID: clawql-memory
Package: packages/clawql-memory — MemoryPlugin

Persists durable session knowledge to an Obsidian-compatible vault and recalls it across chats. Agents should start with memory_recall (optionally with sources) and open read_around only when they need the enclosing Markdown section.

8.0: ClawQL PageIndex (pageindex_*, hybrid PageIndex, pageindex.db.json) and CodeGraph (codegraph_*, Graphify import/sync, clawql-codegraph) are both removed. See purge inventory, post-8.0 Vectify backlog, and post-8.0 CodeGraph backlog.

Memory 2.0 components

Each piece has one job. The vault is the only canonical store; everything else is a derived index, a code index, an external peer, or the recall facade.

ComponentUsed forUnique role
Obsidian / VaultStore knowledge as Markdown + YAML frontmatter under Memory/Canonical core every derived index and query path references or cites back into
Wikilinks + memory.dbParse [[links]] into SQLite (wikilink_edge, vault_chunk) on ingest; traverse on recallExplicit structured graph over the vault — link navigation without vectors
EmbeddingsVector representations of vault chunks for similarity in memory_recallFuzzy semantic retrieval when no wikilinks or structural paths exist
Onyxknowledge_search_onyx / sources: ["onyx"]; optional enterpriseCitations on ingestExternal search peer — supplies org knowledge without ClawQL owning the corpus

Write once, refresh indexes: memory_ingest always writes vault Markdown. Optional rebuild refreshes derived layers (memory.db/embeddings). Onyx stays a search peer (citations into the vault, not “ingest into Onyx”).

Agent habit: start with memory_recall (sources when needed) → follow followUps into specialists only when you need path / filtered enterprise search.

Erasure

Git-native vaults (CLAWQL_MEMORY_BACKEND=git) encrypt Memory notes with per-note keys (crypto-shredding). Erase destroys the key so history/R2 ciphertext is unreadable; WORM records opaque pathId + content hash only; erased hashes feed the inference export deny-list.

EnvDefaultRole
CLAWQL_MEMORY_BACKEND=gitoffCommit-on-ingest; enables crypto-shred by default
CLAWQL_MEMORY_CRYPTO_SHREDon when backend=gitForce 1/0 to enable/disable per-note encryption
.clawql/note-keys/gitignoredPer-note AES keys — destroyed on erase
.clawql/path-map.jsongitignoredReadable path ↔ opaque pathId (erasable)
.clawql/erasure-deny.jsongitignoredContent hashes skipped by clawql inference export

Full write-up: memory-obsidian § Erasure · gateway ladder § Erasure · site: Learn memory.

MCP tools

ToolPurpose
memory_ingestWrite structured insights, wikilinks, and optional verbatim tool output to the vault
memory_recallMulti-source recall (sources) → hits[] + followUps; vault results kept
read_aroundExpand a path/chunk hit into the enclosing Markdown heading section

memory_recall sources

{
  "query": "AuthService rate limit",
  "sources": ["vault", "vector", "onyx"],
  "limit": 10,
  "maxDepth": 2
}
SourceWhat it contributes
vaultLexical + wikilink BFS over Obsidian Markdown (ranker: IDF)
vectorEmbedding KNN seeds (when vector backend + API key configured)
onyxEnterprise citations via injected Onyx search

Defaults when sources is omitted: vault + vector, plus the Onyx hybrid from env (CLAWQL_MEMORY_RECALL_HYBRID_ONYX).

Response:

  • results — vault-side hits (backward compatible)
  • hits — normalized multi-source hits (source, id, score, snippet, …)
  • followUps — specialist tool hints (knowledge_search_onyx, …)
  • sourcesUsed / sourceNotes — what ran and skip reasons
  • vaultRanker — always idf when vault was queried (bm25 removed in 8.0.0 — purge, wash vs IDF)

Vault lexical ranker

EnvDefaultEffect
CLAWQL_MEMORY_VAULT_RANKER=idfidfCorpus IDF × log-TF (#801); only mode — bm25 removed in 8.0.0 (wash vs IDF, see purge inventory)

memory_ingest rebuild

{
  "title": "AuthService rate limits",
  "insights": "## Finding\n…",
  "wikilinks": ["API hardening"],
  "enterpriseCitations": [],
  "rebuild": { "embeddings": true }
}
FlagEffect
rebuild.embeddingsRun memory.db / embedding sync (default on when memory.db enabled; false skips)

Enable / disable

EnvDefaultEffect
CLAWQL_ENABLE_MEMORY=0onOmit MemoryPlugin and hide memory tools
CLAWQL_MEMORY_RECALL_HYBRID_ONYX=1offDefault sources includes onyx (needs Onyx wired + enabled)
CLAWQL_MEMORY_VAULT_RANKERidfVault lexical ranker — idf is the only mode (bm25 removed in 8.0.0)

Prerequisites

  • Writable CLAWQL_OBSIDIAN_VAULT_PATH (Docker images often use /vault)
  • Tools register even without a vault path, but vault I/O fails until the path is configured
  • Onyx in sources: CLAWQL_ENABLE_ONYX=1 + documents/onyx in merge; MCP wires search into memory

Optional hybrid vector index: see memory-db-hybrid-implementation.md in the repo.

Typical workflow

  1. memory_recall with a focused query (add sources when you need code/enterprise in one shot)
  2. Follow followUps only when you need path or filtered Onyx
  3. Do work with search / execute
  4. memory_ingest with decisions + wikilinks

Learn more