Save memory
save_memoryCreate or update a memory or scratchpad record by key (replace or append). Requires scope 'memory:write'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Caller-chosen key, unique per workspace. | |
| kind | No | memory | |
| mode | No | 'append' adds content to the end of an existing utf-8 record. | replace |
| tags | No | ||
| content | Yes | UTF-8 text, or base64 when content_encoding is 'base64'. Max 256 KiB. | |
| metadata | No | JSON object, max 4 KiB serialized. | |
| if_version | No | Optimistic concurrency: 0 = must not exist; n = stored version must equal n. | |
| ttl_seconds | No | Expire sooner than the plan retention. Never extends retention. | |
| content_type | No | text/plain | |
| workspace_id | Yes | ||
| idempotency_key | No | Optional. Same key + same arguments within 24 h returns the original result. | |
| client_encrypted | No | Content is an ac-e2e-v1 envelope encrypted by the client. Required in workspaces created with require_client_encryption. Encrypted content is not full-text searchable. | |
| content_encoding | No | utf-8 |