Skip to content

Instantly share code, notes, and snippets.

@jeffbalagosa
Last active February 21, 2026 06:12
Show Gist options
  • Select an option

  • Save jeffbalagosa/9e066442a217f7dc3cfa0b03fa7726d7 to your computer and use it in GitHub Desktop.

Select an option

Save jeffbalagosa/9e066442a217f7dc3cfa0b03fa7726d7 to your computer and use it in GitHub Desktop.
OpenClaw Memory System Diagram v2
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [
{
"type": "rectangle",
"id": "header_bg",
"x": 280,
"y": 20,
"width": 500,
"height": 70,
"backgroundColor": "#e0e7ff",
"fillStyle": "solid",
"strokeColor": "#3730a3",
"strokeWidth": 2,
"roundness": { "type": 3 }
},
{
"type": "text",
"id": "header_title",
"x": 360,
"y": 45,
"text": "OpenClaw Memory System",
"fontSize": 24,
"strokeColor": "#3730a3",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "rectangle",
"id": "daily_logs",
"x": 40,
"y": 140,
"width": 200,
"height": 120,
"backgroundColor": "#dcfce7",
"fillStyle": "solid",
"strokeColor": "#166534",
"strokeWidth": 2,
"roundness": { "type": 3 }
},
{
"type": "text",
"id": "daily_title",
"x": 60,
"y": 155,
"text": "Daily Logs",
"fontSize": 16,
"strokeColor": "#166534",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "daily_desc1",
"x": 60,
"y": 180,
"text": "memory/YYYY-MM-DD.md",
"fontSize": 12,
"strokeColor": "#166534",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "daily_desc2",
"x": 60,
"y": 198,
"text": "Append-only",
"fontSize": 12,
"strokeColor": "#166534",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "daily_desc3",
"x": 60,
"y": 216,
"text": "Read today + yesterday",
"fontSize": 12,
"strokeColor": "#166534",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "rectangle",
"id": "longterm",
"x": 280,
"y": 140,
"width": 200,
"height": 120,
"backgroundColor": "#dbeafe",
"fillStyle": "solid",
"strokeColor": "#1e40af",
"strokeWidth": 2,
"roundness": { "type": 3 }
},
{
"type": "text",
"id": "longterm_title",
"x": 300,
"y": 155,
"text": "Long-term Memory",
"fontSize": 16,
"strokeColor": "#1e40af",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "longterm_desc1",
"x": 300,
"y": 180,
"text": "MEMORY.md",
"fontSize": 12,
"strokeColor": "#1e40af",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "longterm_desc2",
"x": 300,
"y": 198,
"text": "Curated facts/preferences",
"fontSize": 12,
"strokeColor": "#1e40af",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "longterm_desc3",
"x": 300,
"y": 216,
"text": "Private sessions only",
"fontSize": 12,
"strokeColor": "#1e40af",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "rectangle",
"id": "tools",
"x": 520,
"y": 140,
"width": 200,
"height": 120,
"backgroundColor": "#fef3c7",
"fillStyle": "solid",
"strokeColor": "#b45309",
"strokeWidth": 2,
"roundness": { "type": 3 }
},
{
"type": "text",
"id": "tools_title",
"x": 540,
"y": 155,
"text": "Agent Tools",
"fontSize": 16,
"strokeColor": "#b45309",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "tools_desc1",
"x": 540,
"y": 180,
"text": "memory_get",
"fontSize": 12,
"strokeColor": "#b45309",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "tools_desc2",
"x": 540,
"y": 200,
"text": "memory_search",
"fontSize": 12,
"strokeColor": "#b45309",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "rectangle",
"id": "vector_box",
"x": 40,
"y": 320,
"width": 320,
"height": 140,
"backgroundColor": "#f3e8ff",
"fillStyle": "solid",
"strokeColor": "#7e22ce",
"strokeWidth": 2,
"roundness": { "type": 3 }
},
{
"type": "text",
"id": "vector_title",
"x": 60,
"y": 335,
"text": "Embedding Providers",
"fontSize": 16,
"strokeColor": "#7e22ce",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "vector_desc1",
"x": 60,
"y": 360,
"text": "local (node-llama-cpp)",
"fontSize": 12,
"strokeColor": "#7e22ce",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "vector_desc2",
"x": 60,
"y": 378,
"text": "OpenAI",
"fontSize": 12,
"strokeColor": "#7e22ce",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "vector_desc3",
"x": 60,
"y": 396,
"text": "Gemini",
"fontSize": 12,
"strokeColor": "#7e22ce",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "vector_desc4",
"x": 60,
"y": 414,
"text": "Voyage",
"fontSize": 12,
"strokeColor": "#7e22ce",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "vector_desc5",
"x": 180,
"y": 360,
"text": "(sqlite-vec acceleration)",
"fontSize": 10,
"strokeColor": "#7e22ce",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "rectangle",
"id": "features_box",
"x": 400,
"y": 320,
"width": 320,
"height": 140,
"backgroundColor": "#fce7f3",
"fillStyle": "solid",
"strokeColor": "#be185d",
"strokeWidth": 2,
"roundness": { "type": 3 }
},
{
"type": "text",
"id": "features_title",
"x": 420,
"y": 335,
"text": "Search Features",
"fontSize": 16,
"strokeColor": "#be185d",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "features_desc1",
"x": 420,
"y": 360,
"text": "Hybrid Search (Vector + BM25)",
"fontSize": 12,
"strokeColor": "#be185d",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "features_desc2",
"x": 420,
"y": 378,
"text": "MMR Re-ranking (diversity)",
"fontSize": 12,
"strokeColor": "#be185d",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "features_desc3",
"x": 420,
"y": 396,
"text": "Temporal Decay (recency)",
"fontSize": 12,
"strokeColor": "#be185d",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "features_desc4",
"x": 420,
"y": 414,
"text": "Embedding Cache",
"fontSize": 12,
"strokeColor": "#be185d",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "rectangle",
"id": "flush_box",
"x": 200,
"y": 510,
"width": 400,
"height": 90,
"backgroundColor": "#ffedd5",
"fillStyle": "solid",
"strokeColor": "#c2410c",
"strokeWidth": 2,
"roundness": { "type": 3 }
},
{
"type": "text",
"id": "flush_title",
"x": 280,
"y": 525,
"text": "Automatic Memory Flush",
"fontSize": 16,
"strokeColor": "#c2410c",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "flush_desc1",
"x": 220,
"y": 555,
"text": "Pre-compaction trigger",
"fontSize": 12,
"strokeColor": "#c2410c",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "flush_desc2",
"x": 220,
"y": 573,
"text": "softThresholdTokens | Silent (NO_REPLY)",
"fontSize": 12,
"strokeColor": "#c2410c",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "rectangle",
"id": "qmd_box",
"x": 200,
"y": 640,
"width": 400,
"height": 80,
"backgroundColor": "#e0e7ff",
"fillStyle": "solid",
"strokeColor": "#3730a3",
"strokeWidth": 2,
"roundness": { "type": 3 }
},
{
"type": "text",
"id": "qmd_title",
"x": 260,
"y": 655,
"text": "QMD Backend (Experimental)",
"fontSize": 16,
"strokeColor": "#3730a3",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "qmd_desc1",
"x": 230,
"y": 685,
"text": "BM25 + vectors + reranking",
"fontSize": 12,
"strokeColor": "#3730a3",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "text",
"id": "qmd_desc2",
"x": 380,
"y": 685,
"text": "Local-first | Bun + node-llama-cpp",
"fontSize": 12,
"strokeColor": "#3730a3",
"fontFamily": 1,
"textAlign": "left",
"verticalAlign": "top"
},
{
"type": "arrow",
"id": "arrow1",
"x": 140,
"y": 260,
"width": 0,
"height": 60,
"points": [[0, 0], [0, 60]],
"strokeColor": "#666",
"strokeWidth": 2,
"endArrowhead": "arrow"
},
{
"type": "arrow",
"id": "arrow2",
"x": 380,
"y": 260,
"width": 0,
"height": 60,
"points": [[0, 0], [0, 60]],
"strokeColor": "#666",
"strokeWidth": 2,
"endArrowhead": "arrow"
},
{
"type": "arrow",
"id": "arrow3",
"x": 620,
"y": 260,
"width": 0,
"height": 60,
"points": [[0, 0], [0, 60]],
"strokeColor": "#666",
"strokeWidth": 2,
"endArrowhead": "arrow"
},
{
"type": "arrow",
"id": "arrow4",
"x": 140,
"y": 460,
"width": 0,
"height": 50,
"points": [[0, 0], [0, 50]],
"strokeColor": "#666",
"strokeWidth": 2,
"endArrowhead": "arrow"
},
{
"type": "arrow",
"id": "arrow5",
"x": 560,
"y": 460,
"width": 0,
"height": 50,
"points": [[0, 0], [0, 50]],
"strokeColor": "#666",
"strokeWidth": 2,
"endArrowhead": "arrow"
},
{
"type": "arrow",
"id": "arrow6",
"x": 400,
"y": 600,
"width": 0,
"height": 40,
"points": [[0, 0], [0, 40]],
"strokeColor": "#666",
"strokeWidth": 2,
"endArrowhead": "arrow"
}
],
"appState": {
"gridSize": null,
"viewBackgroundColor": "#ffffff",
"scrollX": 0,
"scrollY": 0,
"zoom": { "value": 1 }
},
"files": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment