# List memory stores

`GET /memory_stores`

Returns the memory stores available to the caller.

## Parameters

### Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | `integer` | No | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. _Default:_ `20` |
| `order` | `PageOrder` | No | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` for descending order. _Enum:_ `asc`, `desc` |
| `after` | `string` | No | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. |
| `before` | `string` | No | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. |
| `api-version` | `string` | Yes | The API version to use for this operation. |

### Header parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Foundry-Features` | `enum` | Yes | A feature flag opt-in required when using preview operations or modifying persisted preview resources. _Constant:_ `MemoryStores=V1Preview` |

## Responses

### 200 — The request has succeeded.

Content-Type: `application/json`

The response data for a requested list of items.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `data` | `MemoryStoreObject[]` | Yes | The requested list of items. |
| `first_id` | `string` | No | The first ID represented in this list. |
| `last_id` | `string` | No | The last ID represented in this list. |
| `has_more` | `boolean` | Yes | A value indicating whether there are additional values available not captured in this list. |

#### `data` — `MemoryStoreObject[]`

The requested list of items.

**Array of** `MemoryStoreObject`**:**

A memory store that can store and retrieve user memories.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | `enum` | Yes | The object type, which is always 'memory_store'. _Constant:_ `memory_store` |
| `id` | `string` | Yes | The unique identifier of the memory store. |
| `created_at` | `FoundryTimestamp` | Yes | The Unix timestamp (seconds) when the memory store was created. _Format:_ `unixtime` |
| `updated_at` | `FoundryTimestamp` | Yes | The Unix timestamp (seconds) when the memory store was last updated. _Format:_ `unixtime` |
| `name` | `string` | Yes | The name of the memory store. |
| `description` | `string` | No | A human-readable description of the memory store. |
| `metadata` | `object` | No | Arbitrary key-value metadata to associate with the memory store. |
| `definition` | `MemoryStoreDefaultDefinition` | Yes | The definition of the memory store. |

##### `definition` — `MemoryStoreDefaultDefinition`

The definition of the memory store.

**One of the following:**

###### `default` — `default (MemoryStoreDefaultDefinition)`

Default memory store implementation.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `kind` | `enum` | Yes | The kind of the memory store. _Constant:_ `default` |
| `chat_model` | `string` | Yes | The name or identifier of the chat completion model deployment used for memory processing. |
| `embedding_model` | `string` | Yes | The name or identifier of the embedding model deployment used for memory processing. |
| `options` | `MemoryStoreDefaultOptions` | No | Default memory store options. |

- **`options`** — `MemoryStoreDefaultOptions`

Default memory store options.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `user_profile_enabled` | `boolean` | Yes | Whether to enable user profile extraction and storage. Default is true. _Default:_ `true` |
| `user_profile_details` | `string` | No | Specific categories or types of user profile information to extract and store. |
| `chat_summary_enabled` | `boolean` | Yes | Whether to enable chat summary extraction and storage. Defaults to `true`. _Default:_ `true` |
| `procedural_memory_enabled` | `boolean` | No | Whether to enable procedural memory extraction and storage. The service defaults to `true` if a value is not specified by the caller. _Default:_ `true` |
| `default_ttl_seconds` | `integer` | No | The default time-to-live for memories in seconds. A value of `0` indicates that memories do not expire. Defaults to `0`. _Default:_ `0` _Format:_ `int32` |

### 4XX — Client error

Content-Type: `application/json`

Error response for API failures.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `OpenAI.Error` | Yes |  |

#### `error` — `OpenAI.Error`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string \| null` | Yes |  |
| `message` | `string` | Yes |  |
| `param` | `string \| null` | No |  |
| `type` | `string` | No |  |
| `details` | `OpenAI.Error[]` | No |  |
| `additionalInfo` | `object` | No |  |
| `debugInfo` | `object` | No |  |

### 5XX — Server error

Content-Type: `application/json`

Error response for API failures.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `error` | `OpenAI.Error` | Yes |  |

#### `error` — `OpenAI.Error`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string \| null` | Yes |  |
| `message` | `string` | Yes |  |
| `param` | `string \| null` | No |  |
| `type` | `string` | No |  |
| `details` | `OpenAI.Error[]` | No |  |
| `additionalInfo` | `object` | No |  |
| `debugInfo` | `object` | No |  |
