Expand description
Memory Layer 2 — Semantic facts with search.
Extends the existing remember/recall/forget tools with structured
facts storage, pure Rust full-text search, deduplication, and eviction.
Facts are stored in JSONL format at:
Each fact has:
id(monotonic “F1”, “F2”, …)text(the fact content)tags(optional categorisation)source(optional provenance, e.g. “user”, “agent”)created_at(RFC 3339 timestamp)last_accessed(RFC 3339 timestamp, updated on recall)access_count(how many times recalled)superseded_by(optional fact ID that replaces this one — soft delete)
Structs§
- Fact
- A single semantic fact.
- Fact
Store - The on-disk fact store (JSONL).
- Forget
Fact - Recall
Fact - Remember
Fact - Scored
Fact - A search result with a relevance score.
- Update
Fact
Functions§
- facts_
path - Determine the facts file path for a given scope.
- facts_
summary - Build a facts summary string for injection into the system prompt. Merges workspace-scoped and global-scoped facts, then returns the top N most recently accessed facts as a formatted block.
- load_
facts - Load the fact store for a given scope.
- search_
facts - Search facts by query text, returning scored results sorted by relevance.