Lists memory records in an AgentCore Memory resource based on specified criteria¶
Description¶
Lists memory records in an AgentCore Memory resource based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the bedrock-agentcore:ListMemoryRecords permission.
Usage¶
bedrockagentcore_list_memory_records(memoryId, namespace, namespacePath,
memoryStrategyId, maxResults, nextToken, metadataFilters)
Arguments¶
-
memoryId[required] The identifier of the AgentCore Memory resource for which to list memory records.
-
namespaceThe namespace prefix to filter memory records by. Returns all memory records in namespaces that start with the provided prefix. Either
namespaceornamespacePathis required. -
namespacePathUse namespacePath for hierarchical retrievals. Return all memory records where namespace falls under the same parent hierarchy. Either
namespaceornamespacePathis required. -
memoryStrategyIdThe memory strategy identifier to filter memory records by. If specified, only memory records with this strategy ID are returned.
-
maxResultsThe maximum number of results to return in a single call. The default value is 20.
-
nextTokenThe token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
-
metadataFiltersA list of metadata filter expressions to scope the returned memory records.
Value¶
A list with the following syntax:
list(
memoryRecordSummaries = list(
list(
memoryRecordId = "string",
content = list(
text = "string"
),
memoryStrategyId = "string",
namespaces = list(
"string"
),
createdAt = as.POSIXct(
"2015-01-01"
),
score = 123.0,
metadata = list(
list(
stringValue = "string",
stringListValue = list(
"string"
),
numberValue = 123.0,
dateTimeValue = as.POSIXct(
"2015-01-01"
)
)
)
)
),
nextToken = "string"
)
Request syntax¶
svc$list_memory_records(
memoryId = "string",
namespace = "string",
namespacePath = "string",
memoryStrategyId = "string",
maxResults = 123,
nextToken = "string",
metadataFilters = list(
list(
left = list(
metadataKey = "string"
),
operator = "EQUALS_TO"|"EXISTS"|"NOT_EXISTS"|"BEFORE"|"AFTER"|"CONTAINS"|"GREATER_THAN"|"GREATER_THAN_OR_EQUALS"|"LESS_THAN"|"LESS_THAN_OR_EQUALS",
right = list(
metadataValue = list(
stringValue = "string",
stringListValue = list(
"string"
),
numberValue = 123.0,
dateTimeValue = as.POSIXct(
"2015-01-01"
)
)
)
)
)
)