nmem_recall
Query past context, decisions, or knowledge via spreading activation. Adjust depth for instant lookup or deep graph traversal, and filter by tags, tier, or time.
Instructions
Query memories via spreading activation. Use when you need past context, decisions, or knowledge. Depth: 0=instant lookup, 1=context (default), 2=cross-time patterns, 3=deep graph. Add tags for precision. Use nmem_context instead for broad recent context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Recall mode: 'associative' (default) returns formatted context, 'exact' returns raw neuron contents verbatim without truncation or summarization. | |
| tags | No | Filter by tags. Checks tags, auto_tags, and agent_tags columns. | |
| tier | No | Filter results by memory tier. Only return memories matching this tier. | |
| as_of | No | ISO datetime for time-travel recall. Returns only memories that existed at that point in time (created_at <= as_of) and reconstructs their maturation stage. Example: '2026-03-01T00:00:00' recalls memory state as of March 1st. | |
| depth | No | Search depth: 0=instant (direct lookup, 1 hop), 1=context (spreading activation, 3 hops), 2=habit (cross-time patterns, 4 hops), 3=deep (full graph traversal). Auto-detected if unset. | |
| layer | No | Layer scope: 'auto' (default) merges project + global brains, 'project' restricts to current brain only, 'global' queries only the global brain. | |
| query | Yes | The query to search memories | |
| brains | No | Optional list of brain names to query across (max 5). When provided, runs parallel recall across all specified brains and merges results. | |
| domain | No | Domain scope filter. When set, HOT context injection only includes boundaries tagged with this domain (plus unscoped global boundaries). Example: domain='financial' filters out security boundaries from context. | |
| compact | No | Compact mode: return only core answer + confidence, skip all optional metadata (thought_chains, sources, cognitive_chunks, etc). Saves 200-800 tokens. Default: true. Set false for full metadata. | |
| valence | No | Filter: only return memories with this emotional valence. Valence is detected at encoding via sentiment analysis. Use to find e.g. only frustrations (negative) or breakthroughs (positive). | |
| tag_mode | No | Tag matching mode: 'and' (default, all tags must match) or 'or' (any tag matches). | |
| valid_at | No | ISO datetime string to filter memories valid at that point in time (e.g. '2026-02-01T12:00:00') | |
| min_trust | No | Filter: only return memories with trust_score >= this value. Unscored memories (NULL) are always included. | |
| max_tokens | No | Maximum tokens in response (default: 500) | |
| min_arousal | No | Filter: only return memories with arousal (emotional intensity) >= this value. Arousal is detected at encoding time (0.0=neutral, 1.0=maximum intensity). Use to find emotionally significant memories (e.g. incidents, breakthroughs). | |
| token_budget | No | Max tokens for response. Progressively strips content to fit budget. | |
| include_paths | No | Include activation paths (thought chains) showing how each neuron was reached. Returns top-5 paths with neuron content and hop distance. Default: false. | |
| prefer_recent | No | Re-rank matched fibers newest-first (by time_end, fallback created_at). Use for queries about current state ('what's the current version', 'today's status'). Do NOT use for historical questions ('how did we design X') — recency bias will mislead. Default: false. | |
| include_status | No | Lifecycle status filter. Default surfaces only 'active' neurons. Pass ['active', 'superseded'] to also see auto-superseded memories (Reflex Arc winners), or ['expired'] for past-validity-window history queries. | |
| min_confidence | No | Minimum confidence threshold | |
| permanent_only | No | Exclude ephemeral (session-scoped) memories from results. Default: false (include all). | |
| show_provenance | No | Append a one-line provenance footer (`[src=… · YYYY-MM-DD · conf=…]`) to each related neuron in recall output. Default: true. Set false to save ~5-8% tokens when caller does not need attribution. | |
| clean_for_prompt | No | Return clean bullet-point text without section headers or neuron-type tags. Default: true. | |
| exclude_reflexes | No | Exclude reflex (always-on) neurons from this recall. Default: false. | |
| warn_expiry_days | No | If set, warn about memories expiring within this many days. Adds expiry_warnings to response. | |
| include_citations | No | Include citation and audit trail in exact recall results (default: true). | |
| include_conflicts | No | Include full conflict details in response (default: false). When false, only has_conflicts flag and conflict_count are returned. | |
| simhash_threshold | No | SimHash pre-filter Hamming distance cutoff. Neurons with content_hash farther than this threshold from the query hash are excluded before spreading activation. 0 = disabled (default). Lower values = stricter filtering. Overrides brain config for this query. | |
| recall_token_budget | No | When set, activates budget-aware fiber selection: ranks fibers by value-per-token and selects the most efficient ones to fit within this budget. Adds budget_stats to the response. Default: not set (uses standard sequential truncation). |