memories
Creates, updates, deletes, gets or lists a memories resource.
Overview​
| Name | memories |
| Type | Resource |
| Id | databricks_workspace.agentkit.memories |
Fields​
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name in the form ``memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}``. Required for updates; assigned by the service on creation. |
actor_id | string | Customer-provided identifier for the actor whose memory this entry represents. |
session_id | string | Optional identifier for the session associated with this memory entry. When omitted, the entry applies across the actor's sessions. |
content | string | Optional free-form memory content. |
create_time | string (date-time) | Time when the entry was created. |
description | string | Human-readable description of the memory entry. |
path | string | Absolute, case-sensitive path identifying the entry within its actor and optional session. Paths must begin with ``/`` and must not contain empty, ``.`` or ``..`` segments. |
source_type | string | Which writer created this entry. Caller sets this on Create; immutable after creation. (MANAGED_MEMORY_ENTRY_SOURCE_TYPE_AGENT, MANAGED_MEMORY_ENTRY_SOURCE_TYPE_DREAMER) |
update_time | string (date-time) | Time when the entry was last updated. |
| Name | Datatype | Description |
|---|
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | managed_memory_store_id, managed_memory_entry_id, deployment_name, workspace_domain | view | Retrieves a memory entry by resource name. view controls whether the response includes memory |
list | select | managed_memory_store_id, actor_id, deployment_name, workspace_domain | page_size, page_token, path_prefix, session_id, view | Lists memory entries for one actor. An exact path filters entries across sessions, ignoring |
create | insert | managed_memory_store_id, deployment_name, workspace_domain, actor_id, path | managed_memory_entry_id | Creates a memory entry using exclusive-create semantics. Callers may choose the entry ID; the service |
update | update | managed_memory_store_id, managed_memory_entry_id, update_mask, deployment_name, workspace_domain, actor_id, path | Updates selected mutable fields on a memory entry. Identity fields are immutable. | |
delete | delete | managed_memory_store_id, managed_memory_entry_id, deployment_name, workspace_domain | Deletes a memory entry by resource name. Returns NOT_FOUND when the entry does not exist in the | |
search | exec | managed_memory_store_id, deployment_name, workspace_domain, actor_id, query | Searches memory entries by text query for one actor. Returns matching entries and scores ranked by |
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.
| Name | Datatype | Description |
|---|---|---|
actor_id | string | Customer-provided identifier for the actor whose entries are listed. |
deployment_name | string | The Databricks workspace deployment name: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME) |
managed_memory_entry_id | string | The managed_memory_entry_id segment of the name resource name (memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}). Resource name in the form memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}. |
managed_memory_store_id | string | The managed_memory_store_id segment of the parent resource name (memory-stores/{managed_memory_store_id}). Memory store whose entries are searched, in the form memory-stores/{managed_memory_store_id}. |
update_mask | object | Fields to update. Only content and description may be updated. |
workspace_domain | string | The Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}}) |
managed_memory_entry_id | string | Optional caller-selected memory entry ID. The service generates an ID when omitted. |
page_size | integer | Maximum number of entries to return. The service may return fewer entries than requested. Defaults to 10; must be between 1 and 100. |
page_token | string | Opaque pagination token from a previous ListManagedMemoryEntries response. |
path_prefix | string | Optional path prefix used to restrict entries within the actor partition. |
session_id | string | Optional session identifier. When set, only entries with this exact session_id are returned. Omitted-session (cross-session) entries are not included. Ignored when path is set. |
view | string | Controls whether each returned entry includes memory content. Defaults to FULL. |
SELECT examples​
- get
- list
Retrieves a memory entry by resource name. view controls whether the response includes memory
SELECT
name,
actor_id,
session_id,
content,
create_time,
description,
path,
source_type,
update_time
FROM databricks_workspace.agentkit.memories
WHERE managed_memory_store_id = '{{ managed_memory_store_id }}' -- required
AND managed_memory_entry_id = '{{ managed_memory_entry_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
AND view = '{{ view }}'
;
Lists memory entries for one actor. An exact path filters entries across sessions, ignoring
SELECT
*
FROM databricks_workspace.agentkit.memories
WHERE managed_memory_store_id = '{{ managed_memory_store_id }}' -- required
AND actor_id = '{{ actor_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
AND path_prefix = '{{ path_prefix }}'
AND session_id = '{{ session_id }}'
AND view = '{{ view }}'
;
INSERT examples​
- create
- Manifest
Creates a memory entry using exclusive-create semantics. Callers may choose the entry ID; the service
INSERT INTO databricks_workspace.agentkit.memories (
actor_id,
path,
content,
create_time,
description,
name,
session_id,
source_type,
update_time,
managed_memory_store_id,
deployment_name,
workspace_domain,
managed_memory_entry_id
)
SELECT
'{{ actor_id }}' /* required */,
'{{ path }}' /* required */,
'{{ content }}',
'{{ create_time }}',
'{{ description }}',
'{{ name }}',
'{{ session_id }}',
'{{ source_type }}',
'{{ update_time }}',
'{{ managed_memory_store_id }}',
'{{ deployment_name }}',
'{{ workspace_domain }}',
'{{ managed_memory_entry_id }}'
RETURNING
name,
actor_id,
session_id,
content,
create_time,
description,
path,
source_type,
update_time
;
# Description fields are for documentation purposes
- name: memories
props:
- name: managed_memory_store_id
value: "{{ managed_memory_store_id }}"
description: Required parameter for the memories resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the memories resource.
- name: workspace_domain
value: "{{ workspace_domain }}"
description: Required parameter for the memories resource.
- name: actor_id
value: "{{ actor_id }}"
description: |
Customer-provided identifier for the actor whose memory this entry represents.
- name: path
value: "{{ path }}"
description: |
Absolute, case-sensitive path identifying the entry within its actor and optional session. Paths must begin with ``/`` and must not contain empty, ``.`` or ``..`` segments.
- name: content
value: "{{ content }}"
description: |
Optional free-form memory content.
- name: create_time
value: "{{ create_time }}"
description: |
Time when the entry was created.
- name: description
value: "{{ description }}"
description: |
Human-readable description of the memory entry.
- name: name
value: "{{ name }}"
description: |
Resource name in the form ``memory-stores/{managed_memory_store_id}/entries/{managed_memory_entry_id}``. Required for updates; assigned by the service on creation.
- name: session_id
value: "{{ session_id }}"
description: |
Optional identifier for the session associated with this memory entry. When omitted, the entry applies across the actor's sessions.
- name: source_type
value: "{{ source_type }}"
description: |
Which writer created this entry. Caller sets this on Create; immutable after creation.
- name: update_time
value: "{{ update_time }}"
description: |
Time when the entry was last updated.
- name: managed_memory_entry_id
value: "{{ managed_memory_entry_id }}"
description: Optional caller-selected memory entry ID. The service generates an ID when omitted.
description: Optional caller-selected memory entry ID. The service generates an ID when omitted.
UPDATE examples​
- update
Updates selected mutable fields on a memory entry. Identity fields are immutable.
UPDATE databricks_workspace.agentkit.memories
SET
actor_id = '{{ actor_id }}',
path = '{{ path }}',
content = '{{ content }}',
create_time = '{{ create_time }}',
description = '{{ description }}',
name = '{{ name }}',
session_id = '{{ session_id }}',
source_type = '{{ source_type }}',
update_time = '{{ update_time }}'
WHERE
managed_memory_store_id = '{{ managed_memory_store_id }}' --required
AND managed_memory_entry_id = '{{ managed_memory_entry_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
AND actor_id = '{{ actor_id }}' --required
AND path = '{{ path }}' --required
RETURNING
name,
actor_id,
session_id,
content,
create_time,
description,
path,
source_type,
update_time;
DELETE examples​
- delete
Deletes a memory entry by resource name. Returns NOT_FOUND when the entry does not exist in the
DELETE FROM databricks_workspace.agentkit.memories
WHERE managed_memory_store_id = '{{ managed_memory_store_id }}' --required
AND managed_memory_entry_id = '{{ managed_memory_entry_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
;
Lifecycle Methods​
- search
Searches memory entries by text query for one actor. Returns matching entries and scores ranked by
EXEC databricks_workspace.agentkit.memories.search
@managed_memory_store_id='{{ managed_memory_store_id }}' --required,
@deployment_name='{{ deployment_name }}' --required,
@workspace_domain='{{ workspace_domain }}' --required
@@json=
'{
"actor_id": "{{ actor_id }}",
"query": "{{ query }}",
"limit": {{ limit }},
"page_size": {{ page_size }},
"page_token": "{{ page_token }}",
"path_prefix": "{{ path_prefix }}",
"session_id": "{{ session_id }}",
"view": "{{ view }}"
}'
;