Skip to main content

agent_memories

Creates, updates, deletes, gets or lists an agent_memories resource.

Overview

Nameagent_memories
TypeResource
Idaws.bedrock_agent_runtime.agent_memories

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
session_summaryobjectContains summary of a session.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_agent_memoryselectagent_alias_id, agent_id, memoryId, memoryType, regionmaxItems, nextTokenGets the sessions stored in the memory of the agent.
delete_agent_memorydeleteagent_alias_id, agent_id, regionmemoryId, sessionIdDeletes memory from the specified memory identifier.

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
agent_alias_idstringThe unique identifier of an alias of an agent.
agent_idstringThe unique identifier of the agent to which the alias belongs.
memoryIdstringThe unique identifier of the memory.
memoryTypestringThe type of memory.
regionstringAWS region (default: us-east-1)
maxItemsintegerThe maximum number of items to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.
memoryIdstringThe unique identifier of the memory.
nextTokenstringIf the total number of results is greater than the maxItems value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.
sessionIdstringThe unique session identifier of the memory.

SELECT examples

Gets the sessions stored in the memory of the agent.

SELECT
session_summary
FROM aws.bedrock_agent_runtime.agent_memories
WHERE agent_alias_id = '{{ agent_alias_id }}' -- required
AND agent_id = '{{ agent_id }}' -- required
AND memoryId = '{{ memoryId }}' -- required
AND memoryType = '{{ memoryType }}' -- required
AND region = '{{ region }}' -- required
AND maxItems = '{{ maxItems }}'
AND nextToken = '{{ nextToken }}'
;

DELETE examples

Deletes memory from the specified memory identifier.

DELETE FROM aws.bedrock_agent_runtime.agent_memories
WHERE agent_alias_id = '{{ agent_alias_id }}' --required
AND agent_id = '{{ agent_id }}' --required
AND region = '{{ region }}' --required
AND memoryId = '{{ memoryId }}'
AND sessionId = '{{ sessionId }}'
;