Skip to content

BatchDeleteMemoryRecords

Source: src/AWS/BedrockAgentCore/BatchDeleteMemoryRecords.ts

Deletes long-term memory records in bulk.

Bind a Memory inside a function runtime to call the AgentCore data-plane API against it. Provide AgentCore.BatchDeleteMemoryRecordsHttp on the Function effect to implement the binding.

// init
const batchDeleteMemoryRecords = yield* AgentCore.BatchDeleteMemoryRecords(memory);
return {
fetch: Effect.gen(function* () {
// runtime
const result = yield* batchDeleteMemoryRecords({
records: [{ memoryRecordId }],
});
return HttpServerResponse.json({
deleted: result.successfulRecords.length,
});
}),
};