cURL
Stores user conversations as memory fragments, automatically extracting key information. Also supports directly specifying custom content for storage. To extract a user profile at the same time, pass
profile_schema.
Before calling, ensure you have obtained an API Key. See Authentication.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | Memory entity ID, used to identify the owning object, max 64 characters |
messages | array | Yes* | Conversation message list, up to 50 entries. Each contains role (user/assistant) and content |
custom_content | string | Yes* | Custom content, max 512 characters. Mutually exclusive with messages |
profile_schema | string | No | Profile schema ID. If omitted, no user profile is extracted — only memory fragments are written |
memory_library_id | string | No | Memory library ID. If not provided, the default library is used |
project_id | string | No | Memory fragment rule ID. If not provided, the default rule is used |
meta_data | object | No | User-defined information |
messages and custom_content are mutually exclusive. When custom_content is provided, messages is ignored.Response
| Field | Type | Description |
|---|---|---|
request_id | string | Request ID |
memory_nodes | array | List of changed memory fragments |
memory_nodes[].memory_node_id | string | Memory fragment ID |
memory_nodes[].content | string | Extracted memory content |
memory_nodes[].event | string | Operation type: ADD / UPDATE / DELETE |
memory_nodes[].old_content | string | Content before update, only valid when event is UPDATE |