BatchCreateMemoryRecords
Source:
src/AWS/BedrockAgentCore/BatchCreateMemoryRecords.ts
Directly inserts long-term memory records, bypassing asynchronous extraction.
Bind a Memory inside a function runtime to call the
AgentCore data-plane API against it. Provide AgentCore.BatchCreateMemoryRecordsHttp
on the Function effect to implement the binding.
Writing Memory Records
Section titled “Writing Memory Records”// initconst batchCreateMemoryRecords = yield* AgentCore.BatchCreateMemoryRecords(memory);
return { fetch: Effect.gen(function* () { // runtime const result = yield* batchCreateMemoryRecords({ records: [ { requestIdentifier: "rec-1", namespaces: ["facts/user-1"], content: { text: "The user's favorite color is teal." }, timestamp: new Date(), }, ], }); return HttpServerResponse.json({ created: result.successfulRecords.length, }); }),};