engram_recall
Retrieve relevant memories ranked by a hybrid score combining similarity, recency, and confidence. Use at session start or to look up specific facts.
Instructions
Retrieve memories relevant to a query, ranked by a hybrid score. Embeds the query, gathers candidates (FTS5 top-20 plus in-namespace embeddings, optionally time-filtered), and scores each by similarity×0.45 + recency×0.15 + confidence×0.15 + access×0.05 + feedback×0.10 + a 0.1 FTS boost, then filters by category/threshold and returns the top results. If embedding generation fails it falls back to FTS-only search. Reading a memory bumps its last_accessed and access_count. Returns: an array of memory objects — each with id, content, category, entity, confidence, namespace, tags, timestamps, score, and scoreBreakdown — or an empty array if nothing clears the threshold (with a time_filter, the array also carries timeRange metadata). Use at session start or to look up a specific fact; prefer engram_context when you want a ready-to-inject block instead of raw results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum memories to return, 1–20 (default 5). Keep low to avoid context pollution. | |
| query | Yes | What you want to remember. Can be a question ("what is their deployment setup?") or a topic ("docker configuration"). Be specific for better results. | |
| category | No | Optional filter by memory type (preference/fact/pattern/decision/outcome). Omit to search all types. | |
| namespace | No | Optional project/scope filter. Omit to search across all namespaces. | |
| threshold | No | Minimum relevance score to include a result, 0.0–1.0 (default 0.3). Raise for fewer, more precise results. | |
| time_filter | No | Restrict results to a time range by created/updated time. Provide after/before, or a period shorthand. Supports relative times like "3 days ago", "last week", or ISO dates. |