Build XMemo context
recall_contextCombine relevant memories into a read-only context pack when an answer needs multiple items or scoped paths. Bound size with item/token limits; omitted memories are reported.
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'). Trigger: Call 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). Model responsibility: You (the calling LLM) know current date and user local time, so you must convert natural language time expressions into absolute timestamps. Consequence: 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). Trigger: Pass 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). Model responsibility: Convert natural language end bounds into absolute timestamps with timezone offsets. Consequence: 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'. Trigger: Set 'activity_log' for event feeds within a bounded [since, until) window; set 'topic' for topic retrieval. Model responsibility: 'activity_log' requires explicit bounded 'since' and 'until' timestamps. Consequence: '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). Trigger: Pass 'desc' when the user asks for 'latest', 'recent', 'newest first', or recency, or 'asc' for chronological order ('oldest first') in any language. Model responsibility: Explicitly set desired temporal ordering when the user expresses recency intent. 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 multilingual hypothetical answer or dense semantic expansion written by the calling LLM for this query. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |