Add memories for a specific user.
This endpoint uses the class-based AddHandler for better code organization.
Request model for creating memories.
User ID
Session ID. If not provided, a default session will be used.
Task ID for monitering async tasks
List of cube IDs user can write for multi-cube add
Whether to add memory in async mode. Use 'async' to enqueue background add (non-blocking), or 'sync' to add memories in the current call. Default: 'async'.
async, sync (Internal) Add mode used only when async_mode='sync'. If set to 'fast', the handler will use a fast add pipeline. Ignored when async_mode='async'.
fast, fine Custom tags for this add request, e.g. ['Travel', 'family']. These tags can be used as filters in search.
Additional metadata for the add request. All keys can be used as filters in search. Example: {'agent_id': 'xxxxxx', 'app_id': 'xxxx', 'source_type': 'web', 'source_url': 'https://www.baidu.com', 'source_content': '西湖是杭州最著名的景点'}.
List of messages to store. Supports: - system / user / assistant messages with 'content' and 'chat_time'; - tool messages including: * tool_description (name, description, parameters), * tool_input (call_id, name, argument), * raw tool messages where content is str or list[str], * tool_output with structured output items (input_text / input_image / input_file, etc.). Also supports pure input items when there is no dialog.
Historical chat messages used internally by algorithms. If None, internal stored history will be used; if provided (even an empty list), this value will be used as-is.
Whether this request represents user feedback. Default: False.
(Deprecated) Target cube ID for this add request (optional for developer API).
(Deprecated) Plain memory content to store. Prefer using messages.
(Deprecated / internal) Path to document to store.
(Deprecated) Simple source tag of the memory. Prefer using info.source_type / info.source_url.
(Internal) Operation definitions for multi-cube write permissions.