Creates a memory store for keeping an agent's long-term working notes.
Prerequisites
Endpoint and authentication configured. For details, see Overview and authentication.
Endpoint
POST /memory_stores
Request body
| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string | Memory store name, 1-255 characters |
description | No | string | Purpose description; an empty string is returned if omitted |
metadata | No | object | Custom key-value pairs for business metadata; an empty object if omitted |
Request example
Response example
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Memory store ID, format memstore_xxx |
type | string | Always memory_store |
name | string | Memory store name, 1-255 characters |
description | string | Purpose description; an empty string if not set |
metadata | object | Custom key-value pairs |
archived_at | string | null | Archive time; omitted or null when not archived |
created_at | string | Creation time, ISO 8601 UTC |
updated_at | string | Last update time, ISO 8601 UTC |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | invalid_request_error | Invalid parameters, path, limit, or pagination cursor |
| 401 | InvalidApiKey | API key missing, invalid, or expired |
| 403 | permission_error | Insufficient identity or resource access permissions |