BatchUpdateMemoryRecords
Source:
src/AWS/BedrockAgentCore/BatchUpdateMemoryRecords.ts
Updates long-term memory records in bulk.
Bind a Memory inside a function runtime to call the
AgentCore data-plane API against it. Provide AgentCore.BatchUpdateMemoryRecordsHttp
on the Function effect to implement the binding.
Writing Memory Records
Section titled “Writing Memory Records”// initconst batchUpdateMemoryRecords = yield* AgentCore.BatchUpdateMemoryRecords(memory);
return { fetch: Effect.gen(function* () { // runtime const result = yield* batchUpdateMemoryRecords({ records: [ { memoryRecordId, timestamp: new Date(), content: { text: "The user's favorite color is green." }, namespaces: ["facts/user-1"], }, ], }); return HttpServerResponse.json({ updated: result.successfulRecords.length, }); }),};