Mount a Memory Store to an Identity and Template.
Mounts an existing Memory Store to an
An Identity-level Service Account Token can only operate on its own Identity. Operating on another Identity returns
HTTP 200 OK
Returns a Memory Store mount object.
When multiple Stores are mounted, the Agent sees the Memories from all Stores merged into a flat namespace by
(identity, template) pair. Sessions created by that Identity with the Template then receive the Store's Memory content automatically.
Explicitly mounted Stores always use read_only. An (identity, template) pair can have at most 10 explicit mounts, excluding the system-managed default Store slot.
Repeated mounts are idempotent. Mounting the same Store again returns the existing mount record, and created_at remains the time of the first mount.
Path
POST /api/v1/forward/identities/{identity_id}/templates/{template_id}/memory_stores
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT, admin SAT, or SAT for this Identity> |
Content-Type | Yes | application/json |
403.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
identity_id | string | Yes | Identity ID (idn_...). |
template_id | string | Yes | Template ID (tmpl_...). |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
memory_store_id | string | Yes | ID of the Memory Store to mount (memstore_...). It must be an active Store visible to the caller. |
Example request
Example response
HTTP 200 OK
Response
Returns a Memory Store mount object.
Notes
When multiple Stores are mounted, the Agent sees the Memories from all Stores merged into a flat namespace by path. Identical paths can shadow each other. See Visibility in a Session.
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | memory_store_id is missing, the Store is archived, or the (identity, template) pair already has 10 explicit mounts. |
| 401 | authentication_error | The authentication token is missing or invalid. |
| 403 | permission_error | An Identity-level SAT tried to operate on another Identity. |
| 404 | not_found_error | The Identity, Template, or Memory Store does not exist or is not visible. |
| 500/502/503 | api_error | Forward or a dependent service failed. |