ctx_knowledge Memory & Multi-Agent Persistent project knowledge across sessions (facts, patterns, history). Supports recall modes, embeddings, feedback, and typed relations.
✓ When to Use
Storing and recalling project-specific knowledge - patterns, gotchas, conventions that persist across sessions.
✗ When Not to Use
For temporary findings (use ctx_session finding instead).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | "policy" | "remember" | "recall" | "pattern" | "feedback" | "relate" | "unrelate" | "relations" | "relations_diagram" | "consolidate" | "status" | "health" | "remove" | "export" | "timeline" | "rooms" | "search" | "wakeup" | "embeddings_status" | "embeddings_reset" | "embeddings_reindex" | Yes | Knowledge operation to perform. |
category | string | No | Fact category (architecture, api, testing, deployment, conventions, dependencies) |
confidence | number | No | Confidence score 0.0-1.0 for remember action (default: 0.8) |
examples | array | No | Examples for pattern action |
key | string | No | Fact key/identifier (e.g. 'auth-method', 'db-engine', 'test-framework') |
mode | "auto" | "exact" | "semantic" | "hybrid" | No | Recall mode (default: auto). exact: lexical only. semantic: embeddings-only. hybrid: semantic + exact matches. auto: hybrid if embeddings available, else exact. |
pattern_type | string | No | Pattern type for pattern action (naming, structure, testing, error-handling) |
query | string | No | Query/target (recall query, relate target 'category/key', relations direction in|out|all). |
resolution | string | No | For gotcha action: how to fix/avoid it (e.g. 'Use .clone() or ref pattern') |
severity | "critical" | "warning" | "info" | No | For gotcha action: severity level (default: warning) |
trigger | string | No | For gotcha action: what triggers the bug (e.g. 'cargo build fails with E0507 on match arms') |
value | string | No | Value for action (fact value, pattern text, feedback up/down, relation kind). |
Actions
policy ctx_knowledge action="policy"
remember ctx_knowledge action="remember"
recall ctx_knowledge action="recall"
pattern ctx_knowledge action="pattern"
feedback ctx_knowledge action="feedback"
relate ctx_knowledge action="relate"
unrelate ctx_knowledge action="unrelate"
relations ctx_knowledge action="relations"
relations_diagram ctx_knowledge action="relations_diagram"
consolidate ctx_knowledge action="consolidate"
status ctx_knowledge action="status"
health ctx_knowledge action="health"
remove ctx_knowledge action="remove"
export ctx_knowledge action="export"
timeline ctx_knowledge action="timeline"
rooms ctx_knowledge action="rooms"
search ctx_knowledge action="search"
wakeup ctx_knowledge action="wakeup"
embeddings_status ctx_knowledge action="embeddings_status"
embeddings_reset ctx_knowledge action="embeddings_reset"
embeddings_reindex ctx_knowledge action="embeddings_reindex"
CLI Equivalent
This tool is also available via the CLI:
lean-ctx knowledge remember/recall/search/export/import/remove/status/health Related Tools
484183a03fe3c634a0b8bfaa7a31bbc5 ← Back to all tools