reconstruct
The recommended way to answer a question from memory. Returns up to count ITEMS (10 by default): units of memory, each quoting verbatim its most relevant record.
Instructions
The recommended way to answer a question from memory. Returns up to count ITEMS (10 by default): units of memory, each quoting verbatim its most relevant record. content is the parts of that record that matched the query; pass head_ref, or an item's expand as it is, to get_contents to read more. No model is called and nothing is summarised; stored rows are never modified. COUNT IS A CEILING, not a fill target or a search depth: fewer items is a normal result and carries shortfall_reason, and nothing is padded. With the block arm on, up to reserved_count held items may follow the window. Breadth is set apart from count: raise top_k when items are missing evidence; max_hops and max_evidence bound the declared-relation walk and the rows kept per item. BUDGET bounds the characters of quoted text (content plus excerpts), where count bounds items: excerpts are omitted before items, and raising the budget never removes an item or an excerpt. Omit it for the server default. mode (lite / pro) caps the tokens returned (see it). READ FURTHER IN STEPS, smallest first: an item's expand, then the neighbouring nodes ({ref, node: [index - 1, index + 1]}), and the bare ref, the whole record, only when the parts did not answer. ITEM: claims lists the retained rows newest first (ref, as_of, why, hops, roles); excerpts quote the other claims. roles[].role names what the REFERENCED row is to this claim (supports / supersedes / corrects / qualifies / contradicts / temporal_predecessor); ignore a role you do not know. conflicts appears only when two rows cannot be ordered. A response adds fields only when the server did something other than asked (count_policy, budget_policy, bounds, gate_fallback); their absence does not say the items suffice or that the whole store was searched. trace=true returns the full audit. Declared associations widen the lexical search and add walked evidence inside items, never items. Full contract: docs/RELIABLE_RECALL_2_6.md section 7.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deep | No | Deep recall for the candidate stage -- same semantics as in `recall`. | |
| lite | No | The same as `mode: "lite"`, which is the name to use; kept so that older callers keep working. Not together with `mode`. Default false. | |
| mode | No | A named answer size whose returned JSON is at most `cap` cl100k_base tokens, counted as sent (`used_tokens` says how many). "lite" (cap 3,000) is for a question one or two records can answer: up to 2,800 characters unless `budget` is given, short records whole first, then the best-ranked passages of longer ones. "pro" (cap 5,000) reads 15 items by default and quotes as much as the cap holds. Both leave out `ranges`, `bounds` and the budget fields; an item whose only claim is its head carries that claim's `as_of` instead of `claims`. A larger cap never removes an item or an excerpt. Omit it for the default response, which has no cap. `trace=true` returns every field and is not held to the cap. | |
| count | No | Ceiling on recall items returned -- not a fill target, not a search depth. Declare per call; omit to take the server default (10 unless configured). An operator-forced value overrides both. Requesting 5 with only 2 valid items returns 2; neither setting requires filling the window. Clamped to the server maximum, and the clamp is reported in count_policy rather than applied silently. | |
| query | Yes | Search query (empty returns recent memories) | |
| top_k | No | Candidate depth: how many rows the retrieval hands to bundling. This is the breadth knob; it is independent of `count` and is what to raise when items are missing evidence. | |
| trace | No | Include candidate refs and cluster membership for local diagnosis, and the trace of the recall it made as trace.recall; no full text is added. | |
| budget | No | Payload budget: characters of quoted text (item `content` plus `excerpts`) the response may carry. Bounds depth, where `count` bounds breadth, and breadth wins: excerpts are omitted before any item is. Omit for the server default, which is never less than one quote per item of the window; an operator-forced value overrides both; clamped to the server maximum and raised to one head quote, and budget_policy says which. | |
| channel | No | Memory channel filter | |
| agent_id | Yes | Agent identifier | |
| max_hops | No | Relation hops the walk may follow from an item's candidates through declared entity -> entity relations. 0 adds no walked evidence. A relation left unfollowed at the bound is named in bounds.omitted. At most 5, as for traverse: a larger value is lowered to it, and bounds.max_hops then states the value applied. | |
| time_cue | No | 2.6: when the answer was stored, as far as you remember — the same object recall takes (see recall's time_cue), applied to the candidate recall this reconstruction reads. The response carries time_cue when one was applied. | |
| source_id | No | Per-user source filter -- same semantics as in `recall`. | |
| project_id | No | γ filter -- same semantics as in `recall`, including the '@auto' sentinel, which resolves this agent's default from the server's operating context and echoes the resolution as resolved_project_id. With no configured operating context the sentinel is NOT resolved: it is filtered as the literal project_id '@auto'. Read resolved_project_id before relying on the resolution. | |
| session_key | No | Opaque session identity you declare: a partition hint, not authentication and not a data filter. Forwarded to the candidate recall. | |
| max_evidence | No | Maximum retained rows per item, bounding its claims and role targets. A cut is named in bounds.omitted and counted in the item's claims_omitted. |