Build XMemo context
recall_contextBuild a read-only, bounded context pack from multiple relevant memories for answers needing several items or scoped/path-filtered context. Limit by item and token budgets and report omitted memories.
Instructions
Build a read-only, bounded context pack from multiple relevant memories. Use it when an answer needs several memory items or scoped/path-filtered context; use recall for a quick best-effort lookup or get_project_context for a whole-project snapshot. max_items/max_tokens bound output: memories that do not fit are omitted and reported, so raise max_tokens or use recall when you need the records themselves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Candidate-result limit; 0 derives it from the item/token budgets. | |
| query | Yes | Natural-language query used to rank memories for the context pack. | |
| scope | No | Optional authorized scope; blank uses the token default. | |
| since | No | RFC 3339 timestamp with timezone offset (e.g., '2026-09-01T00:00:00+09:00'). Set this whenever the user query mentions any relative or absolute time constraint in any language (e.g., today, yesterday, last week, last month, recently, Aug 1, Aug 10 to Sep 1, since Monday, before Sep 15, in Q3). Relative and natural language time expressions are given as absolute timestamps in the user's local time. If omitted, the server falls back to heuristic guessing which may misinterpret timezone day boundaries or relative dates. | |
| until | No | RFC 3339 timestamp with timezone offset (e.g., '2026-09-02T00:00:00+09:00'). When used with since, defines the half-open interval [since, until) with until > since (maximum 90 days span). Set this when the user query specifies an end date or bounded window in any language (e.g., yesterday end of day, by Aug 10, Aug 10 to Sep 1). Natural language end bounds are given as absolute timestamps with timezone offsets. If omitted, the window is open-ended on the upper side or derived heuristically. | |
| bucket | No | Accessible bucket filter; % includes all accessible buckets. | % |
| team_id | No | Optional exact authorized team filter. | |
| agent_id | No | Optional client-supplied agent label for memory attribution. | |
| max_items | No | Maximum memories rendered in the context pack. | |
| max_tokens | No | Approximate token budget for the rendered context pack. | |
| query_mode | No | Optional query intent: 'topic' (default) or 'activity_log'. Set 'activity_log' for event feeds within a bounded [since, until) window; set 'topic' for topic retrieval. 'activity_log' requires explicit bounded 'since' and 'until' timestamps. 'activity_log' without bounds fails closed; explicit 'topic' blocks stream bypass. | |
| time_order | No | Sort order for returned memories: 'desc' (newest first) or 'asc' (oldest first). Set 'desc' when the user asks for 'latest', 'recent', 'newest first', or recency, or 'asc' for chronological order ('oldest first') in any language. If omitted and since/until are omitted, default relevance ranking is used without temporal sorting. | |
| memory_type | No | Memory type filter; auto searches the normal mixed set. | auto |
| output_json | No | True returns the full structured pack; false returns rendered context text. | |
| path_filter | No | Case-insensitive memory-path pattern; % matches all paths. | % |
| owner_timezone | No | The user's real IANA timezone, such as Asia/Tokyo or America/Los_Angeles. Required for honest calendar periods; never guess UTC. | |
| prefer_working | No | True prioritizes active working/session-state signals. | |
| reference_time | No | Optional ISO 8601 reference time snapshot for deterministic evaluation. Leave blank to use the real clock; setting this does not replace owner_timezone for calendar day boundaries. | |
| agent_instance_id | No | Optional stable, non-secret agent instance ID for per-client attribution. | |
| temporal_axis_mode | No | Optional temporal axis resolution policy: 'created_at' (Scheme A), 'updated_at' (Scheme B), or 'split_filter_created_order_updated' (Scheme C). | |
| hypothetical_answer | No | Optional hypothetical answer or semantic expansion of the query, used to improve matching. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |