Maintenance operations for memory stores — prune, deduplicate, and clear.
agent.memory.curator
const pruned = await agent.memory.curator.prune({ maxAgeDays: 90, userId: "user-123", agentName: "assistant", }); console.log(`Pruned ${pruned} old entries`);
const removed = await agent.memory.curator.deduplicate({ userId: "user-123", }); console.log(`Removed ${removed} duplicate facts`);
await agent.memory.curator.clearAll({ userId: "user-123", agentName: "assistant", });
import { CronJob } from "cron"; new CronJob("0 3 * * *", async () => { await agent.memory.curator.prune({ maxAgeDays: 90, userId: "user-123" }); await agent.memory.curator.deduplicate({ userId: "user-123" }); }).start();