agent_memories
Creates, updates, deletes, gets or lists an agent_memories resource.
Overview
| Name | agent_memories |
| Type | Resource |
| Id | aws.bedrock_agent_runtime.agent_memories |
Fields
The following fields are returned by SELECT queries:
- get_agent_memory
| Name | Datatype | Description |
|---|---|---|
session_summary | object | Contains summary of a session. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_agent_memory | select | agent_alias_id, agent_id, memoryId, memoryType, region | maxItems, nextToken | Gets the sessions stored in the memory of the agent. |
delete_agent_memory | delete | agent_alias_id, agent_id, region | memoryId, sessionId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
agent_alias_id | string | The unique identifier of an alias of an agent. |
agent_id | string | The unique identifier of the agent to which the alias belongs. |
memoryId | string | The unique identifier of the memory. |
memoryType | string | The type of memory. |
region | string | AWS region (default: us-east-1) |
maxItems | integer | The 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. |
memoryId | string | The unique identifier of the memory. |
nextToken | string | If 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. |
sessionId | string | The unique session identifier of the memory. |
SELECT examples
- get_agent_memory
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
- delete_agent_memory
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 }}'
;