Skip to main content

beta_memory_stores

Creates, updates, deletes, gets or lists a beta_memory_stores resource.

Overview

Namebeta_memory_stores
TypeResource
Idazure.ai_projects.beta_memory_stores

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
memory_idstringThe unique ID of the memory item. Required.
contentstringThe content of the memory. Required.
kindstringThe kind of the memory item. Required. Known values are: "user_profile", "chat_summary", and "procedural".
scopestringThe namespace that logically groups and isolates memories, such as a user ID. Required.
updated_atstring (date-time)The last update time of the memory item. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_memoryselectname, memory_id, endpointGet a memory item. Retrieves the specified memory item from the memory store.
getselectname, endpointGet a memory store. Retrieves the specified memory store and its current configuration.
listselectendpointlimit, order, after, beforeList memory stores. Returns the memory stores available to the caller.
createinsertendpointCreate a memory store. Creates a memory store resource with the provided configuration.
deletedeletename, endpointDelete a memory store. Deletes the specified memory store.
updateexecname, endpointUpdate a memory store. Updates the specified memory store with the supplied configuration changes.
list_memoriesexecname, endpointkind, limit, order, after, beforeList memory items. Returns memory items from the specified memory store.
update_memoryexecname, memory_id, endpointUpdate a memory item. Updates the specified memory item in the memory store.
delete_memoryexecname, memory_id, endpointDelete a memory item. Deletes the specified memory item from the memory store.
delete_scopeexecname, endpointDelete memories by scope. Deletes all memories in the specified memory store that are associated with the provided scope.
create_memoryexecname, endpointCreate a memory item. Creates a memory item in the specified memory store.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
memory_idstringThe ID of the memory item to delete. Required.
namestringThe name of the memory store. Required.
afterstring
beforestringA 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. Default value is None.
kindstringThe kind of the memory item. Known values are: "user_profile", "chat_summary", and "procedural". Default value is None.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Default value is None.
orderstringSort order by the created_at timestamp of the objects. asc for ascending order anddesc for descending order. Known values are: "asc" and "desc". Default value is None.

SELECT examples

Get a memory item. Retrieves the specified memory item from the memory store.

SELECT
memory_id,
content,
kind,
scope,
updated_at
FROM azure.ai_projects.beta_memory_stores
WHERE name = '{{ name }}' -- required
AND memory_id = '{{ memory_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

INSERT examples

Create a memory store. Creates a memory store resource with the provided configuration.

INSERT INTO azure.ai_projects.beta_memory_stores (
endpoint
)
SELECT
'{{ endpoint }}'
RETURNING
id,
name,
created_at,
definition,
description,
metadata,
object,
updated_at
;

DELETE examples

Delete a memory store. Deletes the specified memory store.

DELETE FROM azure.ai_projects.beta_memory_stores
WHERE name = '{{ name }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Update a memory store. Updates the specified memory store with the supplied configuration changes.

EXEC azure.ai_projects.beta_memory_stores.update 
@name='{{ name }}' --required,
@endpoint='{{ endpoint }}' --required
;