The agentic reflect expand tool: drill previously retrieved memories up the
hierarchy. "chunk" (the default) returns each memory with its provenance and
the neighbouring memories of the same document, the surrounding context a
truncated fact is missing; "document" returns the owning document's title and
text. The id list is model-controlled, so it is de-duplicated, filtered to valid
ids and capped before any query runs. cited_ids/1 lists every memory id an
expansion put in front of the model, for grounding.
Summary
Functions
Every memory id an expansion surfaced: the expanded units and their neighbours.
Normalise the tool's depth argument; anything but "document" is "chunk".
Expand ids within bank_id. Must run inside the caller's tenant scope;
repo_opts carries the tenant prefix.
Upper bound on memory ids expanded per call.
Unique, well-formed memory ids, at most max_ids/0 of them, in request order.
Functions
Every memory id an expansion surfaced: the expanded units and their neighbours.
Normalise the tool's depth argument; anything but "document" is "chunk".
Expand ids within bank_id. Must run inside the caller's tenant scope;
repo_opts carries the tenant prefix.
@spec max_ids() :: pos_integer()
Upper bound on memory ids expanded per call.
Unique, well-formed memory ids, at most max_ids/0 of them, in request order.