Skip to content

ListMemoryRecords

Source: src/AWS/BedrockAgentCore/ListMemoryRecords.ts

Lists extracted long-term memory records in a namespace.

Bind a Memory inside a function runtime to enumerate the records the memory’s strategies (semantic, summary, user preference, …) have extracted into a namespace. Provide AgentCore.ListMemoryRecordsHttp on the Function effect to implement the binding.

// init
const listMemoryRecords = yield* AgentCore.ListMemoryRecords(memory);
return {
fetch: Effect.gen(function* () {
// runtime
const result = yield* listMemoryRecords({
namespace: "facts/user-1",
});
return HttpServerResponse.json({
count: result.memoryRecordSummaries.length,
});
}),
};