list_by_domain
List memories under a domain and its subdomains, newest first, to find relevant records when search misses.
Instructions
List memories for a domain and its subdomains, most recent first.
Fallback when search misses. A task row carries state (open,
completed or cancelled) and progress {done, total}.
Returns {"results": [...], "est_tokens": N}. Content is
snippet-truncated per result -- call get_memory(uid) for the full
record; a result's est_tokens estimates what that full record costs,
and the top-level est_tokens is the sum over the results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | one memory type, as search() takes it; empty is every type. | |
| limit | No | the most results to return. | |
| domain | Yes | a path, matched from the outermost segment in: 'acme/x100' lists the module's own memories plus every routine under it. A domain that matches no path is retried as a run of segments INSIDE one, so list_by_domain('p200') still finds the routine once it lives at 'acme/x100/p200'. The literal reading wins whenever it has rows, and an ambiguous name (the same code under two modules) covers both branches rather than picking one -- each row's `domain` says which branch it came from. list_domains() is the way to see the paths first. | |
| offset | No | where the page starts; `next_offset`, when present, starts the next. | |
| status | No | 'active', 'archived' or 'all'. Closing a task archives its memory, so list_by_domain(domain, type='task', status='archived') returns the completed and cancelled tasks. | active |
| subtree | No | False lists what is filed at exactly that path and nowhere deeper. |