Skip to main content
POST
Search memories

Body

application/json

Request model for searching memories.

query
string
required

User search query

user_id
string
required

User ID

readable_cube_ids
string[] | null

List of cube IDs that are readable for this request. Required for algorithm-facing API; optional for developer-facing API.

mode
enum<string>
default:fast

Search mode: fast, fine, or mixture.

Available options:
fast,
fine,
mixture
session_id
string | null

Session ID used as a soft signal to prioritize more relevant memories. Only used for weighting, not as a hard filter.

top_k
integer
default:10

Number of textual memories to retrieve (top-K). Default: 10.

Required range: x >= 1
pref_top_k
integer
default:6

Number of preference memories to retrieve (top-K). Default: 6.

Required range: x >= 0
include_preference
boolean
default:true

Whether to retrieve preference memories along with general memories. If enabled, the system will automatically recall user preferences relevant to the query. Default: True.

search_tool_memory
boolean
default:true

Whether to retrieve tool memories along with general memories. If enabled, the system will automatically recall tool memories relevant to the query. Default: True.

tool_mem_top_k
integer
default:6

Number of tool memories to retrieve (top-K). Default: 6.

Required range: x >= 0
filter
Filter · object | null

Whether to enable internet search in addition to memory search. Primarily used by internal algorithms. Default: False.

threshold
number | null

Internal similarity threshold for searching plaintext memories. If None, default thresholds will be applied.

search_memory_type
string
default:All

Type of memory to search: All, WorkingMemory, LongTermMemory, UserMemory, OuterMemory, ToolSchemaMemory, ToolTrajectoryMemory

chat_history
(ChatCompletionSystemMessageParam · object | ChatCompletionUserMessageParam · object | ChatCompletionAssistantMessageParam · object | ChatCompletionToolMessageParam · object)[] | null

Historical chat messages used internally by algorithms. If None, internal stored history may be used; if provided (even an empty list), this value will be used as-is.

mem_cube_id
string | null

(Deprecated) Single cube ID to search in. Prefer readable_cube_ids for multi-cube search.

moscube
boolean
default:false

(Deprecated / internal) Whether to use legacy MemOSCube path.

operation
PermissionDict · object[] | null

(Internal) Operation definitions for multi-cube read permissions.

source
string | null

Source of the search query [plugin will router diff search]

Response

Successful Response

Response model for search operations.

message
string
required

Response message

code
integer
default:200

Response status code

data
Data · object | null

Response data