Memory Consolidation
Memonic runs a durable 5-step consolidation workflow (Cloudflare Workflows) that compresses episodic memories into semantic ones — like sleeping to consolidate short-term into long-term memory.
Trigger consolidation
Section titled “Trigger consolidation”curl -X POST https://memonic.dev/api/memory/consolidate \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"agentId": "agent-001"}'Response: {"workflowId": "wf_abc123"}
Poll status
Section titled “Poll status”curl https://memonic.dev/api/memory/consolidate/wf_abc123 \ -H "Authorization: Bearer YOUR_API_KEY"Returns: {"status": "running" | "completed" | "failed", "step": 3, "totalSteps": 5}
What the workflow does
Section titled “What the workflow does”- Fetch recent episodic memories for the agent
- Cluster semantically similar memories
- Summarize each cluster using
llama-3.1-8b-instruct - Store summaries as semantic memories
- Archive the source episodic memories