The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(architecture): add memory-tree pipeline diagram and update related docs
Steven Enamakel00721711ca26
diff --git a/gitbooks/.gitbook/assets/memory-tree-pipeline (1).excalidraw b/gitbooks/.gitbook/assets/memory-tree-pipeline (1).excalidrawdeleted file mode 100644index 29ee1a1ce5..0000000000--- a/gitbooks/.gitbook/assets/memory-tree-pipeline (1).excalidraw+++ /dev/null@@ -1,1353 +0,0 @@-{- "type": "excalidraw",- "version": 2,- "source": "openhuman-memory-tree-async-pipeline",- "elements": [- {- "id": "title",- "type": "text",- "x": 355,- "y": 20,- "width": 740,- "height": 40,- "text": "OpenHuman Memory Tree Async Pipeline",- "fontSize": 30,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 32,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 1,- "version": 1,- "versionNonce": 1,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "subtitle",- "type": "text",- "x": 235,- "y": 64,- "width": 980,- "height": 24,- "text": "Leaf ingestion -> jobs queue -> workers -> source/topic/global tree building",- "fontSize": 18,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 18,- "strokeColor": "#495057",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 2,- "version": 1,- "versionNonce": 2,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane1",- "type": "rectangle",- "x": 40,- "y": 120,- "width": 310,- "height": 340,- "strokeColor": "#1971c2",- "backgroundColor": "#e7f5ff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 3,- "version": 1,- "versionNonce": 3,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane2",- "type": "rectangle",- "x": 390,- "y": 120,- "width": 340,- "height": 340,- "strokeColor": "#2b8a3e",- "backgroundColor": "#ebfbee",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 4,- "version": 1,- "versionNonce": 4,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane3",- "type": "rectangle",- "x": 770,- "y": 120,- "width": 390,- "height": 340,- "strokeColor": "#e67700",- "backgroundColor": "#fff4e6",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 5,- "version": 1,- "versionNonce": 5,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane4",- "type": "rectangle",- "x": 1200,- "y": 120,- "width": 440,- "height": 340,- "strokeColor": "#9c36b5",- "backgroundColor": "#f8f0fc",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 6,- "version": 1,- "versionNonce": 6,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane5",- "type": "rectangle",- "x": 40,- "y": 500,- "width": 760,- "height": 220,- "strokeColor": "#0b7285",- "backgroundColor": "#e3fafc",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 7,- "version": 1,- "versionNonce": 7,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane6",- "type": "rectangle",- "x": 840,- "y": 500,- "width": 800,- "height": 220,- "strokeColor": "#495057",- "backgroundColor": "#f1f3f5",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 8,- "version": 1,- "versionNonce": 8,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h1",- "type": "text",- "x": 135,- "y": 135,- "width": 120,- "height": 28,- "text": "1. Ingest",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#1971c2",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 9,- "version": 1,- "versionNonce": 9,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h2",- "type": "text",- "x": 505,- "y": 135,- "width": 110,- "height": 28,- "text": "2. Queue",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#2b8a3e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 10,- "version": 1,- "versionNonce": 10,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h3",- "type": "text",- "x": 890,- "y": 135,- "width": 150,- "height": 28,- "text": "3. Workers",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#e67700",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 11,- "version": 1,- "versionNonce": 11,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h4",- "type": "text",- "x": 1320,- "y": 135,- "width": 200,- "height": 28,- "text": "4. Tree State",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#9c36b5",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 12,- "version": 1,- "versionNonce": 12,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h5",- "type": "text",- "x": 275,- "y": 515,- "width": 290,- "height": 28,- "text": "5. Scheduler / Background",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#0b7285",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 13,- "version": 1,- "versionNonce": 13,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h6",- "type": "text",- "x": 1100,- "y": 515,- "width": 280,- "height": 28,- "text": "6. Leaf Lifecycle",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#343a40",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 14,- "version": 1,- "versionNonce": 14,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b1",- "type": "rectangle",- "x": 75,- "y": 185,- "width": 240,- "height": 240,- "strokeColor": "#1971c2",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 15,- "version": 1,- "versionNonce": 15,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t1",- "type": "text",- "x": 93,- "y": 205,- "width": 204,- "height": 198,- "text": "JSON-RPC / source ingestion\n\nchat | email | document\n\ncanonicalise\n-> chunk_markdown\n-> score_chunks_fast\n-> upsert_chunks_tx\n-> lifecycle_status = pending_extraction\n-> persist fast score rows\n-> enqueue extract_chunk per chunk\n-> wake_workers()",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 194,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 16,- "version": 1,- "versionNonce": 16,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b2",- "type": "rectangle",- "x": 435,- "y": 185,- "width": 250,- "height": 240,- "strokeColor": "#2b8a3e",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 17,- "version": 1,- "versionNonce": 17,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t2",- "type": "text",- "x": 453,- "y": 205,- "width": 214,- "height": 198,- "text": "SQLite: memory_tree/chunks.db\n\nmem_tree_chunks\nmem_tree_score\nmem_tree_entity_index\nmem_tree_jobs\nmem_tree_trees\nmem_tree_buffers\nmem_tree_summaries\n\njobs fields\nkind | payload_json | dedupe_key\nstatus | attempts | available_at_ms\nlocked_until_ms | last_error",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 194,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 18,- "version": 1,- "versionNonce": 18,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b3",- "type": "rectangle",- "x": 815,- "y": 185,- "width": 300,- "height": 135,- "strokeColor": "#e67700",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 19,- "version": 1,- "versionNonce": 19,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t3",- "type": "text",- "x": 833,- "y": 205,- "width": 264,- "height": 108,- "text": "jobs::start(workspace_dir)\n\nrecover_stale_locks()\nspawn 3 worker tasks\nNotify wakeup + 5s polling fallback\nshared Semaphore(3) for LLM-bound work",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 104,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 20,- "version": 1,- "versionNonce": 20,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b4",- "type": "rectangle",- "x": 815,- "y": 335,- "width": 300,- "height": 90,- "strokeColor": "#d9480f",- "backgroundColor": "#fff8f0",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 21,- "version": 1,- "versionNonce": 21,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t4",- "type": "text",- "x": 833,- "y": 355,- "width": 264,- "height": 54,- "text": "Handlers\nextract_chunk | append_buffer | seal\ntopic_route | digest_daily | flush_stale",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 50,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 22,- "version": 1,- "versionNonce": 22,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b5",- "type": "rectangle",- "x": 1240,- "y": 185,- "width": 360,- "height": 240,- "strokeColor": "#9c36b5",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 23,- "version": 1,- "versionNonce": 23,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t5",- "type": "text",- "x": 1258,- "y": 205,- "width": 324,- "height": 198,- "text": "Tree building outputs\n\nsource tree\nL0 buffer -> seal -> L1/L2/... summaries\n\ntopic tree\ncurator hotness gate\noptional append_buffer(topic)\n\nglobal tree\ndigest_daily -> daily node\nappend_daily_and_cascade",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 194,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 24,- "version": 1,- "versionNonce": 24,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b6",- "type": "rectangle",- "x": 85,- "y": 575,- "width": 670,- "height": 105,- "strokeColor": "#0b7285",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 25,- "version": 1,- "versionNonce": 25,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t6",- "type": "text",- "x": 103,- "y": 597,- "width": 634,- "height": 72,- "text": "Scheduler loop\n\nUTC daily tick -> enqueue digest_daily(yesterday) + flush_stale(today)\nflush_stale scans stale buffers and enqueues force seal jobs\nworkers consume these through the same mem_tree_jobs pipeline",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 68,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 26,- "version": 1,- "versionNonce": 26,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s1",- "type": "rectangle",- "x": 875,- "y": 585,- "width": 130,- "height": 70,- "strokeColor": "#495057",- "backgroundColor": "#fff3bf",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 27,- "version": 1,- "versionNonce": 27,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st1",- "type": "text",- "x": 891,- "y": 607,- "width": 98,- "height": 24,- "text": "pending_extraction",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 20,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 28,- "version": 1,- "versionNonce": 28,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s2",- "type": "rectangle",- "x": 1045,- "y": 585,- "width": 110,- "height": 70,- "strokeColor": "#495057",- "backgroundColor": "#d3f9d8",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 29,- "version": 1,- "versionNonce": 29,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st2",- "type": "text",- "x": 1069,- "y": 607,- "width": 62,- "height": 24,- "text": "admitted",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 20,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 30,- "version": 1,- "versionNonce": 30,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s3",- "type": "rectangle",- "x": 1195,- "y": 585,- "width": 110,- "height": 70,- "strokeColor": "#495057",- "backgroundColor": "#d0ebff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 31,- "version": 1,- "versionNonce": 31,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st3",- "type": "text",- "x": 1223,- "y": 607,- "width": 54,- "height": 24,- "text": "buffered",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 20,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 32,- "version": 1,- "versionNonce": 32,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s4",- "type": "rectangle",- "x": 1345,- "y": 585,- "width": 110,- "height": 70,- "strokeColor": "#495057",- "backgroundColor": "#e5dbff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 33,- "version": 1,- "versionNonce": 33,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st4",- "type": "text",- "x": 1375,- "y": 607,- "width": 50,- "height": 24,- "text": "sealed",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 20,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 34,- "version": 1,- "versionNonce": 34,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s5",- "type": "rectangle",- "x": 1045,- "y": 665,- "width": 110,- "height": 36,- "strokeColor": "#c92a2a",- "backgroundColor": "#ffe3e3",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 35,- "version": 1,- "versionNonce": 35,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st5",- "type": "text",- "x": 1074,- "y": 672,- "width": 52,- "height": 20,- "text": "dropped",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 16,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 36,- "version": 1,- "versionNonce": 36,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "life-note",- "type": "text",- "x": 1185,- "y": 665,- "width": 390,- "height": 36,- "text": "extract_chunk decides admitted vs dropped. append_buffer moves admitted leaves into buffers. seal creates summaries and parent links.",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 32,- "strokeColor": "#495057",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 37,- "version": 1,- "versionNonce": 37,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "a1",- "type": "arrow",- "x": 315,- "y": 305,- "width": 115,- "height": 0,- "points": [[0, 0], [115, 0]],- "strokeColor": "#2f9e44",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 38,- "version": 1,- "versionNonce": 38,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [115, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a2",- "type": "arrow",- "x": 685,- "y": 305,- "width": 125,- "height": 0,- "points": [[0, 0], [125, 0]],- "strokeColor": "#e67700",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 39,- "version": 1,- "versionNonce": 39,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [125, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a3",- "type": "arrow",- "x": 1115,- "y": 305,- "width": 125,- "height": 0,- "points": [[0, 0], [125, 0]],- "strokeColor": "#9c36b5",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 40,- "version": 1,- "versionNonce": 40,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [125, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a4",- "type": "arrow",- "x": 430,- "y": 575,- "width": 70,- "height": 120,- "points": [[0, 0], [70, -120]],- "strokeColor": "#0b7285",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 41,- "version": 1,- "versionNonce": 41,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [70, -120],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a5",- "type": "arrow",- "x": 1005,- "y": 620,- "width": 40,- "height": 0,- "points": [[0, 0], [40, 0]],- "strokeColor": "#2b8a3e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 42,- "version": 1,- "versionNonce": 42,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [40, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a6",- "type": "arrow",- "x": 1155,- "y": 620,- "width": 40,- "height": 0,- "points": [[0, 0], [40, 0]],- "strokeColor": "#1971c2",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 43,- "version": 1,- "versionNonce": 43,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [40, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a7",- "type": "arrow",- "x": 1305,- "y": 620,- "width": 40,- "height": 0,- "points": [[0, 0], [40, 0]],- "strokeColor": "#9c36b5",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 44,- "version": 1,- "versionNonce": 44,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [40, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a8",- "type": "arrow",- "x": 1100,- "y": 655,- "width": 0,- "height": 10,- "points": [[0, 0], [0, 10]],- "strokeColor": "#c92a2a",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 45,- "version": 1,- "versionNonce": 45,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [0, 10],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "foot",- "type": "text",- "x": 40,- "y": 750,- "width": 1540,- "height": 60,- "text": "Job kinds in play: extract_chunk -> append_buffer(source) -> optional seal -> topic_route -> optional append_buffer(topic). Independent background flow: scheduler -> digest_daily / flush_stale -> seal. All paths go through mem_tree_jobs, so retries, dedupe, stale lock recovery, and worker wakeups stay centralized.",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 56,- "strokeColor": "#343a40",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 46,- "version": 1,- "versionNonce": 46,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- }- ],- "appState": {- "gridSize": null,- "viewBackgroundColor": "#ffffff"- },- "files": {}-}diff --git a/gitbooks/.gitbook/assets/memory.png b/gitbooks/.gitbook/assets/memory.pngdeleted file mode 100644index 66f90adc37..0000000000Binary files a/gitbooks/.gitbook/assets/memory.png and /dev/null differdiff --git a/gitbooks/README.md b/gitbooks/README.mdindex 712e1bcfd8..e67c4af8e3 100644--- a/gitbooks/README.md+++ b/gitbooks/README.md@@ -17,10 +17,10 @@ Every model in the world, all 200+ of them, shares the same fundamental limitatiOpenHuman solves this with a stack that's calmly, deliberately different:-- **A local-first** [**Memory Tree**](features/obsidian-wiki/memory-tree.md)**.** Every source you connect, Gmail, Slack, GitHub, Notion, your own notes, flows through a deterministic pipeline: canonical Markdown, ≤3k-token chunks, scored, folded into per-source / per-topic / per-day summary trees. Stored in SQLite on your machine. No vector-soup black box.-- **An** [**Obsidian-style wiki**](features/obsidian-wiki/) **on top of it.** The same chunks the agent reasons over land as `.md` files in a vault you can open in [Obsidian](https://obsidian.md), browse, edit, and link by hand. Inspired by [Karpathy's obsidian-wiki workflow](https://x.com/karpathy/status/2039805659525644595). You can't trust a memory you can't read.+- **A local-first** [**Memory Tree**](features/memory.md)**.** Every source you connect, Gmail, Slack, GitHub, Notion, your own notes, flows through a deterministic pipeline: canonical Markdown, ≤3k-token chunks, scored, folded into per-source / per-topic / per-day summary trees. Stored in SQLite on your machine. No vector-soup black box.+- **An** [**Obsidian-style wiki**](features/memory.md) **on top of it.** The same chunks the agent reasons over land as `.md` files in a vault you can open in [Obsidian](https://obsidian.md), browse, edit, and link by hand. Inspired by [Karpathy's obsidian-wiki workflow](https://x.com/karpathy/status/2039805659525644595). You can't trust a memory you can't read.- [**118+ third-party integrations**](features/integrations/README.md)**.** One-click OAuth into Gmail, GitHub, Slack, Notion, Stripe, Calendar, Drive, Linear, Jira and more, no API keys to wire by hand, no plugin marketplace to navigate.-- [**Auto-fetch**](features/obsidian-wiki/auto-fetch.md)**.** Every twenty minutes, OpenHuman pulls fresh data from every active connection and folds it into the Memory Tree without you asking, so the agent already has tomorrow's context this morning.+- [**Auto-fetch**](features/memory.md)**.** Every twenty minutes, OpenHuman pulls fresh data from every active connection and folds it into the Memory Tree without you asking, so the agent already has tomorrow's context this morning.- **An agent built for big data.** [Smart token compression (TokenJuice)](features/token-compression.md) compacts verbose tool output before it ever enters the model's context, so sweeping through your last six months of email costs single-digit dollars. [Automatic model routing](features/model-routing/) sends each task to the right model, `hint:reasoning` to a frontier model, `hint:fast` to a cheap one, vision to vision, all under one subscription and one TinyHumans API key. Optional [local AI via Ollama or LM Studio](features/model-routing/local-ai.md) keeps supported workloads on-device, and every LLM, embedding, memory, and web search engine underneath is swappable through config rather than code.- **Fast, cheap decisions.** Before an agent burns a full model call choosing which of dozens of tools to use, a small classifier called Jev scores the options and answers in about 150 milliseconds instead of generating text. It shortlists tools, decides whether a tool is needed at all, and drives routine browser steps, so the expensive model gets called for the things that actually need it.- [**Batteries included**](features/native-tools/)**.** A complete agent toolbelt is wired in by default: [web search](features/native-tools/web-search.md), a [web-fetch scraper](features/native-tools/web-scraper.md), a full [coder toolset](features/native-tools/coder.md) (filesystem, git, lint, test, grep), [browser & computer control](features/native-tools/browser-and-computer.md), [cron & scheduling](features/native-tools/cron.md), [memory tools](features/native-tools/memory-tools.md), [agent coordination](features/native-tools/agent-coordination.md) for spawning sub-agents, and [native voice](features/native-tools/voice.md), STT in, TTS out, mascot lip-sync, and a live Google Meet agent that joins meetings, transcribes them into your Memory Tree, and can speak back into the call. No "install a plugin to read files" friction.diff --git a/gitbooks/SUMMARY.md b/gitbooks/SUMMARY.mdindex 74400ce7b1..da19774349 100644--- a/gitbooks/SUMMARY.md+++ b/gitbooks/SUMMARY.md@@ -22,14 +22,14 @@## Features- [Realtime Mascot](features/mascot/README.md)-- [Memory](features/obsidian-wiki/README.md)- - [Memory Tree](features/obsidian-wiki/memory-tree.md)- - [Memory Sources & Scoping](features/obsidian-wiki/sources.md)- - [Auto-fetch from Integrations](features/obsidian-wiki/auto-fetch.md)- - [Scoring & Ranking](features/obsidian-wiki/scoring.md)- - [Retrieval & Recall](features/obsidian-wiki/retrieval.md)- - [Memory Diff (Git-Backed)](features/obsidian-wiki/memory-diff.md)- - [agentmemory backend](features/obsidian-wiki/agentmemory-backend.md)+- [Memory](features/memory.md)+ - [Memory Tree](features/memory.md)+ - [Memory Sources & Scoping](features/memory.md#REMOVE/sources.md)+ - [Auto-fetch from Integrations](features/memory.md)+ - [Scoring & Ranking](features/memory.md#REMOVE/scoring.md)+ - [Retrieval & Recall](features/memory.md#REMOVE/retrieval.md)+ - [Memory Diff (Git-Backed)](features/memory.md#REMOVE/memory-diff.md)+ - [agentmemory backend](features/memory.md#REMOVE/agentmemory-backend.md)- [Third-party Integrations (118+)](features/integrations/README.md)- [Triggers](features/integrations/triggers.md)- [MCP Servers & Skills](features/integrations/mcp-and-skills.md)diff --git a/gitbooks/developing/architecture/README.md b/gitbooks/developing/architecture/README.mdindex 87942d1af8..24127bb2ff 100644--- a/gitbooks/developing/architecture/README.md+++ b/gitbooks/developing/architecture/README.md@@ -59,7 +59,7 @@ The full table is under "Repository layout" in the [deep architecture reference]## Data flow1. **Connect**. OAuth into an [integration](../../features/integrations/README.md). Backend stores the token; core never sees it in plaintext.-2. **Auto-fetch**. Every twenty minutes the [scheduler](../../features/obsidian-wiki/auto-fetch.md) walks every active connection and asks each native provider to sync.+2. **Auto-fetch**. Every twenty minutes the [scheduler](../../features/memory.md) walks every active connection and asks each native provider to sync.3. **Canonicalize**. Provider output (an email page, a GitHub diff, a Slack channel dump) is normalized into provenance-tagged Markdown.4. **Chunk**. Markdown is split into ≤3k-token deterministic chunks.5. **Store**. Chunks land in SQLite (`<workspace>/memory_tree/chunks.db`) and as `.md` files in `<workspace>/wiki/`.diff --git a/gitbooks/developing/architecture/agent-harness.md b/gitbooks/developing/architecture/agent-harness.mdindex a847217e24..e79ac95a07 100644--- a/gitbooks/developing/architecture/agent-harness.md+++ b/gitbooks/developing/architecture/agent-harness.md@@ -196,7 +196,7 @@ A **session** is the live conversation an `Agent` instance is running. The `Agen1. **Resumes the session transcript** if this is a fresh process - re-loading the exact provider messages from disk so the inference backend's KV-cache prefix still hits.2. **Builds the system prompt** (only on the first turn). This pulls in identity, soul, profile, memory, connected integrations, available tools, safety preamble - assembled by the prompt section builder.-3. **Injects memory context** for the new user message via the memory loader: relevant chunks from the [Memory Tree](../../features/obsidian-wiki/memory-tree.md), with citations attached so the UI can show provenance.+3. **Injects memory context** for the new user message via the memory loader: relevant chunks from the [Memory Tree](../../features/memory.md), with citations attached so the UI can show provenance.4. **Enters the tool-call loop** (next section).5. **Spawns post-turn hooks** in the background - the user gets their answer before archivist / learning / cost logging finishes.@@ -520,7 +520,7 @@ Post-turn hooks fire **after** the turn completes, in the background. They get a- **Archivist** - distills which facts from the turn are worth persisting to long-term memory.- **Learning** - feeds reflection, tool-tracker, and user-profile updates.- **Cost log** - final per-turn cost line.-- **Episodic memory indexing** - writes the turn into the [Memory Tree](../../features/obsidian-wiki/memory-tree.md) as a chunk for future recall.+- **Episodic memory indexing** - writes the turn into the [Memory Tree](../../features/memory.md) as a chunk for future recall.Hooks run via `tokio::spawn`, so the user gets their answer before any of them finish.@@ -757,6 +757,6 @@ Goals and todos are crate-backed outright, with no shadow: thread goals live in## See also- [Architecture overview](README.md) - where the harness sits in the bigger picture.-- [Memory Tree](../../features/obsidian-wiki/memory-tree.md) - what the memory loader reads from and post-turn hooks write to.+- [Memory Tree](../../features/memory.md) - what the memory loader reads from and post-turn hooks write to.- [Automatic Model Routing](../../features/model-routing/) - how `model: "hint:reasoning"` resolves to a concrete provider+model.- [Native Tools - Agent Coordination](../../features/native-tools/agent-coordination.md) - the user-facing surface for `spawn_subagent`, `delegate_*`, `todo`.diff --git a/gitbooks/developing/architecture/memory-tree.md b/gitbooks/developing/architecture/memory-tree.mddeleted file mode 100644index 6a782a7954..0000000000--- a/gitbooks/developing/architecture/memory-tree.md+++ /dev/null@@ -1,67 +0,0 @@-----description: >-- OpenHuman's host layer over the Memory Tree engine - the JSON-RPC handlers,- controller schemas, CLI and event subscriber that stayed in the core after- the tree mechanics moved to the vendored TinyMemory module.-icon: diagram-project------# Memory Tree (`crates/openhuman-core/src/memory/tree/`)--> **Status.** The generic tree mechanics (append, cascade seal, summarise,-> score, embed, retrieve) are crate-owned: they live in `vendor/tinymemory`-> (`tinymemory-core`, with `tinycortex` vendored beneath it) and are reached-> through the `tinymemory-api` contract. `crates/openhuman-core/src/memory/tree/`-> is OpenHuman's **host layer** over that engine: RPC handlers and controller-> schemas that name OpenHuman's `Outcome` and `ControllerSchema`, which the-> engine crate cannot see. Nothing here opens SQLite or branches on tree kind.--The user-facing feature is described in [Memory Tree](../../features/obsidian-wiki/memory-tree.md).--```text-memory (orchestrator, crates/openhuman-core/src/memory/)- │ binding.provider() → tinymemory-api contract- ▼-memory/tree/ (this directory: host surface only)- ├── tree/ memory_tree write/status RPCs + canonical ingest payloads- ├── retrieval/ memory_tree read RPCs (query_source, drill_down, …)- ├── tree_runtime/ tree_summarizer RPCs, `tree-summarizer` CLI, bus subscriber- └── health/ pipeline failure taxonomy + doctor report- │- ▼-vendor/tinymemory (engine: tinymemory-core / tinycortex, persistence, seal, score)-```--## Layout--| Path | Role |-| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| `mod.rs` | Declares the four submodules and re-exports the three controller registries wired into `core/all.rs`. Its module doc records why the old `pub use tinymemory_core::tree::*` glob was removed (#5560). |-| `tree/` | Host wrappers mirroring `tinymemory_core::tree::tree`: the `memory_tree` write/status handlers in `rpc.rs` (`ingest_rpc`, `list_chunks_rpc`, `get_chunk_rpc`, `backfill_status_rpc`, `pipeline_status_rpc`, `doctor_rpc`, `retry_failed_rpc`, `set_enabled_rpc`) and the chat/email/document ingest payload shapes in `canonicalize_types.rs`. |-| `retrieval/` | Agent-facing read RPCs (`rpc.rs`, `schemas.rs`): `query_source`, `cover_window`, `search_entities`, `drill_down`, `fetch_leaves`. `rpc.rs` calls the contract on the **unguarded** `binding.provider()` and passes `source_scope::as_bus_scope()` explicitly on every scoped call. |-| `tree_runtime/` | The markdown time tree's host surface: `ops.rs` / `schemas.rs` (JSON-RPC), `cli.rs` (`tree-summarizer` CLI), `bus.rs` (event subscriber). Reaches the engine through the contract's runtime doors (`runtime_buffer_write`, `runtime_read_node`, `runtime_read_children`, `runtime_tree_status`, `runtime_summarize`, `runtime_rebuild`). |-| `health/` | Pipeline failure taxonomy (`FailureCode`, `FailureClass`, `PipelineFailure`, `DegradedState`), the `user_error` wire payload, and the doctor `report` read from the bound driver's `MemoryMaintenance`. Distinct from `tinymemory_api::health::MemoryHealth` (driver liveness). |--## Layer rules--- **No tree mechanics here.** Seal cascades, summarisation, scoring, embedding and entity extraction happen inside the engine. This directory converts RPC requests into contract calls and contract results into `Outcome`.-- **No persistence here.** The engine owns the tree tables; the host never opens them directly.-- **Scope is explicit.** Task-local state does not cross the module boundary, so every scoped call passes its source scope and self-echo exclusions as arguments.--## Controller registries--`mod.rs` re-exports three registries that `crates/openhuman-core/src/core/all.rs` wires into the global registry:--- `all_memory_tree_registered_controllers` (sourced from `memory/schema/`): the core `memory_tree` namespace, `ingest`, `list_chunks`, `get_chunk`, `pipeline_status`, `set_enabled`, `doctor`, `retry_failed`, `memory_backfill_status`, `smart_walk`, plus the `memory/read_rpc/` methods.-- `all_retrieval_registered_controllers` (`retrieval/schemas.rs`): also under `memory_tree`, `query_source`, `cover_window`, `search_entities`, `drill_down`, `fetch_leaves`.-- `all_tree_summarizer_registered_controllers` (`tree_runtime/schemas.rs`): the `tree_summarizer` namespace, `ingest`, `run`, `query`, `status`, `rebuild`.--RPC namespace strings are wire contracts; they did not change when the directory moved from `memory_tree/` to `memory/tree/`.--## Related--- [`crates/openhuman-core/src/memory/tree/README.md`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/memory/tree/README.md): the internal-audience overview this page mirrors.-- [`crates/openhuman-core/src/memory/README.md`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/memory/README.md): the memory domain and the engine extraction.-- `memory/query/`: the agent-facing `memory_tree` tool (`MemoryQueryTool`), which reuses `retrieval/rpc.rs` DTOs but goes through the guarded driver.-- [Memory Tree feature](../../features/obsidian-wiki/memory-tree.md): what end users see.-- [Architecture overview](../architecture.md): where this fits in the wider system.diff --git a/gitbooks/developing/engines.md b/gitbooks/developing/engines.mdindex 9882064b4d..e8aeb2d20f 100644--- a/gitbooks/developing/engines.md+++ b/gitbooks/developing/engines.md@@ -176,7 +176,7 @@ credential refused, unreachable) puts a one-line reason in the recall blockinstead of an empty result, so the model says memory is unavailable rather thanthat something was never stored.-Related pages: [Memory](../features/obsidian-wiki/README.md) and its+Related pages: [Memory](../features/memory.md) and itssub-pages for what TinyCortex actually does (memory tree, scoring, retrieval,git-backed diffs).diff --git a/gitbooks/developing/memory-tree-pipeline.excalidraw b/gitbooks/developing/memory-tree-pipeline.excalidrawdeleted file mode 100644index 29ee1a1ce5..0000000000--- a/gitbooks/developing/memory-tree-pipeline.excalidraw+++ /dev/null@@ -1,1353 +0,0 @@-{- "type": "excalidraw",- "version": 2,- "source": "openhuman-memory-tree-async-pipeline",- "elements": [- {- "id": "title",- "type": "text",- "x": 355,- "y": 20,- "width": 740,- "height": 40,- "text": "OpenHuman Memory Tree Async Pipeline",- "fontSize": 30,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 32,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 1,- "version": 1,- "versionNonce": 1,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "subtitle",- "type": "text",- "x": 235,- "y": 64,- "width": 980,- "height": 24,- "text": "Leaf ingestion -> jobs queue -> workers -> source/topic/global tree building",- "fontSize": 18,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 18,- "strokeColor": "#495057",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 2,- "version": 1,- "versionNonce": 2,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane1",- "type": "rectangle",- "x": 40,- "y": 120,- "width": 310,- "height": 340,- "strokeColor": "#1971c2",- "backgroundColor": "#e7f5ff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 3,- "version": 1,- "versionNonce": 3,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane2",- "type": "rectangle",- "x": 390,- "y": 120,- "width": 340,- "height": 340,- "strokeColor": "#2b8a3e",- "backgroundColor": "#ebfbee",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 4,- "version": 1,- "versionNonce": 4,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane3",- "type": "rectangle",- "x": 770,- "y": 120,- "width": 390,- "height": 340,- "strokeColor": "#e67700",- "backgroundColor": "#fff4e6",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 5,- "version": 1,- "versionNonce": 5,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane4",- "type": "rectangle",- "x": 1200,- "y": 120,- "width": 440,- "height": 340,- "strokeColor": "#9c36b5",- "backgroundColor": "#f8f0fc",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 6,- "version": 1,- "versionNonce": 6,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane5",- "type": "rectangle",- "x": 40,- "y": 500,- "width": 760,- "height": 220,- "strokeColor": "#0b7285",- "backgroundColor": "#e3fafc",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 7,- "version": 1,- "versionNonce": 7,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "lane6",- "type": "rectangle",- "x": 840,- "y": 500,- "width": 800,- "height": 220,- "strokeColor": "#495057",- "backgroundColor": "#f1f3f5",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 8,- "version": 1,- "versionNonce": 8,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h1",- "type": "text",- "x": 135,- "y": 135,- "width": 120,- "height": 28,- "text": "1. Ingest",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#1971c2",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 9,- "version": 1,- "versionNonce": 9,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h2",- "type": "text",- "x": 505,- "y": 135,- "width": 110,- "height": 28,- "text": "2. Queue",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#2b8a3e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 10,- "version": 1,- "versionNonce": 10,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h3",- "type": "text",- "x": 890,- "y": 135,- "width": 150,- "height": 28,- "text": "3. Workers",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#e67700",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 11,- "version": 1,- "versionNonce": 11,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h4",- "type": "text",- "x": 1320,- "y": 135,- "width": 200,- "height": 28,- "text": "4. Tree State",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#9c36b5",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 12,- "version": 1,- "versionNonce": 12,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h5",- "type": "text",- "x": 275,- "y": 515,- "width": 290,- "height": 28,- "text": "5. Scheduler / Background",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#0b7285",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 13,- "version": 1,- "versionNonce": 13,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "h6",- "type": "text",- "x": 1100,- "y": 515,- "width": 280,- "height": 28,- "text": "6. Leaf Lifecycle",- "fontSize": 24,- "fontFamily": 1,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 24,- "strokeColor": "#343a40",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 14,- "version": 1,- "versionNonce": 14,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b1",- "type": "rectangle",- "x": 75,- "y": 185,- "width": 240,- "height": 240,- "strokeColor": "#1971c2",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 15,- "version": 1,- "versionNonce": 15,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t1",- "type": "text",- "x": 93,- "y": 205,- "width": 204,- "height": 198,- "text": "JSON-RPC / source ingestion\n\nchat | email | document\n\ncanonicalise\n-> chunk_markdown\n-> score_chunks_fast\n-> upsert_chunks_tx\n-> lifecycle_status = pending_extraction\n-> persist fast score rows\n-> enqueue extract_chunk per chunk\n-> wake_workers()",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 194,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 16,- "version": 1,- "versionNonce": 16,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b2",- "type": "rectangle",- "x": 435,- "y": 185,- "width": 250,- "height": 240,- "strokeColor": "#2b8a3e",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 17,- "version": 1,- "versionNonce": 17,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t2",- "type": "text",- "x": 453,- "y": 205,- "width": 214,- "height": 198,- "text": "SQLite: memory_tree/chunks.db\n\nmem_tree_chunks\nmem_tree_score\nmem_tree_entity_index\nmem_tree_jobs\nmem_tree_trees\nmem_tree_buffers\nmem_tree_summaries\n\njobs fields\nkind | payload_json | dedupe_key\nstatus | attempts | available_at_ms\nlocked_until_ms | last_error",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 194,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 18,- "version": 1,- "versionNonce": 18,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b3",- "type": "rectangle",- "x": 815,- "y": 185,- "width": 300,- "height": 135,- "strokeColor": "#e67700",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 19,- "version": 1,- "versionNonce": 19,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t3",- "type": "text",- "x": 833,- "y": 205,- "width": 264,- "height": 108,- "text": "jobs::start(workspace_dir)\n\nrecover_stale_locks()\nspawn 3 worker tasks\nNotify wakeup + 5s polling fallback\nshared Semaphore(3) for LLM-bound work",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 104,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 20,- "version": 1,- "versionNonce": 20,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b4",- "type": "rectangle",- "x": 815,- "y": 335,- "width": 300,- "height": 90,- "strokeColor": "#d9480f",- "backgroundColor": "#fff8f0",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 21,- "version": 1,- "versionNonce": 21,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t4",- "type": "text",- "x": 833,- "y": 355,- "width": 264,- "height": 54,- "text": "Handlers\nextract_chunk | append_buffer | seal\ntopic_route | digest_daily | flush_stale",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 50,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 22,- "version": 1,- "versionNonce": 22,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b5",- "type": "rectangle",- "x": 1240,- "y": 185,- "width": 360,- "height": 240,- "strokeColor": "#9c36b5",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 23,- "version": 1,- "versionNonce": 23,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t5",- "type": "text",- "x": 1258,- "y": 205,- "width": 324,- "height": 198,- "text": "Tree building outputs\n\nsource tree\nL0 buffer -> seal -> L1/L2/... summaries\n\ntopic tree\ncurator hotness gate\noptional append_buffer(topic)\n\nglobal tree\ndigest_daily -> daily node\nappend_daily_and_cascade",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 194,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 24,- "version": 1,- "versionNonce": 24,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "b6",- "type": "rectangle",- "x": 85,- "y": 575,- "width": 670,- "height": 105,- "strokeColor": "#0b7285",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 25,- "version": 1,- "versionNonce": 25,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "t6",- "type": "text",- "x": 103,- "y": 597,- "width": 634,- "height": 72,- "text": "Scheduler loop\n\nUTC daily tick -> enqueue digest_daily(yesterday) + flush_stale(today)\nflush_stale scans stale buffers and enqueues force seal jobs\nworkers consume these through the same mem_tree_jobs pipeline",- "fontSize": 18,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 68,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 26,- "version": 1,- "versionNonce": 26,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s1",- "type": "rectangle",- "x": 875,- "y": 585,- "width": 130,- "height": 70,- "strokeColor": "#495057",- "backgroundColor": "#fff3bf",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 27,- "version": 1,- "versionNonce": 27,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st1",- "type": "text",- "x": 891,- "y": 607,- "width": 98,- "height": 24,- "text": "pending_extraction",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 20,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 28,- "version": 1,- "versionNonce": 28,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s2",- "type": "rectangle",- "x": 1045,- "y": 585,- "width": 110,- "height": 70,- "strokeColor": "#495057",- "backgroundColor": "#d3f9d8",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 29,- "version": 1,- "versionNonce": 29,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st2",- "type": "text",- "x": 1069,- "y": 607,- "width": 62,- "height": 24,- "text": "admitted",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 20,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 30,- "version": 1,- "versionNonce": 30,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s3",- "type": "rectangle",- "x": 1195,- "y": 585,- "width": 110,- "height": 70,- "strokeColor": "#495057",- "backgroundColor": "#d0ebff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 31,- "version": 1,- "versionNonce": 31,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st3",- "type": "text",- "x": 1223,- "y": 607,- "width": 54,- "height": 24,- "text": "buffered",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 20,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 32,- "version": 1,- "versionNonce": 32,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s4",- "type": "rectangle",- "x": 1345,- "y": 585,- "width": 110,- "height": 70,- "strokeColor": "#495057",- "backgroundColor": "#e5dbff",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 33,- "version": 1,- "versionNonce": 33,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st4",- "type": "text",- "x": 1375,- "y": 607,- "width": 50,- "height": 24,- "text": "sealed",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 20,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 34,- "version": 1,- "versionNonce": 34,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "s5",- "type": "rectangle",- "x": 1045,- "y": 665,- "width": 110,- "height": 36,- "strokeColor": "#c92a2a",- "backgroundColor": "#ffe3e3",- "fillStyle": "solid",- "strokeWidth": 2,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "roundness": { "type": 3 },- "seed": 35,- "version": 1,- "versionNonce": 35,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "st5",- "type": "text",- "x": 1074,- "y": 672,- "width": 52,- "height": 20,- "text": "dropped",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "center",- "verticalAlign": "top",- "baseline": 16,- "strokeColor": "#1e1e1e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 36,- "version": 1,- "versionNonce": 36,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "life-note",- "type": "text",- "x": 1185,- "y": 665,- "width": 390,- "height": 36,- "text": "extract_chunk decides admitted vs dropped. append_buffer moves admitted leaves into buffers. seal creates summaries and parent links.",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 32,- "strokeColor": "#495057",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 37,- "version": 1,- "versionNonce": 37,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- },- {- "id": "a1",- "type": "arrow",- "x": 315,- "y": 305,- "width": 115,- "height": 0,- "points": [[0, 0], [115, 0]],- "strokeColor": "#2f9e44",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 38,- "version": 1,- "versionNonce": 38,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [115, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a2",- "type": "arrow",- "x": 685,- "y": 305,- "width": 125,- "height": 0,- "points": [[0, 0], [125, 0]],- "strokeColor": "#e67700",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 39,- "version": 1,- "versionNonce": 39,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [125, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a3",- "type": "arrow",- "x": 1115,- "y": 305,- "width": 125,- "height": 0,- "points": [[0, 0], [125, 0]],- "strokeColor": "#9c36b5",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 40,- "version": 1,- "versionNonce": 40,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [125, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a4",- "type": "arrow",- "x": 430,- "y": 575,- "width": 70,- "height": 120,- "points": [[0, 0], [70, -120]],- "strokeColor": "#0b7285",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 41,- "version": 1,- "versionNonce": 41,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [70, -120],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a5",- "type": "arrow",- "x": 1005,- "y": 620,- "width": 40,- "height": 0,- "points": [[0, 0], [40, 0]],- "strokeColor": "#2b8a3e",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 42,- "version": 1,- "versionNonce": 42,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [40, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a6",- "type": "arrow",- "x": 1155,- "y": 620,- "width": 40,- "height": 0,- "points": [[0, 0], [40, 0]],- "strokeColor": "#1971c2",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 43,- "version": 1,- "versionNonce": 43,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [40, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a7",- "type": "arrow",- "x": 1305,- "y": 620,- "width": 40,- "height": 0,- "points": [[0, 0], [40, 0]],- "strokeColor": "#9c36b5",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 44,- "version": 1,- "versionNonce": 44,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [40, 0],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "a8",- "type": "arrow",- "x": 1100,- "y": 655,- "width": 0,- "height": 10,- "points": [[0, 0], [0, 10]],- "strokeColor": "#c92a2a",- "backgroundColor": "transparent",- "fillStyle": "solid",- "strokeWidth": 3,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 45,- "version": 1,- "versionNonce": 45,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false,- "lastCommittedPoint": [0, 10],- "startBinding": null,- "endBinding": null,- "startArrowhead": null,- "endArrowhead": "arrow"- },- {- "id": "foot",- "type": "text",- "x": 40,- "y": 750,- "width": 1540,- "height": 60,- "text": "Job kinds in play: extract_chunk -> append_buffer(source) -> optional seal -> topic_route -> optional append_buffer(topic). Independent background flow: scheduler -> digest_daily / flush_stale -> seal. All paths go through mem_tree_jobs, so retries, dedupe, stale lock recovery, and worker wakeups stay centralized.",- "fontSize": 16,- "fontFamily": 3,- "textAlign": "left",- "verticalAlign": "top",- "baseline": 56,- "strokeColor": "#343a40",- "backgroundColor": "#ffffff",- "fillStyle": "solid",- "strokeWidth": 1,- "strokeStyle": "solid",- "roughness": 0,- "opacity": 100,- "angle": 0,- "seed": 46,- "version": 1,- "versionNonce": 46,- "isDeleted": false,- "groupIds": [],- "boundElements": null,- "updated": 1,- "link": null,- "locked": false- }- ],- "appState": {- "gridSize": null,- "viewBackgroundColor": "#ffffff"- },- "files": {}-}diff --git a/gitbooks/features/goals-and-todos.md b/gitbooks/features/goals-and-todos.mdindex ab8d87e3e5..07aabd6b78 100644--- a/gitbooks/features/goals-and-todos.md+++ b/gitbooks/features/goals-and-todos.md@@ -46,4 +46,4 @@ goal on screen for the many turns after the one that set it.## See also-- [Memory Tree](obsidian-wiki/memory-tree.md): what goal reflection reads from.+- [Memory Tree](memory.md): what goal reflection reads from.diff --git a/gitbooks/features/integrations/README.md b/gitbooks/features/integrations/README.mdindex ecfce5990e..db96a8df5b 100644--- a/gitbooks/features/integrations/README.md+++ b/gitbooks/features/integrations/README.md@@ -14,7 +14,7 @@ Under the hood, the connector layer is powered by [Composio](https://composio.deOnce a service is connected, it shows up in four places at once:1. As an **agent tool**, the model can call it directly.-2. As a **memory source**, [auto-fetch](../obsidian-wiki/auto-fetch.md) syncs it into the [Memory Tree](../obsidian-wiki/memory-tree.md) every twenty minutes.+2. As a **memory source**, [auto-fetch](../memory.md) syncs it into the [Memory Tree](../memory.md) every twenty minutes.3. As a **profile signal**, your activity across services feeds your personalization.4. As a **trigger source**, live events (a new email, a new charge, an inbound DM) flow into the [Triggers](triggers.md) pipeline and can fire off agent actions automatically.@@ -39,7 +39,7 @@ Some services have **native providers**. Rust modules that know how to ingest th## How connections work-Click **Connect** on any integration. A browser window opens for OAuth. Once you sign in, the connection becomes active and OpenHuman starts syncing it through [auto-fetch](../obsidian-wiki/auto-fetch.md) on the next 20-minute tick.+Click **Connect** on any integration. A browser window opens for OAuth. Once you sign in, the connection becomes active and OpenHuman starts syncing it through [auto-fetch](../memory.md) on the next 20-minute tick.Each integration shows its current status:@@ -86,5 +86,5 @@ See [Privacy & Security](../privacy-and-security.md) for the full boundary.## See also- [Triggers](triggers.md), live events from connected integrations and how they fire agent actions.-- [Auto-fetch from Integrations](../obsidian-wiki/auto-fetch.md)-- [Memory Tree](../obsidian-wiki/memory-tree.md)+- [Auto-fetch from Integrations](../memory.md)+- [Memory Tree](../memory.md)diff --git a/gitbooks/features/integrations/triggers.md b/gitbooks/features/integrations/triggers.mdindex 8902ec41ca..312f89731b 100644--- a/gitbooks/features/integrations/triggers.md+++ b/gitbooks/features/integrations/triggers.md@@ -133,4 +133,4 @@ Triggers follow the same boundary as the rest of the product (see [Privacy & Sec## See also- [Third-party Integrations](README.md), the catalog of services triggers come from.-- [Auto-fetch from Integrations](../obsidian-wiki/auto-fetch.md), the polling counterpart, periodic ingest of source data into the Memory Tree.+- [Auto-fetch from Integrations](../memory.md), the polling counterpart, periodic ingest of source data into the Memory Tree.diff --git a/gitbooks/features/mascot/README.md b/gitbooks/features/mascot/README.mdindex cd112c3853..f4614d755e 100644--- a/gitbooks/features/mascot/README.md+++ b/gitbooks/features/mascot/README.md@@ -32,7 +32,7 @@ It is meant to feel alive, not animated-on-rails.### It remembers you-The mascot is the visible part of an agent that has the [Memory Tree](../obsidian-wiki/memory-tree.md) underneath it. It remembers what you've talked about, who the people in your life are, what's open on your plate, what's been decided, and what's outstanding, across every source you've connected. When it greets you in the morning, it isn't starting from zero.+The mascot is the visible part of an agent that has the [Memory Tree](../memory.md) underneath it. It remembers what you've talked about, who the people in your life are, what's open on your plate, what's been decided, and what's outstanding, across every source you've connected. When it greets you in the morning, it isn't starting from zero.That memory is what makes the personality consistent over weeks and months. The mascot you talk to today knows what the mascot you talked to last Tuesday knows.@@ -59,5 +59,5 @@ The mascot exists because:## See also- [Native Voice](../native-tools/voice.md), the STT / TTS plumbing the mascot rides on.-- [Memory Tree](../obsidian-wiki/memory-tree.md), what the mascot remembers, and how.+- [Memory Tree](../memory.md), what the mascot remembers, and how.- [Chromium Embedded Framework](../../developing/cef.md), the camera-into-Meet pipeline (developer reference).diff --git a/gitbooks/features/model-routing/local-ai.md b/gitbooks/features/model-routing/local-ai.mdindex 99ddf1e3ac..9c4489febf 100644--- a/gitbooks/features/model-routing/local-ai.md+++ b/gitbooks/features/model-routing/local-ai.md@@ -75,7 +75,7 @@ The legacy `local_ai.usage.*` booleans are kept only so older configs migrate. T| Workload | Configured by | Notes || ------------------------------------ | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- || **Chat, reasoning, coding, agentic** | `chat_provider`, `reasoning_provider`, ... | Any local prefix from the table above. |-| **Memory embeddings** | `embeddings_provider = "ollama:bge-m3"` | Used by the [Memory Tree](../obsidian-wiki/memory-tree.md). Needs a 1024-dimension model; `bge-m3` fits. You pull it. |+| **Memory embeddings** | `embeddings_provider = "ollama:bge-m3"` | Used by the [Memory Tree](../memory.md). Needs a 1024-dimension model; `bge-m3` fits. You pull it. || **Summary-tree building** | `local_ai.runtime_enabled` + `local_ai.chat_model_id` | With local AI on, summaries fold on that Ollama model. With it off, they need `memory_tree.cloud_summarization_opt_in = true`. || **Learning / reflection** | `learning_provider` | `crates/openhuman-core/src/agent/learning/reflection.rs`. || **Vision** | `vision_provider`, `local_ai.vision_model_id` | Must be a vision-capable model. See [Local vision](#local-vision). |@@ -131,6 +131,6 @@ Vision is a separate capability from chat, and most small local models cannot do- [Use OpenHuman with a local model](../../guides/local-model.md). Step-by-step setup.- [Local models & bring your own key](local-and-byok-models.md). Per-model capability table and BYOK setup.-- [Memory Tree](../obsidian-wiki/memory-tree.md). What local embeddings and summarization power.+- [Memory Tree](../memory.md). What local embeddings and summarization power.- [Automatic Model Routing](README.md). How lightweight chat hints prefer the local provider.- [Privacy Mode](../privacy-mode.md). Enforcing local-only inference.diff --git a/gitbooks/features/native-tools/README.md b/gitbooks/features/native-tools/README.mdindex 00a744fb6f..e7485a12d8 100644--- a/gitbooks/features/native-tools/README.md+++ b/gitbooks/features/native-tools/README.md@@ -31,7 +31,7 @@ A plugin-only model means tools live in different processes, behind RPC, with th| [Browser & Computer Control](browser-and-computer.md) | Open URLs, inspect DOM snapshots, click, type, move the mouse. || [Cron & Scheduling](cron.md) | Recurring jobs, one-off reminders, scheduled agent runs. || [Voice](voice.md) | Speech-to-text in, text-to-speech out, live Google Meet agent. |-| [Memory Tools](memory-tools.md) | Recall, store, forget, and search the [Memory Tree](../obsidian-wiki/memory-tree.md). |+| [Memory Tools](memory-tools.md) | Recall, store, forget, and search the [Memory Tree](../memory.md). || [Third-party Integrations](../integrations/README.md) | The agent's view of the [118+ connected services](../integrations/README.md). || [Agent Coordination](agent-coordination.md) | Spawn subagents, delegate to skills, plan, ask the user. || [System & Utilities](system-and-utilities.md) | Shell, node, SQL, current time, push notifications, LSP. |diff --git a/gitbooks/features/native-tools/cron.md b/gitbooks/features/native-tools/cron.mdindex 21d55717e8..029d81242f 100644--- a/gitbooks/features/native-tools/cron.md+++ b/gitbooks/features/native-tools/cron.md@@ -31,7 +31,7 @@ Agent jobs run a full model turn every time they fire, so they must be scheduled## How it ties back to the rest-Every cron run is just a normal agent invocation, so it can use any other tool - search the web, query the [Memory Tree](../obsidian-wiki/memory-tree.md), call a [third-party integration](../integrations/README.md), send a message. Run history is recorded so you can see what each tick produced.+Every cron run is just a normal agent invocation, so it can use any other tool - search the web, query the [Memory Tree](../memory.md), call a [third-party integration](../integrations/README.md), send a message. Run history is recorded so you can see what each tick produced.## See alsodiff --git a/gitbooks/features/native-tools/integrations.md b/gitbooks/features/native-tools/integrations.mdindex bf90996b4c..d4a49c31e5 100644--- a/gitbooks/features/native-tools/integrations.md+++ b/gitbooks/features/native-tools/integrations.md@@ -20,7 +20,7 @@ A few examples of what becomes available:## Native vs proxied-Some services have **native providers** - Rust modules that know how to ingest the service into the [Memory Tree](../obsidian-wiki/memory-tree.md) directly (e.g. Gmail's native ingest path). Others are exposed as **proxied tools** only: the agent can call them, but there's no automatic ingest yet. New native providers are added as features land.+Some services have **native providers** - Rust modules that know how to ingest the service into the [Memory Tree](../memory.md) directly (e.g. Gmail's native ingest path). Others are exposed as **proxied tools** only: the agent can call them, but there's no automatic ingest yet. New native providers are added as features land.Lark / Feishu currently has two surfaces: a native real-time channel for message send/receive, and a Composio-proxied workspace toolkit entry for chat, docs, wiki, and meeting actions when the backend allowlist exposes it. Historical chat/doc backfill into the Memory Tree is not yet a native provider; track that separately from the live channel connector.@@ -31,5 +31,5 @@ For Composio-proxied integrations, OpenHuman's core never calls any third-party## See also- [Third-party Integrations (catalog)](../integrations/README.md) - the user-facing pitch, OAuth flow, and connection management.-- [Auto-fetch](../obsidian-wiki/auto-fetch.md) - how connected services flow into the Memory Tree.+- [Auto-fetch](../memory.md) - how connected services flow into the Memory Tree.- [Privacy & Security](../privacy-and-security.md) - the full boundary.diff --git a/gitbooks/features/native-tools/memory-tools.md b/gitbooks/features/native-tools/memory-tools.mdindex 973ebc3f03..7f2917921a 100644--- a/gitbooks/features/native-tools/memory-tools.md+++ b/gitbooks/features/native-tools/memory-tools.md@@ -5,7 +5,7 @@ icon: brain# Memory Tools-The [Memory Tree](../obsidian-wiki/memory-tree.md) is OpenHuman's knowledge base. The memory tools are how the agent talks to it during a conversation.+The [Memory Tree](../memory.md) is OpenHuman's knowledge base. The memory tools are how the agent talks to it during a conversation.## Tools in the family@@ -23,5 +23,5 @@ The Memory Tree is too big to dump into every conversation. The tools let the mo## See also-- [Memory Tree](../obsidian-wiki/memory-tree.md) - what these tools read from and write to.-- [Auto-fetch](../obsidian-wiki/auto-fetch.md) - how the tree gets populated in the first place.+- [Memory Tree](../memory.md) - what these tools read from and write to.+- [Auto-fetch](../memory.md) - how the tree gets populated in the first place.diff --git a/gitbooks/features/native-tools/tool-memory.md b/gitbooks/features/native-tools/tool-memory.mddeleted file mode 100644index cab6502f42..0000000000--- a/gitbooks/features/native-tools/tool-memory.md+++ /dev/null@@ -1,82 +0,0 @@-----description: Durable, tool-scoped rules for safety-critical guidance and learnings.-icon: shield-check------# Tool-Scoped Memory--The tool-scoped memory layer captures **actionable guidance** about how the agent should use specific tools - separate from the [Memory Tools](memory-tools.md) general-purpose recall and from the `tool_effectiveness` statistics namespace. It is the surface that turns "never email Sarah" into a hard constraint the agent has to obey on every subsequent turn.--It implements [issue #1400](https://github.com/tinyhumansai/openhuman/issues/1400) - a first-class storage and retrieval system for durable learnings and high-priority rules.--## What it stores--Every tool gets its own namespace, **`tool-{tool_name}`**, distinct from `global`, `skill-{id}`, and the statistics-only `tool_effectiveness` namespace. Inside it, each entry is a `ToolMemoryRule`:--| Field | Purpose |-| --------------------------- | ---------------------------------------------------------------- |-| `id` | Stable per-rule UUID. Upserts replay the same id. |-| `tool_name` | The tool the rule applies to (e.g. `send_email`, `shell`). |-| `rule` | Natural-language guidance the agent must follow. |-| `priority` | `critical`, `high`, or `normal`. Drives retrieval + compression. |-| `source` | `user_explicit`, `post_turn`, or `programmatic` - provenance. |-| `tags` | Free-form labels (`safety`, `permission`, ...). |-| `created_at` / `updated_at` | RFC3339 timestamps. |--Statistics (`tool_effectiveness/tool/{name}`) and rules (`tool-{name}/rule/{id}`) live in _different_ namespaces by design - one tracks "what happened", the other tracks "what to do about it".--## Priority levels--| Priority | Where it lives | Compression-resistant? |-| ---------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |-| `critical` | Pinned into the **system prompt** via `ToolMemoryRulesSection`. | **Yes** - the system prompt is frozen per-session and never rewritten by the mid-session compactor. |-| `high` | Same system prompt block, ranked below critical. | **Yes** - same mechanism. |-| `normal` | Stored in the namespace; retrieved on demand via `memory_recall`. | No - eligible for compression like any other namespaced memory. |--The compression-resistance property is structural: critical and high rules ride in the _system prompt_, which the inference backend's prefix cache keeps frozen for the entire session. There is no way for token compression to silently drop a `critical` rule.--## Capture pipeline--Two automatic capture paths fire after every turn (via `ToolMemoryCaptureHook`):--1. **User edicts** - sentences like `never <verb> <noun>`, `don't <verb> ...`, `do not <verb> ...`, or `stop <verb>ing ...` in the user message are promoted to a **Critical** rule on the matching tool. Common-noun aliases map `"email"` to a tool named `send_email`, `"shell"` to `bash`/`exec`, etc.; when no alias matches, the rule lands on the first tool that ran in the turn so it stays adjacent to the relevant call site.-2. **Repeated tool failures** - a tool that fails twice or more in a single turn earns a **Normal**-priority observation, with the failure class summarized inline so the agent has context next time it considers that tool.--The hook is enabled by default whenever the learning subsystem is on. Disable selectively with `OPENHUMAN_LEARNING_TOOL_MEMORY_CAPTURE_ENABLED=0`.--## Retrieval at tool-selection time--At session start the harness pre-fetches every Critical and High rule via `ToolMemoryStore::rules_for_prompt`, renders them into the `## Tool-scoped rules` block, and pins the block into the system prompt. Because the prompt is frozen for the lifetime of the session, the rules are visible on every turn at tool-selection time and before any actual tool execution.--Lower-priority guidance stays out of the prompt budget; the agent reaches it on demand by calling `memory_recall` against the `tool-{name}` namespace.--## RPC surface--Six methods are exposed under the `memory` namespace:--| Method | Purpose |-| ------------------------------ | ----------------------------------------------------------------------------------------- |-| `memory.tool_rule_put` | Upsert a rule. Use `priority='critical'` for safety-critical entries. |-| `memory.tool_rule_get` | Fetch a rule by `(tool_name, id)`. |-| `memory.tool_rule_list` | List all rules for a tool, sorted by priority + freshness. |-| `memory.tool_rule_delete` | Delete a rule. |-| `memory.tool_rules_for_prompt` | Return the rendered Markdown block + structured snapshot - what the session builder pins. |-| `memory.tool_rules_json` | Raw JSON list (for envelope consumers). |--JSON payloads use snake_case (`priority: "critical"`, `source: "user_explicit"`). Every method goes through the same `active_memory_client` plumbing as the rest of the memory RPCs.--## End-to-end safety case--The "never email Sarah" path is covered as a regression test:--1. User says _"Never email Sarah at [email protected]."_ during a turn that called `send_email`.-2. `ToolMemoryCaptureHook` extracts the edict, maps the `email` alias to the `send_email` tool, and writes a Critical rule under `tool-send_email/rule/{uuid}`.-3. On the next session, `prefetch_tool_memory_rules_blocking` pulls every Critical and High rule and the session builder appends a `ToolMemoryRulesSection` to the system prompt.-4. The agent sees `### \`send_email\``followed by`- **[critical]** Never email Sarah at [email protected].` before ever choosing a tool, and the rule survives any mid-session token compression.--Coverage and the integration test live in `crates/openhuman-core/src/memory/tool_memory/`.--## See also--- [Memory Tools](memory-tools.md) - general-purpose `recall`, `store`, `forget`.-- [Smart Token Compression](../token-compression.md) - what the system prompt is protected against.diff --git a/gitbooks/features/native-tools/voice.md b/gitbooks/features/native-tools/voice.mdindex b54189e007..0cf68bdc2b 100644--- a/gitbooks/features/native-tools/voice.md+++ b/gitbooks/features/native-tools/voice.md@@ -28,7 +28,7 @@ Reply speech routes through a hosted TTS model. The agent's responses can be spoOpenHuman's flagship voice integration:- Joins a Google Meet via the embedded webview.-- Streams audio out to STT in real time, transcribes everyone in the call, and writes structured notes into the [Memory Tree](../obsidian-wiki/memory-tree.md) as the meeting progresses.+- Streams audio out to STT in real time, transcribes everyone in the call, and writes structured notes into the [Memory Tree](../memory.md) as the meeting progresses.- When you ask it to speak (or it decides it has something useful to add), it generates audio through the TTS model and **plays it back into the meeting as an outbound camera/mic stream**, so other participants actually hear it.## Privacy@@ -39,5 +39,5 @@ OpenHuman's flagship voice integration:## See also-- [Memory Tree](../obsidian-wiki/memory-tree.md) - where Meet transcripts and notes live.+- [Memory Tree](../memory.md) - where Meet transcripts and notes live.- [Automatic Model Routing](../model-routing/) - Meet's brain uses `hint:fast` for low-latency conversational turns.diff --git a/gitbooks/features/obsidian-wiki/README.md b/gitbooks/features/obsidian-wiki/README.mddeleted file mode 100644index 18de345228..0000000000--- a/gitbooks/features/obsidian-wiki/README.md+++ /dev/null@@ -1,73 +0,0 @@-----description: >-- Every memory chunk also lives as a Markdown file in an Obsidian-compatible- vault you can open and edit. Inspired by Karpathy's obsidian-wiki workflow.-icon: book-open------# Memory--<figure><img src="../../.gitbook/assets/memory.png" alt=""><figcaption><p>A preview of the OpenHuman memory in Obsidian. Data from various sources (GMail, Slack, Whatsapp etc..) is organized as a memory tree.</p></figcaption></figure>--OpenHuman's memory is not a black box. The same chunks the agent reasons over are written as plain `.md` files into an Obsidian-compatible vault inside your workspace. You can open it in [Obsidian](https://obsidian.md), browse it, edit it, and link notes by hand, and the agent will see your edits.--The design is directly inspired by [Andrej Karpathy's obsidian-wiki workflow](https://x.com/karpathy/status/2039805659525644595): a personal wiki where every interesting thing in your life ends up as a linkable note.--## In this section--The memory system spans several layers. This page covers the on-disk vault; the rest of the section goes deeper:--| Page | What it covers |-| --------------------------------------------- | ------------------------------------------------------------------------------------------- |-| [Memory Tree](memory-tree.md) | The hierarchical summary forest (L0 buffers → summaries → digests) that produces the vault. |-| [Memory Sources & Scoping](sources.md) | The typed registry of connectors that feed memory, and per-agent source allowlisting. |-| [Auto-fetch from Integrations](auto-fetch.md) | The 20-minute sync loop that keeps memory fresh on its own. |-| [Scoring & Ranking](scoring.md) | How chunks are admitted, enriched with entities, and indexed for recall. |-| [Retrieval & Recall](retrieval.md) | The `memory_tree` tool modes the agent uses to read memory back. |-| [Memory Diff (Git-Backed)](memory-diff.md) | A git ledger of how memory changes over time: "what's new since I last looked." |-| [agentmemory backend](agentmemory-backend.md) | Optional shared `agentmemory` store across other coding agents. |--## Where the vault lives--```-<workspace>/-└── wiki/- ├── summaries/ # auto-generated source / topic / global summaries- ├── notes/ # your hand-written notes (free-form)- └── … # one folder per connected toolkit you've connected-```--The `summaries/` folder is laid out hierarchically, by date for the global tree, by source for source trees, by entity for topic trees. Each file's frontmatter carries provenance (source ids, time range, scope) so the agent can trace any claim back to the chunks that produced it.--## Open the vault--In the desktop app, the **Memory** tab has a **"View vault in Obsidian"** button. It uses an `obsidian://open?path=...` deep link, which only resolves once the folder is **registered** as a vault in Obsidian. The deep link can't register it for you. So the first time:--1. Click **View vault in Obsidian**. If the folder isn't a registered vault yet, OpenHuman shows inline guidance instead of silently failing.-2. In Obsidian, choose **"Open folder as vault"** and pick the path shown. You only need to do this once.-3. Click **View vault in Obsidian** again; it now opens straight into the vault.--If Obsidian is installed somewhere non-standard (Flatpak/Snap/portable), use **Open in Obsidian anyway**, or point OpenHuman at its config folder under **Advanced** so detection works. Don't have Obsidian? The guidance links to the download page, and **Reveal Folder** always opens the vault directory in your OS file manager.--You can also open the folder in any editor, it's just Markdown. Links between files use standard `[[wiki-link]]` syntax, so Obsidian's graph view, backlinks, and tag explorer all work out of the box.--## Editing notes by hand--Anything you put in `wiki/notes/` is fair game for ingest. The same pipeline that processes Gmail and Slack picks up your hand-written notes, chunks them, scores them, and folds them into the topic and global trees alongside everything else.--This means you can:--- Drop a meeting note in `wiki/notes/2026-05-08-board-call.md` and the agent will know the context tomorrow.-- Maintain a file per project, per person, per ticker, the topic tree treats your manual notes as just another source.-- Bulk-import an existing Obsidian vault: drop the `.md` files in and trigger ingest.--## Why this matters--You can't trust a memory you can't read. Most "AI memory" systems hide the state in opaque embeddings; OpenHuman's vault is the inverse, the agent's memory is **literally** a folder of Markdown you own. If the agent gets something wrong, you can find the file, fix it, and the next retrieval is correct.--It's also the cleanest possible export: stop using OpenHuman tomorrow and you keep a fully-formed personal wiki.--## See also--- [Memory Tree](memory-tree.md). the pipeline that produces the vault.-- [Auto-fetch from Integrations](auto-fetch.md). how the vault grows on its own.diff --git a/gitbooks/features/obsidian-wiki/agentmemory-backend.md b/gitbooks/features/obsidian-wiki/agentmemory-backend.mddeleted file mode 100644index 7fb6acff6a..0000000000--- a/gitbooks/features/obsidian-wiki/agentmemory-backend.md+++ /dev/null@@ -1,225 +0,0 @@-----description: >-- Optional `Memory` trait backend that delegates to a locally-running- agentmemory REST server, for users who self-host agentmemory across- Claude Code, Cursor, Codex, OpenCode, and OpenHuman.-icon: database------# agentmemory backend--OpenHuman's default `Memory` trait backend is `sqlite`, the unified store-documented in [Memory Trees](memory-tree.md). Some users already-self-host [agentmemory](https://github.com/rohitg00/agentmemory), typically-because they want a single durable memory shared across Claude Code,-Cursor, Codex, OpenCode, and OpenHuman. For them, OpenHuman exposes an opt-in-backend that proxies every trait call through agentmemory's REST surface.--Selecting `backend = "agentmemory"` skips OpenHuman's SQLite + embedder-path entirely. agentmemory owns the storage, embedding, and retrieval-layers. OpenHuman becomes a thin REST client.--## When to use this--Use the agentmemory backend if:--- You already run `npx -y @agentmemory/agentmemory` for one or more- coding agents and want OpenHuman to share the same durable store.-- You want hybrid BM25 + vector + graph retrieval without provisioning a- separate embedder on the OpenHuman side.-- You prefer agentmemory's lifecycle (consolidation, retention scoring,- auto-forget, graph extraction) over OpenHuman's unified store.--Keep the default `sqlite` backend if:--- You want self-contained, single-process operation with no external- daemon dependency.-- You rely on OpenHuman-specific Memory Tree features (chunking,- sealing, summary trees) that operate on top of the SQLite store. The- Memory Tree pipeline is unaffected by the trait backend, since it- operates on the host's document store independently. Even so, the- agentmemory backend is most valuable when you've already standardised- on agentmemory across other agents.--## Quick start--1. **Install + start agentmemory** (one terminal):-- ```bash- npx -y @agentmemory/agentmemory- ```-- Defaults to `http://localhost:3111` (REST) + `ws://localhost:49134`- (engine). First boot generates an HMAC secret at `~/.agentmemory/.hmac`- and prints it once.--2. **Point OpenHuman at it** in your `config.toml`:-- ```toml- [memory]- backend = "agentmemory"- # Defaults below — set only when overriding.- # agentmemory_url = "http://localhost:3111"- # agentmemory_secret = "" # HMAC bearer token, optional- # agentmemory_timeout_ms = 5000- ```--3. **Restart OpenHuman**. The factory short-circuits the SQLite path- and logs `[memory::factory] using agentmemory backend at <url>`.--That's it. Existing OpenHuman call sites (`store`, `recall`, `get`,-`list`, `forget`, `namespace_summaries`, `count`, `health_check`) work-unchanged.--## Config keys--| Field | Default | Purpose |-| ------------------------ | ----------------------- | -------------------------------------------------------------------- |-| `agentmemory_url` | `http://localhost:3111` | Base URL for the agentmemory REST server |-| `agentmemory_secret` | _none_ | Optional HMAC bearer token. Sent as `Authorization: Bearer <secret>` |-| `agentmemory_timeout_ms` | `5000` | Per-request reqwest timeout |--When `backend == "agentmemory"`, the following existing `MemoryConfig`-fields are **ignored**, because agentmemory owns its own embedding stack-via `~/.agentmemory/.env`:--- `embedding_provider`-- `embedding_model`-- `embedding_dimensions`-- `sqlite_open_timeout_secs`--Setting them on this path is a no-op. The local-AI Ollama health-gate-also doesn't run on this path, because agentmemory's daemon manages its-own embedder lifecycle.--## Field mapping--OpenHuman's `MemoryEntry` ↔ agentmemory wire row:--| OpenHuman field | agentmemory field | Notes |-| -------------------------- | -------------------------------- | ----------------------------------------------------------------- |-| `namespace` | `project` | Defaults to `"default"` when empty |-| `key` | `title` | |-| `content` | `content` | |-| `id` | `id` | agentmemory-generated (`mem_<rand>`) |-| `category: Core` | `type: "fact"` | |-| `category: Daily` | `type: "conversation"` | |-| `category: Conversation` | `type: "conversation"` | |-| `category: Custom(s)` | `type: "fact"` + `concepts: [s]` | Custom tag rolled into the concepts array so it remains queryable |-| `session_id` | `sessionIds: [...]` | OpenHuman exposes a single id; agentmemory persists an array |-| `timestamp` | `updatedAt` (RFC3339) | Falls back to `createdAt` if `updatedAt` is absent |-| `score` (recall hits only) | smart-search `score` | Populated on `recall` responses, `None` on `get` / `list` |--agentmemory carries additional fields that this backend leaves at-defaults: `concepts` (auto-extracted), `files` (path tags), `strength`-(retention score), `version`, and `supersedes` (the lifecycle chain).-They're internal to agentmemory's lifecycle layer and don't need to-round-trip through OpenHuman's trait.--## Trait method → endpoint--| `Memory` method | agentmemory REST | Notes |-| --------------------- | ---------------------------------------------------- | ------------------------------------------------------- |-| `store` | `POST /agentmemory/remember` | `{project, title, content, type, concepts, sessionIds}` |-| `recall` | `POST /agentmemory/smart-search` | Hybrid BM25 + vector + graph |-| `get` | `POST /agentmemory/smart-search` | + client-side exact-title filter |-| `list` | `GET /agentmemory/memories?latest=true&project=<ns>` | |-| `forget` | `get(ns, key)` → `POST /agentmemory/forget` | Two-step: resolve id then forget |-| `namespace_summaries` | `GET /agentmemory/projects` | Returns `[{name, count, lastUpdated}]` |-| `count` | `GET /agentmemory/health` | Reads `memories` field |-| `health_check` | `GET /agentmemory/livez` | |--`RecallOpts.category`, `RecallOpts.session_id`, and `RecallOpts.min_score`-are applied as **client-side filters** on the smart-search response.-agentmemory's REST surface doesn't expose them as server-side filters-today. For very large recall windows (limit > 100) prefer issuing a-tighter query string to reduce server-side work over relying on-client-side post-filtering.--## Security--When `agentmemory_secret` is set, the client honours agentmemory's-v0.9.12 plaintext-bearer guard contract:--- **Loopback hosts** (`localhost`, `127.0.0.1`, `::1`) over `http://`- are allowed. This is the local dev path.-- **`https://`** to any host is allowed.-- **Plaintext HTTP to a non-loopback host** emits a one-time stderr- warning at construction time. The bearer is observable on the wire.-- **`AGENTMEMORY_REQUIRE_HTTPS=1`** (process env, ASCII-case-insensitive- matches `1` or `true`) escalates the warning into a hard refusal at- client construction. The backend fails to start rather than leak the- bearer once.--Production deploys should set `AGENTMEMORY_REQUIRE_HTTPS=1` so a-misconfigured TLS terminator fails loud rather than silently leaking.--The plaintext-bearer guard mirrors the integration plugin guards in-agentmemory's [PR #315](https://github.com/rohitg00/agentmemory/pull/315)-so an operator who's seen the warning on Hermes / OpenClaw / pi will-recognise the same message on OpenHuman.--## Failure modes--| Failure | Backend behaviour |-| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |-| Daemon unreachable at startup | `from_config` succeeds (URL parses), but `health_check()` returns false on first call. Trait methods bubble up `reqwest` transport errors |-| Network timeout | `anyhow::Error` per trait contract; surfaces to caller |-| 4xx / 5xx response | `anyhow::Error` with status + body snippet |-| Bearer over plaintext non-loopback (no env) | One-time stderr warning, request proceeds |-| Bearer over plaintext non-loopback + `AGENTMEMORY_REQUIRE_HTTPS=1` | Hard refusal at construction time |-| Empty `agentmemory_url` | Hard refusal at construction time with hint to leave it unset for the default |-| Invalid URL syntax | Hard refusal at construction time with the parser error |--**No automatic fallback to SQLite.** If the daemon is down at boot, the-backend surfaces the transport error loudly. Operators flip back to-`backend = "sqlite"` in `config.toml` to recover. Rationale: a silent-SQLite fallback would hide a misconfigured daemon, and "private, simple,-predictable" wins over "magically tolerant".--## Performance notes--The backend is a thin REST proxy: it adds one HTTP round-trip per-trait call. Practical implications:--- `store` and `forget` are single-RTT.-- `recall`, `get`, `list` are single-RTT.-- `forget` against an unknown key is two-RTT (the implicit `get` lookup- - a no-op confirmation). Caller can short-circuit this by checking- the return value of a prior `list`.-- agentmemory's REST is `127.0.0.1` by default, so same-host latency is- sub-millisecond. Over a managed deploy with HTTPS termination, expect- roughly 10 to 30ms per RTT.-- The default per-request timeout is 5 seconds. Bump- `agentmemory_timeout_ms` if you're seeing intermittent timeouts on- cold-start of the iii engine; agentmemory's first-request latency- after a long idle can stretch toward 3 to 5s depending on persistence- state.--## Migration: from SQLite to agentmemory--There's no in-place migration today. The recommended path:--1. Export your existing memories from the SQLite store via OpenHuman's- existing export RPC (or by direct SQL).-2. Walk the export and POST each row to `/agentmemory/remember` with- the same `project` + `title` + `content`. agentmemory will assign- new ids; the OpenHuman side picks them up on first `list`.-3. Set `backend = "agentmemory"` and restart.--A dedicated bulk import path is filed as a follow-up.--## Implementation reference--The backend is engine-owned: it lives in the memory engine vendored at `vendor/tinymemory`, not in `crates/openhuman-core`.--- [`crates/tinymemory-remote/src/agentmemory.rs`](https://github.com/tinyhumansai/tinymemory/blob/main/crates/tinymemory-remote/src/agentmemory.rs): the remote backend (client, mapping, and the `Memory` implementation)-- [`crates/tinymemory-remote/src/agentmemory_test.rs`](https://github.com/tinyhumansai/tinymemory/blob/main/crates/tinymemory-remote/src/agentmemory_test.rs): mock-server integration tests-- `scripts/ci/agentmemory-e2e.sh` in the same repo: the end-to-end lane against a real agentmemory server--Related upstream:--- agentmemory repo: <https://github.com/rohitg00/agentmemory>-- agentmemory REST contract: `~/.agentmemory/.env` keys + endpoint- list in the agentmemory README-- v0.9.12 plaintext-bearer guard: agentmemory PR #315diff --git a/gitbooks/features/obsidian-wiki/auto-fetch.md b/gitbooks/features/obsidian-wiki/auto-fetch.mddeleted file mode 100644index 0737887b39..0000000000--- a/gitbooks/features/obsidian-wiki/auto-fetch.md+++ /dev/null@@ -1,60 +0,0 @@-----description: >-- Every twenty minutes, OpenHuman walks every active integration and folds new- data into your memory tree. No prompts, no polling loops you have to write.-icon: arrows-rotate------# Auto-fetch from Integrations--Most "AI assistants" are reactive: you ask, they think, they answer. OpenHuman is the opposite. It pulls from your stack continuously, so by the time you ask "what landed in my inbox overnight?" the answer is already in the [Memory Tree](memory-tree.md).--## How it works--A single periodic scheduler ticks every twenty minutes. On each tick it walks every active [integration](../integrations/README.md), looks up the matching native provider, and, if enough time has elapsed since that connection's last sync, calls `provider.sync(ctx, SyncReason::Periodic)`.--```-every 20 min- |- v-for each active connection (Gmail, Notion, GitHub, ...)- |- +--> check sync_state (toolkit, connection_id)- | - last sync timestamp- | - daily budget- | - dedup set- | - cursor- |- +--> if interval elapsed -> provider.sync()- |- +--> on success -> record_sync_success(ts)-```--A few things matter here:--- **One global tick, not one task per connection.** The number of connections per user is small; a single 20-minute tick is enough and keeps bookkeeping trivial.-- **State is per `(toolkit, connection_id)`.** Each connection has its own cursor, its own last-sync timestamp, its own dedup set, its own daily budget. Restarts rebuild this from local KV, a missed periodic sync is harmless because the next tick after restart picks it back up.-- **Native syncs are shared with event-driven paths.** When a webhook or `on_connection_created` event fires a non-periodic sync, it stamps the same sync_state, so the scheduler doesn't redundantly re-fire.-- **Errors are logged and swallowed.** The scheduler must never panic out of its loop, or periodic sync stops silently for the rest of the process lifetime.--## What lands in the memory tree--Each provider is responsible for shaping its own ingest. The Gmail provider, for example, fetches a page of new messages, runs the email canonicalizer, and pipes the result through the same `ingest` path the manual UI uses, chunks land in SQLite, summary bucket fills, topic tree gets dirtied for any entities touched.--Other providers (GitHub, Slack, Notion, …) follow the same shape: fetch new items since cursor → canonicalize → ingest into the [Memory Tree](memory-tree.md).--## Why a 20-minute tick--The original design ran at 60 seconds. With several connected providers, that meant a steady drumbeat of HTTP fetches and DB writes, visibly busy on a laptop. Twenty minutes trades a little staleness for noticeably less foreground load. The per-provider `sync_interval_secs` still caps the _minimum_ delay between actual syncs; the global tick only loosens the upper bound.--## Tuning and visibility--- **Per-provider interval**. each native provider declares its own `sync_interval_secs`, so high-traffic toolkits (Gmail) can sync more often than low-traffic ones (Stripe).-- **Daily budget**. every connection has a daily request budget to keep API costs and rate limits sane.-- **Logs**. sync activity is logged in the core logs at debug level.--## See also--- [Third-party Integrations](../integrations/README.md). the connector layer auto-fetch runs on top of.-- [Memory Tree](memory-tree.md). where everything ends up.-- [Smart Token Compression](../token-compression.md). what keeps "fetch everything" cheap.diff --git a/gitbooks/features/obsidian-wiki/memory-diff.md b/gitbooks/features/obsidian-wiki/memory-diff.mddeleted file mode 100644index 612dad598d..0000000000--- a/gitbooks/features/obsidian-wiki/memory-diff.md+++ /dev/null@@ -1,120 +0,0 @@-----description: >-- Git-backed change tracking for memory. Every sync is committed to a snapshot- ledger, so the agent can ask "what changed since I last looked?"-icon: git-compare------# Memory Diff--The [Memory Tree](memory-tree.md) tells the agent what it knows. **Memory Diff** tells it what _changed_. It is a derived ledger that records the state of every memory source over time, so any agent (or you) can ask: what's new, what was edited, what disappeared - since the last sync, since I last read it, or since a named baseline.--The chunk store (`mem_tree_chunks`) stays authoritative. The diff ledger is a read-only view built _from_ already-ingested data - so snapshots cost zero API calls. Source: `crates/openhuman-core/src/memory/diff/`.-------## It's a git repository--The whole thing is a real [libgit2](https://libgit2.org/) repository living at `<workspace>/memory_diff/repo` (`git_store.rs`). Rather than invent a snapshot format, OpenHuman maps memory-change tracking straight onto git's native primitives:--| Memory-diff concept | Git primitive |-| ------------------- | --------------------------------------------------- |-| Snapshot | Commit (the snapshot id **is** the commit SHA) |-| Item | One flat blob, named by the (encoded) item id |-| Source | A subtree under `<source_id>/` in the root tree |-| Checkpoint | Annotated tag `ckpt_<uuid>` at HEAD |-| Read marker | Ref `refs/openhuman/read/<source_id>` → commit SHA |-| Diff | A git tree-to-tree diff scoped to one source's path |--Snapshot metadata that has no natural git home - source kind, label, trigger (`auto` / `manual`), item count, millisecond timestamp - rides along in the **commit message as trailers** (`Source-Id:`, `Trigger:`, `Item-Count:`, `Taken-At-Ms:`, …) and is parsed back out on read.-------## The snapshot model--After each successful sync, `auto_snapshot_after_sync()` reads the current chunks for that one source out of `mem_tree_chunks`, groups them into one blob per item, and commits them under `<source_id>/`. Crucially, **every other source is carried forward** from the parent commit - so each commit's tree reflects the whole world, even though only one source actually changed.--```-mem_tree_chunks (authoritative)- |- | sync finishes for source A- v- take_snapshot(A) items grouped, one blob per item- |- v-┌──────────────────────────────────────────────┐-│ commit_snapshot │-│ │-│ root tree = parent tree │-│ ├── src_A/ ← rebuilt from new items │-│ ├── src_B/ ← carried forward unchanged │-│ └── src_C/ ← carried forward unchanged │-│ │-│ message trailers: Source-Id, Trigger, … │-└───────────────────────┬───────────────────────┘- v- HEAD ─► commit (= snapshot id / SHA)-```--A diff for source A is then just `git diff <from-tree>..<to-tree>` with the pathspec pinned to `src_A/`. Added / Removed / Modified fall straight out of git's delta status; **Unchanged** is computed as `to_item_count - added - modified`. Item identity is the blob name, so editing an item's content keeps the name (→ `Modified`) while changing its id is `Removed` + `Added`.--All writes serialise through a process-global lock, because git's HEAD/parent bookkeeping is read-modify-write and concurrent commits could otherwise fork history.-------## What the agent uses it for--The headline use case is **"what changed since I last looked?"** During a conversation the agent calls the `memory_diff` tool (`tools.rs`). Its parameters:--| Param | Effect |-| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |-| _(none)_ | Lists enabled sources with their snapshot counts. |-| `source_id` | Diffs one source. |-| `checkpoint_id` | Cross-source diff: everything that changed since that named checkpoint. |-| `since_read` | When diffing a source, show changes since the **read marker** rather than since the last sync. Default `true`. |-| `commit` | When using `since_read`, advance the read marker to head after reading. Default `true`; set `false` to preview without acknowledging. |-| `include_text_diff` | Include line-level unified diffs for modified items (truncated to ~2000 chars). Default `false`. |--The read-marker mechanic is the turn-to-turn primitive (`diff_since_read` in `ops.rs`): the first call returns the full delta and moves `refs/openhuman/read/<source_id>` up to the current head; the next call returns _only_ what arrived since. So an agent that polls a source repeatedly never re-reads the same news twice. The tool is `ReadOnly` with respect to your data - the only write it performs is advancing that internal marker, never anything in `action_dir`.--Output is concise markdown, e.g.:--```-## Memory Changes (Inbox)--**2 added, 1 modified, 0 removed** (47 unchanged)--### Added-- Invoice #4021 from Acme-- Re: Q3 planning--### Modified-- Standup notes-```-------## Checkpoints and cross-source diffs--A **checkpoint** is a named baseline across _all_ enabled sources - an annotated git tag at HEAD that records the latest snapshot id per source (`create_checkpoint`). It will even take a fresh snapshot for any source lacking one, so the baseline is complete. Later, `diff_since_checkpoint` walks each recorded snapshot to its current head and aggregates per-source changes into one `CrossSourceDiff` - "everything that's happened across my whole memory since this morning's baseline."--Checkpoints are cheap to prune: `cleanup` deletes tags older than N days, but **snapshot commits are never deleted** - git history _is_ the ledger, and git's delta compression keeps it compact.-------## Why this matters to you--Because the ledger is real git history, Memory Diff gives the agent's knowledge an **audit trail**:--- **Traceability.** Every change to what the agent knows is a commit with a timestamp, a trigger (`auto` vs `manual`), and an item count.-- **No surprises.** The agent acts on _deltas_, not the whole world each turn - so a single new email gets noticed without re-reading your entire inbox.-- **Recoverable history.** Snapshots are kept indefinitely; you can always reconstruct what a source looked like at any past point.-- **Cheap.** It's built from data already ingested by the Memory Tree, so tracking change costs no extra model or API calls.-------## See also--- [Memory Tree](memory-tree.md) - the authoritative knowledge base that snapshots are derived from.-- [Auto-fetch from Integrations](auto-fetch.md) - what triggers the syncs that produce new snapshots.-- [Obsidian Wiki](README.md) - the Markdown vault these sources ingest into.diff --git a/gitbooks/features/obsidian-wiki/memory-tree.md b/gitbooks/features/obsidian-wiki/memory-tree.mddeleted file mode 100644index b3171e9374..0000000000--- a/gitbooks/features/obsidian-wiki/memory-tree.md+++ /dev/null@@ -1,178 +0,0 @@-----description: >-- OpenHuman's local-first knowledge base. Ingest from your tools, canonicalize- into Markdown, chunk, score, and fold into hierarchical summary trees.-icon: tree------# Memory Trees--<figure><img src="../../.gitbook/assets/image.png" alt=""><figcaption><p>The Memory Tree. A highly compressed view of all your documents.</p></figcaption></figure>--The Memory Tree is OpenHuman's knowledge base. It is not a vector database with a thin "memory" wrapper. It is a deterministic, bucket-sealed pipeline that turns the messy stream of your day - chats, emails, documents, integration sync results - into structured, queryable, summary-backed Markdown that lives on your machine.--## What it does--Every source you connect feeds the same pipeline:--```-source adapters (chat / email / document)- |- v-canonicalize normalised Markdown + provenance metadata- |- v-chunker deterministic IDs, <=3k-token bounded segments- |- v-content_store atomic .md files on disk (body + tags)- |- v-store persistence (chunks, scores, summaries, jobs)- |- v-score signals + embeddings + entity extraction- |- v-source / topic / global trees per-scope summary trees- |- v-retrieval search / drill_down / topic / global / fetch-```--The hot path (canonicalize → chunk → fast-score → persist → enqueue follow-up work) is fast. Heavy work - embeddings, entity extraction, sealing summary buckets, daily digests - runs in background workers so the UI never blocks.--Embeddings and summary-tree building can run **on-device via Ollama** if you set up [Local AI](../model-routing/local-ai.md): run Ollama yourself, pull the models (for example `ollama pull bge-m3`), and route the workloads to it. Otherwise they go through the OpenHuman backend like any other model call.--## Three trees, three scopes--- **Source trees**, per-source rolling buffer (L0) that seals into L1 → L2 → … as it fills. One per Gmail label, one per Slack channel, one per uploaded document, etc.-- **Topic trees**, per-entity summaries materialized lazily by _hotness_. The more an entity (person, project, ticker, repo) shows up, the more aggressively its topic tree is built and refreshed.-- **Global tree**, one daily global digest across everything ingested that day.--Retrieval can target any scope: search a single source, drill down a topic, or pull the global digest.--## Where it lives on disk--Inside your workspace (default `~/.openhuman`, or whatever `OPENHUMAN_WORKSPACE` points at):--| Path | What's there |-| ----------------------- | ------------------------------------------------------ |-| `memory_tree/chunks.db` | Chunks, scores, summaries, entity index, jobs, hotness |-| `wiki/` | The Markdown vault - see [Obsidian Wiki](./) |--Everything is local. Nothing about your raw data leaves your machine unless you explicitly send a chat message that includes it.--## Why a tree, not a vector store--Vector stores answer "what is similar to this query?" Memory needs to answer more than that:--- **What happened today?** (global digest)-- **What's the latest on this person?** (topic tree, hotness-driven)-- **What did the Stripe webhook say last Tuesday at 3pm?** (source tree + provenance)--Trees give you compression _and_ navigation. Embeddings still live inside so semantic search keeps working, but the structure on top is what makes the memory feel like a brain instead of a bag of fragments.--## How the pipeline works?--The user-facing pitch is simple: connect a source, the agent gets persistent memory of it. The pipeline that delivers on that pitch spans an HTTP-triggered ingest path, a durable job queue, a pool of background workers, three independent summary trees, and a daily UTC scheduler--### 1. Ingest--A new chat / email / document arrives. The hot path canonicalizes it into Markdown, splits it into bounded chunks with deterministic IDs, runs a cheap fast-score, persists everything in a single transaction, marks each chunk as `pending_extraction`, and enqueues follow-up work for the workers.--Three properties matter here:--- **Deterministic.** Chunk IDs are content-addressed, so re-running ingest on identical input never produces duplicates.-- **Fast.** No LLM calls in this lane - only cheap heuristics.-- **Bounded write.** Everything happens in one transaction so a partial ingest can't leave dangling rows.--### 2. Queue--Follow-up work lands in a durable job queue (in the same on-disk store as the chunks). Each job carries a kind, a payload, a dedupe key, retry bookkeeping, and a scheduling window. The kinds:--| Kind | What it does |-| --------------- | ----------------------------------------------------------------------------------------- |-| `extract_chunk` | Deep score + entity extraction. Decides `admitted` vs `dropped`. |-| `append_buffer` | Adds an admitted leaf to the source (or topic) tree's L0 buffer. May trigger a seal. |-| `seal` | Compresses an L0 buffer into an L1 summary; cascades up if the parent buffer is now full. |-| `topic_route` | Routes a leaf into per-entity topic trees, gated by a hotness check. |-| `digest_daily` | Builds the global daily digest node. |-| `flush_stale` | Force-seals buffers that have been sitting too long. |--### 3. Workers--A small pool of background workers (3 by default) picks jobs off the queue and runs them. The pool is woken immediately by the ingest path, with a short polling fallback so a missed wake-up doesn't strand work. A shared semaphore caps concurrent LLM-bound calls so a burst of new sources can't accidentally fan out to dozens of concurrent embeddings.--On startup, any job whose worker lease has expired (because of a crash or kill) is returned to the queue. Crashes don't lose admitted-but-not-yet-sealed work.--### 4. Tree state--Three independent trees are built from the same leaf stream.--- **Source tree** - one per source. New leaves land in the L0 buffer; when the buffer fills (or a stale-flush fires), a `seal` writes an L1 summary, and the cascade continues up.-- **Topic tree** - one per high-hotness entity. The router checks whether an entity is hot enough to deserve its own tree and, if so, appends to its buffer.-- **Global tree** - one tree, growing one node per UTC day, walked up the hierarchy as days accumulate.--### 5. Scheduler--A scheduler loop runs independently of the ingest path. At 00:00 UTC each day it enqueues a global daily digest for yesterday and a stale-flush for today. The scheduler **does not** run summarizers itself - everything goes through the queue, so retries, dedupe, and stale-lock recovery stay centralized.--### 6. Leaf lifecycle--Each chunk moves through a small state machine:--```-pending_extraction --> admitted --> buffered --> sealed- \- --> dropped-```--- Extraction decides `admitted` vs `dropped` based on the deep score.-- Admitted leaves move into a buffer (`buffered`).-- When the buffer seals, every leaf inside is marked `sealed`.-- `dropped` leaves stop here. Their chunk row stays for provenance, but no buffer or summary references them.--This is why retrieval can show provenance without re-running the pipeline: the chunk row plus its terminal lifecycle status is enough.--## Triggering ingest--- **Automatic** - every active integration is auto-fetched every twenty minutes; see [Auto-fetch](auto-fetch.md).-- **Manual** - the Memory tab in the desktop app exposes a "Run ingest" trigger per source.-- **RPC** - `openhuman.memory_tree_ingest` for advanced workflows.--## In the desktop app - the Intelligence tab--Open it from the bottom navigation bar.--**System status.** The top of the page shows the current state (idle, ingesting, summarizing) and a **Run ingest** button to manually trigger a sync against any connected source.--**Memory metrics:**--| Metric | What it shows |-| ------------------------- | -------------------------------------------------------------------------------------------------- |-| **Storage** | Total size of `<workspace>/memory_tree/chunks.db` and the Obsidian vault. |-| **Sources** | How many distinct sources have been ingested (one per Gmail label, Slack channel, document, etc.). |-| **Chunks** | Total ≤3k-token chunks in the store. |-| **Topics** | Number of topic trees materialized so far (per-entity summaries built from "hot" entities). |-| **First / latest memory** | Timestamps of the oldest and newest chunks. |--**Memory graph.** A force-directed visualization of entities and their relationships, drawn from the entity index. The graph grows as auto-fetch pulls more data - sparse early on, denser within a few days.--**Obsidian vault.** A **View vault in Obsidian** button opens `<workspace>/wiki/` directly via an `obsidian://open?path=...` deep link. You can also open the folder in any file browser.--**Ingestion activity.** A heatmap showing ingest events over time, similar to a GitHub contribution graph. Useful for spotting periods where auto-fetch was idle (e.g. a connection broke and stopped syncing).--**Search & retrieval.** A search bar over the Memory Tree. Source-scoped, topic-scoped or global queries are all supported, and any result links back to the underlying chunk file in your Obsidian vault for full provenance.--**Routing.** The Intelligence tab also surfaces which model the agent is using per task - see [Automatic Model Routing](../model-routing/).--## Swapping the backend--The Memory Tree pipeline (chunker → score → seal → summarise) is the-default. Operators who self-host [agentmemory](https://github.com/rohitg00/agentmemory)-across multiple agents and want OpenHuman to share that same durable-store can opt into an external backend via `MemoryConfig.backend =-"agentmemory"`. See [agentmemory backend](agentmemory-backend.md) for-config keys, field mapping, endpoint table, security, and failure-modes.diff --git a/gitbooks/features/obsidian-wiki/retrieval.md b/gitbooks/features/obsidian-wiki/retrieval.mddeleted file mode 100644index 29c4fb6f31..0000000000--- a/gitbooks/features/obsidian-wiki/retrieval.md+++ /dev/null@@ -1,111 +0,0 @@-----description: >-- How OpenHuman reads back from the memory tree. A handful of deterministic- retrieval primitives, canonical entity resolution, a co-occurrence graph, and- a specialist memory sub-agent that combines them.-icon: search------# Memory Retrieval & Recall--The [Memory Tree](memory-tree.md) is the write path: it folds the stream of your day into chunks, scores, and hierarchical summary trees on disk. **Retrieval** is the read path - how the agent finds the right node, hydrates the right raw chunk, and resolves "Alice" to a stable id before answering you.--There is deliberately **no classifier, gate, or composer** in the retrieval layer. The primitives are deterministic and scope-specific; deciding _which_ primitive to call and _how_ to combine results is left to the calling agent (or, for the deterministic `walk`, to a pure routing algorithm). Source: `crates/openhuman-core/src/memory/tree/retrieval/mod.rs`.-------## The `memory_tree` tool: one mode dispatcher--The agent-facing surface is a single multi-mode tool named `memory_tree` (`crates/openhuman-core/src/memory/query/mod.rs`). Its `mode` field routes to one underlying implementation. Every retrieval mode returns the same `RetrievalHit` shape so the model sees a uniform schema regardless of which mode ran.--| Mode | What it's for | Typical use |-| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |-| `search_entities` | Fuzzy `LIKE` lookup over the canonical entity index; resolves a surface name to a canonical id. | Call **first** when the user mentions someone by name ("what did Alice say?"). |-| `query_source` | Per-source summary retrieval filtered by source kind + time window, with optional semantic rerank. | "Summarise my Slack #eng from last week." |-| `drill_down` | BFS walk of a summary node's `child_ids`, one or more levels down, with optional rerank. | Expand a coarse summary into its finer-grained children. |-| `cover_window` | Minimum set of nodes covering a `[since_ms, until_ms]` time window. | "Last 24h" recaps and other time-bounded catch-ups. |-| `fetch_leaves` | Batch hydration of raw leaf chunks by id (cap 20). | Pull exact source text for citation after a summary hit. |-| `ingest_document` | Write a document into the tree for future retrieval (the one **write** mode). | Persist a fetched web page / GitHub file; re-ingesting the same `source_id` replaces old chunks. |-| `walk` / `smart_walk` | Deterministic E2GraphRAG retrieval - extracts query entities, routes between the entity graph and dense summaries with **no LLM**, returns ranked evidence. | Answer a natural-language question in one shot without an agent loop. |--The historical `query_global` and `query_topic` modes were **removed**: source trees hold all the content, and walking the source hierarchy plus the entity index reconstructs both the time and topic projections (`mod.rs` dispatcher tests assert their absence).-------## The `RetrievalHit` shape--Every primitive emits `RetrievalHit`. Retrieval is engine-owned: `crates/openhuman-core/src/memory/tree/retrieval/` is only the JSON-RPC layer, and the primitives live under `vendor/tinymemory` in `crates/tinymemory-core/src/tree/retrieval/`, whose `types.rs` re-exports the shapes defined in the vendored `tinycortex` crate (`src/memory/retrieval/types.rs`). The important fields:--- `node_id`, `node_kind` - `leaf` (a raw `mem_tree_chunks` row) or `summary` (a sealed `mem_tree_summaries` row). Consumers branch on this (e.g. "only `drill_down` on summaries").-- `tree_id` / `tree_kind` / `tree_scope` / `level` - provenance, so a UI can say "from Slack #eng".-- `content` - the snippet (summary text or raw chunk body).-- `entities` / `topics` - canonical ids and tags carried on the node.-- `time_range_start` / `time_range_end` - RFC3339, so hits from different tools sort on a common axis.-- `score` - relevance.-- `child_ids` - next level down (empty on leaves); the cursor for `drill_down`.-- `source_ref` - back-pointer to the original source (populated on leaves).--Query-style modes wrap hits in a `QueryResponse { hits, total, truncated }` where `total` is the pre-truncation match count, so the agent can tell whether a higher-limit follow-up would surface more.-------## Entity resolution and canonical ids--Names are messy; ids are not. Before answering a question about a person, the agent resolves the surface form to a **canonical id** like `person:alice` or `email:[email protected]`.--- `search_entities` does the fuzzy lookup over the entity index that the tree summariser maintains.-- The canonical registry lives in `crates/openhuman-core/src/memory_entities/` - one Markdown file per entity at `<content_root>/entities/<kind>/<canonical_id>.md`, with YAML frontmatter (`id`, `kind`, `display_name`, `aliases`, `emails`, `handles`) plus a free-form notes body the user can edit in Obsidian. `lookup_alias` matches by alias / email / handle / display name, case-insensitively.-- `kind` matches `memory_tree::score::extract::EntityKind`, so the ids the scorer emits round-trip through the registry unchanged. The vault is the source of truth - Obsidian, grep, and vector search all see the same data without a separate store.-------## The entity graph (read-only, derived)--`crates/openhuman-core/src/memory_graph/` exposes entity relationships **without** a parallel triple-store table. The premise: _the graph is the tree mapped out_. Two entities that co-occur on the same tree node form an edge; the weight is the count of distinct shared nodes.--- `co_occurring_entities(config, subject, limit)` - `GraphEdge { subject, object, weight }` sorted by weight.-- `neighbors(config, subject, limit)` - neighbour ids only.--It is a pure read-only SELF-JOIN over `mem_tree_entity_index` - no new tables, no new schema. This graph is exactly what powers the deterministic `walk` routing below.-------## Deterministic walk (`walk` / `smart_walk`, no LLM)--`walk` and `smart_walk` both route through `fast_retrieve` (`crates/tinymemory-core/src/tree/retrieval/fast.rs` under `vendor/tinymemory`), an **E2GraphRAG-style** algorithm that replaces the old agentic turn-by-turn loops. It never invokes an LLM. Routing is decided purely by query entities and co-occurrence-graph hop distance:--1. Extract query entities `Eq` (spaCy NLP, regex fallback).-2. `Eq` empty -> **global**: dense rerank over the summary tree.-3. Otherwise compute related entity pairs within `h` hops:- - none related -> **global with occurrence ranking**: dense top-2k, re-ranked by how many `Eq` entities each summary mentions.- - related pairs found -> **local**: intersect the entity-index node sets of each pair, tightening `h` while candidates exceed `k`, then rank survivors by entity coverage and recency.--Tunables (`FastRetrieveOptions`): `limit` (`k`, default 10, cap 100), `max_hops` (`h`, default 2, cap 4), and an optional `time_window_days` look-back on the dense branch. Output is a structured `QueryResponse` of hits - no synthesised prose - for a higher-level context agent to consume.-------## Time-windowed recall--For "what happened in the last 24h" style questions, `cover_window` computes the **minimum set of nodes** that covers `[since_ms, until_ms]` (epoch-millis). Because summary nodes carry `time_range_start` / `time_range_end`, a single high-level summary can cover a whole window without fanning out to every leaf - the agent only drills down or fetches leaves when it needs detail or a citation.-------## `memory_recall` - legacy key-value search--Distinct from the tree, `memory_recall` (`crates/openhuman-core/src/memory/tools/recall.rs`) searches the older namespaced key-value memory: `memory_recall { namespace, query, limit }` over namespaces like `global`, `background`, `autocomplete`, or `skill-{id}`. It returns scored results and is best for exact preference / fact lookups ("does the user prefer dark mode?") that predate the tree.-------## The memory agent (specialist sub-agent)--`crates/openhuman-core/src/memory/agent/` owns a specialist retrieval sub-agent invoked via the `call_memory_agent` tool. It navigates the memory tree to answer a question by combining strategies the primitives expose: vector search, keyword search over raw files, entity search and relationship following, hierarchical tree browse, direct content reads, and source listing.--Its tool allowlist (`crates/openhuman-core/src/memory/agent/agent/agent.toml`) is the full retrieval surface: `memory_tree` (with all the modes above, including deterministic `walk` / `smart_walk`), `memory_recall`, and `query_memory`. The prompt and iteration cap live alongside in `agent/prompt.md` + `agent/prompt.rs`; performance is tracked by the benchmark harness in `ops.rs` (`scripts/bench-memory-walk.sh`).-------## See also--- [memory-tree.md](memory-tree.md) - the write path that builds the trees retrieval reads.-- [memory-diff.md](memory-diff.md) - how memory changes are tracked over time.-- [README.md](README.md) - feature index for the Obsidian-backed wiki.diff --git a/gitbooks/features/obsidian-wiki/scoring.md b/gitbooks/features/obsidian-wiki/scoring.mddeleted file mode 100644index 0647459b2e..0000000000--- a/gitbooks/features/obsidian-wiki/scoring.md+++ /dev/null@@ -1,118 +0,0 @@-----description: >-- How OpenHuman scores every chunk before it enters the Memory Tree - weighted- signals gate admission, entity extraction enriches it, and an inverted index- plus vector embeddings make it recallable.-icon: scale------# Memory Scoring & Ranking--Not every chunk deserves a place in the Memory Tree. A "thanks!" reply, an email footer, or a calendar auto-notification carry almost no signal, and folding them into summary trees only dilutes the result and burns LLM tokens. Scoring is the gate: a per-chunk pass that runs **after chunking and before the chunk is appended to the L0 buffer**, deciding whether the chunk is worth keeping, enriching it with extracted entities, and indexing it for retrieval.--The entry point is `score_chunk` in [`crates/tinymemory-core/src/tree/score/mod.rs`](https://github.com/tinyhumansai/tinymemory/blob/1d6b997874a06600ba0c4922708b5613497c9ffe/crates/tinymemory-core/src/tree/score/mod.rs). It is a pure function - it computes a result but does not touch the store; callers persist based on `ScoreResult::kept`.-------## Why scoring exists--Two goals, both in service of a dense, relevant tree:--- **Keep the tree signal-rich.** Trees compress _and_ navigate. Admitting noise makes both worse - summaries get vaguer and retrieval surfaces junk.-- **Control cost.** The deep path can call an LLM for entity extraction and importance rating. Scoring is structured so that obvious keeps and obvious drops never pay that cost - only genuinely borderline chunks consult the model.-------## The signals--`score_chunk` computes a bag of independent signals, each normalised to `[0.0, 1.0]`, defined in [`score/signals/`](https://github.com/tinyhumansai/tinymemory/tree/1d6b997874a06600ba0c4922708b5613497c9ffe/crates/tinymemory-core/src/tree/score/signals). They are combined into a single weighted total and stored alongside it in `mem_tree_score` so every admit/drop decision stays auditable.--| Signal | What it measures | Default weight |-| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------- |-| `token_count` | Plateau over chunk size: 0 below `TOKEN_MIN` (10), ramps to 1 by `TOKEN_RAMP_LOW` (30), eases back to 0.5 toward `TOKEN_MAX` (8000). | 1.0 |-| `unique_words` | Type-token ratio noise detector; low lexical diversity scores low, very short messages return a neutral 0.5. | 1.0 |-| `metadata_weight` | Base weight per `SourceKind` (Email > Document > Chat). | 1.5 |-| `source_weight` | Per-`DataSource` weight inferred from `provider:<name>` tags, with `SourceKind` defaults. | 1.5 |-| `interaction` | Engagement-tag bonus (`sent`, `reply`, `dm`, `mention`); absent tags return 0.5 so silent content isn't penalised. | 3.0 |-| `entity_density` | Distinct entities per token, capped at ~1 entity / 100 tokens. More entities → more substantive. | 1.0 |-| `llm_importance` | LLM-derived importance rating in `[0.0, 1.0]`. Off by default; weight `2.0` once an LLM extractor is wired in. | 0.0 |--`interaction` is deliberately the strongest signal - direct user engagement is the clearest proxy for "this mattered to a human." Weights live in `SignalWeights` (`signals/types.rs`); `combine` / `combine_cheap_only` in `signals/ops.rs` produce the normalised total (the cheap variant excludes the `llm_importance` term). Scoring is engine-owned: both files are defined in the vendored `tinycortex` crate under `vendor/tinymemory` (`src/memory/score/signals/`) and re-exported through `tinymemory-core`, not in `crates/openhuman-core`.-------## The admission gate--```-chunk --> regex extract --> cheap signals --> combine_cheap_only- |- +--------------------------------------+--------------------------------------+- | | |- total >= DEFINITE_KEEP (0.85) DEFINITE_DROP < total < KEEP total <= DEFINITE_DROP (0.15)- admit, skip LLM borderline -> LLM extract, drop, skip LLM- merge, recompute, recombine- | | |- +--------------------------------------+--------------------------------------+- v- final total >= DROP_THRESHOLD (0.3) ? --> admit / drop- v- extract entities --> canonicalise --> index + embed-```--The three band constants are defined in `mod.rs`:--- `DEFAULT_DEFINITE_KEEP = 0.85` - cheap total at or above this is admitted without the LLM.-- `DEFAULT_DEFINITE_DROP = 0.15` - cheap total at or below this is dropped without the LLM.-- `DEFAULT_DROP_THRESHOLD = 0.3` - the final admission cutoff applied after any LLM augmentation.--Only chunks whose cheap total lands **strictly between** the two definite bands pay for an LLM call - that is where the importance signal is most informative. A short-circuit on either side skips it.--Two refinements sit on top. Chunks tagged `priority_high` at ingest (GitHub commit messages, closed/merged issues and PRs) get a `PRIORITY_BOOST` of `+0.25` (clamped to 1.0) so high-signal source material clears the gate and ranks higher. And a guard drops "tiny, entity-free" chatter - content under `TOKEN_MIN` tokens with no extracted entities - so it can't squeak through on metadata priors alone (priority-tagged chunks bypass this guard).--Dropped chunks still get a score row written for diagnostics, with a `drop_reason`; their chunk row survives for provenance, but no buffer or summary references them.-------## Entity extraction--Extraction enriches a chunk and feeds both the `entity_density` / `llm_importance` signals and the index. It is pluggable via the `EntityExtractor` trait in [`score/extract/`](https://github.com/tinyhumansai/tinymemory/tree/1d6b997874a06600ba0c4922708b5613497c9ffe/crates/tinymemory-core/src/tree/score/extract), and runs in two stages:--- **`RegexEntityExtractor`** - always on, deterministic, cheap. Once-compiled patterns pull mechanical identifiers: email, URL, handle (`@alice` and Discord-style `alice#1234`), and hashtag. UTF-8 safe (spans are char offsets).-- **`LlmEntityExtractor`** - consulted only on borderline chunks. A single structured-JSON call asks the model for semantic NER (Person / Organization / Location / Topic / …) plus an importance rating, with span recovery and a soft warn-and-empty fallback on transport failure.--The two are chained by **`CompositeExtractor`**, which runs a sequence of extractors and tolerates per-extractor failures. Outputs are merged (`ExtractedEntities::merge` deduplicates entities and takes the max importance), then **canonicalised** by `resolver.rs` - defined in the vendored `tinycortex` crate at `src/memory/score/resolver.rs` and re-exported through `tinymemory-core`'s `tree/score/mod.rs` - lowercasing emails, stripping leading `@`/`#`, and assigning stable `canonical_id` strings - so the same person or topic resolves to one identity across chunks.-------## The entity index & graph--Canonical entities for each kept chunk are written to **`mem_tree_entity_index`**, an inverted index mapping `entity_id → node_id` ([`store.rs`](https://github.com/tinyhumansai/tinymemory/blob/1d6b997874a06600ba0c4922708b5613497c9ffe/crates/tinymemory-core/src/tree/score/store.rs)). This is the connective tissue the rest of the Memory Tree reads from:--- **Retrieval** resolves a query's entities against the index to find candidate nodes.-- **Topic routing** uses entity hotness to decide which entities deserve their own topic tree.-- **The Memory graph** (the force-directed visualization in the Intelligence tab) is drawn from co-occurrence edges - two entities mentioned in the same chunk get an undirected edge (`graph::pairs_from_entities`), written in the same transaction as the index so the two never diverge.-------## Embeddings for semantic recall--Scoring also produces vectors. The embedder in [`score/embed/`](https://github.com/tinyhumansai/tinymemory/tree/1d6b997874a06600ba0c4922708b5613497c9ffe/crates/tinymemory-core/src/tree/score/embed) turns each chunk (and later, summary) into a fixed `EMBEDDING_DIM = 1024`-float `Vec<f32>`, packed into a SQLite BLOB, so retrieval can rerank candidates by cosine similarity rather than relying on the entity index alone.--The active embedder is selected by `build_embedder_from_config` ([`embed/factory.rs`](https://github.com/tinyhumansai/tinymemory/blob/1d6b997874a06600ba0c4922708b5613497c9ffe/crates/tinymemory-core/src/tree/score/embed/factory.rs)) walking a resolution ladder, identical for read and write paths:--1. **Explicit Ollama override** (`memory_tree.embedding_endpoint` + `embedding_model`) - power users / E2E rigs.-2. **Local Ollama** via the unified `embeddings` workload setting (`embeddings_provider = "ollama:<model>"`, or Ollama chosen under **Connections → Embeddings**). See [Local AI](../model-routing/local-ai.md); you pull the model yourself.-3. **User-configured OpenAI-compatible** endpoint (`OpenAiCompatEmbedder`, e.g. LM Studio).-4. **Managed cloud** (`CloudEmbedder`, OpenHuman backend / Voyage) - the default once logged in.-5. **No provider** - the read path falls back to `InertEmbedder` (zero vectors) so retrieval still runs; the write path returns `None`, skips embedding, and flags `semantic_recall` degraded so the chunk can be re-embedded later.--Embeddings run on the background workers, not the ingest hot path, so a burst of new sources never blocks the UI. Trees give compression and navigation; embeddings keep similarity search working underneath them.-------## See also--- [Memory Trees](memory-tree.md) - the pipeline scoring sits inside.-- [Retrieval](retrieval.md) - how the index and embeddings are queried.-- [Obsidian Wiki](README.md) - the Markdown vault scored chunks land in.-- [Token Compression](../token-compression.md) - why keeping the tree dense matters.diff --git a/gitbooks/features/obsidian-wiki/sources.md b/gitbooks/features/obsidian-wiki/sources.mddeleted file mode 100644index 8a5cb21589..0000000000--- a/gitbooks/features/obsidian-wiki/sources.md+++ /dev/null@@ -1,101 +0,0 @@-----description: >-- The typed registry of connectors that feed your Memory Tree (local folders,- GitHub repos, RSS feeds, web pages, and Composio OAuth integrations), plus- per-agent source scoping for privacy and focus.-icon: database------# Memory Sources & Scoping--A **memory source** is a configured connector that feeds the [Memory Tree](memory-tree.md). Where the tree owns _"how do I store and summarize?"_, the `memory_sources` domain (`crates/openhuman-core/src/memory/sources/`) owns the upstream question: **"what feeds my memory?"** It is a typed registry of connectors, persisted in `config.toml` under `[[memory_sources]]`, with CRUD at runtime, a uniform reader abstraction, per-source sync status, and the `openhuman.memory_sources_*` RPC surface.--The domain only _defines connectors and reads from them_. The ingestion engine and sync scheduling live in `memory` / `memory_sync`; sources dispatch work to the right backend.-------## Source kinds--Every source is a single flat `MemorySourceEntry` (defined in `crates/tinymemory-sources/src/types.rs` under `vendor/tinymemory`, and re-exported through `tinymemory-core`'s `sources/types.rs`) whose `kind` discriminator (the `SourceKind` enum) decides which fields are required. Validation is enforced at add/update time by `validate()`, not the type system. The kinds:--| Kind | `SourceKind` | What it ingests |-| ----------------- | -------------- | --------------------------------------------------------------------------------------------------- |-| **Composio** | `Composio` | An OAuth-connected SaaS integration (Gmail, Slack, Notion, …); sync is provider-driven. |-| **Conversation** | `Conversation` | The agent's own conversation transcripts. |-| **Folder** | `Folder` | A local directory, globbed (default `**/*.md`, 10 MB/file cap) with a path-traversal guard. |-| **GitHub repo** | `GithubRepo` | Project activity (commits, issues, PRs) via the `gh` CLI or a public REST fallback. |-| **RSS feed** | `RssFeed` | RSS/Atom feed items. |-| **Web page** | `WebPage` | A fetched web page, optionally narrowed by a CSS `selector`. |-| **Twitter query** | `TwitterQuery` | A saved Twitter query. The reader is scaffolded; sync is intentionally unimplemented pending creds. |--Each entry also carries optional per-sync budgets (`max_tokens_per_sync`, `max_cost_per_sync_usd`, `sync_depth_days`) so a chatty source can't blow up your token spend on one run.-------## Adding and configuring sources--Sources are CRUD-ed through the `memory_sources` controllers (`crates/openhuman-core/src/memory/sources/schemas.rs` → `rpc.rs`), namespace `openhuman.memory_sources_*`:--| RPC | Purpose |-| ------------- | --------------------------------------------------------------- |-| `list` | List configured sources (lazily reconciles Composio first). |-| `get` | Fetch one source by `id`. |-| `add` | Add a source; kind-specific fields are flat on the request. |-| `update` | Partial update via `MemorySourcePatch`. |-| `remove` | Delete a source by `id`. |-| `list_items` | List readable items from a source via its reader. |-| `read_item` | Read one item's content. |-| `sync` | Queue a manual sync (returns immediately; progress via events). |-| `status_list` | Per-source sync status. |--All mutations reload the live `Config`, apply the change, and `config.save()` atomically (`registry.rs`). In the desktop app these surface in the Intelligence / Memory tab alongside the [Auto-fetch](auto-fetch.md) cadence.-------## The reader abstraction--Every kind implements one async trait, `SourceReader` (`crates/openhuman-core/src/memory/sources/readers/mod.rs`):--```rust-#[async_trait]-pub trait SourceReader: Send + Sync {- fn kind(&self) -> SourceKind;- async fn list_items(&self, source, config) -> Result<Vec<SourceItem>, String>;- async fn read_item(&self, source, item_id, config) -> Result<SourceContent, String>;-}-```--A `reader_for(kind)` dispatcher hands back the right implementation (`FolderReader`, `GithubReader`, `RssReader`, `WebPageReader`, etc.). On a manual `sync`, reader-backed kinds walk `list_items` and ingest each item through `memory::ingest_pipeline::ingest_document` (`sync.rs`); Composio sources delegate wholesale to `memory_sync::composio::run_connection_sync` rather than reading item-by-item, so `ComposioReader::read_item` is an explanatory placeholder.-------## Sync status & freshness--`status.rs` computes a `SourceStatus` per source by querying `mem_tree_chunks` (chunks synced/pending, last-chunk timestamp) using a `source_id LIKE` prefix: `mem_src:{id}:%` for reader kinds, `{toolkit}:%` for Composio. Each source gets a `FreshnessLabel`:--- **Active**: last chunk ≤ 30 s ago.-- **Recent**: last chunk ≤ 5 min ago.-- **Idle**: older, or no chunks yet.--Sync progress streams as `MemorySyncStageChanged` events (Requested → Fetching → Stored → Ingesting → Completed/Failed), tagged with `connection_id = Some(source.id)`, so the UI can show live progress without polling. `status_list` degrades a per-source query failure to an `Idle` zero-row entry rather than failing the whole call.--**Composio auto-upsert.** When an OAuth connection is created, `memory_sync::composio::bus` calls `upsert_composio_source`, so freshly-connected integrations appear as sources with no restart. `list_rpc` also performs a lazy reconciliation (`reconcile::ensure_composio_sources`) on every list, catching connections made before this hook existed.--------The gate is **tag-discriminated and fail-open** for everything that is not a memory-source chunk. Every source-ingested chunk carries the `memory_sources` tag; the gate (`chunk_source_allowed`) only touches tagged chunks:--- A chunk **without** the `memory_sources` tag (working memory, conversation transcripts, internal chunks) **always passes**, even under an empty allowlist.-- A **tagged** memory-source chunk passes only if its source id is allowed. The id is matched against either the raw `source_id` (Composio / channel scopes like `slack:#eng`) or the registry id extracted from a `mem_src:<id>:<item>` composite (reader-based sources).--So tightening a profile's scope hides its connected sources without ever starving it of its own conversation context.-------## See also--- [Auto-fetch](auto-fetch.md): the 20-minute cadence that keeps active sources fresh.-- [Memory Trees](memory-tree.md): the pipeline every source feeds into.-- [Obsidian Wiki](README.md): the Markdown vault sources land in.-- [Integrations](../integrations/README.md): connecting the OAuth providers behind Composio sources.diff --git a/gitbooks/features/personalization.md b/gitbooks/features/personalization.mdindex 76672063a0..1aea3b7241 100644--- a/gitbooks/features/personalization.md+++ b/gitbooks/features/personalization.md@@ -26,7 +26,7 @@ Learning is organized into six **facet classes**. Each class has its own decay r| **Goal** | Active goals and ongoing projects | free-form goal sentences || **Channel** | Your preferred place to talk | `primary=desktop-chat` |-Recurring people, topics, and past threads are **not** stored here. Those live in the [memory tree](obsidian-wiki/memory-tree.md) and are pulled in per-turn by `memory_recall`.+Recurring people, topics, and past threads are **not** stored here. Those live in the [memory tree](memory.md) and are pulled in per-turn by `memory_recall`.---@@ -118,6 +118,6 @@ Everything learned is inspectable and reversible:## See also-- [Memory Tree](obsidian-wiki/memory-tree.md), where recurring people, topics, and threads live and are recalled per-turn.+- [Memory Tree](memory.md), where recurring people, topics, and threads live and are recalled per-turn.- [Goals & To-dos](goals-and-todos.md), the goal-tracking surface that pairs with learned `goal/*` facets.- [Cron & Scheduling](native-tools/cron.md), the scheduled runs that keep working your workspace between turns.diff --git a/gitbooks/features/platform.md b/gitbooks/features/platform.mdindex 430e7e2c05..2fd3198ee0 100644--- a/gitbooks/features/platform.md+++ b/gitbooks/features/platform.md@@ -96,7 +96,7 @@ The desktop app maintains a persistent connection to the OpenHuman backend. Resp## Offline behavior-Your local state persists on your device. Preferences, settings, and connected-source configurations remain available offline. The local Memory Tree is fully accessible, you can browse the [Obsidian vault](obsidian-wiki/) and read your existing notes without any network connection.+Your local state persists on your device. Preferences, settings, and connected-source configurations remain available offline. The local Memory Tree is fully accessible, you can browse the [Obsidian vault](memory.md) and read your existing notes without any network connection.Auto-fetch and live LLM calls require connectivity. When the network returns, the next 20-minute tick picks up where it left off.diff --git a/gitbooks/features/privacy-and-security.md b/gitbooks/features/privacy-and-security.mdindex 071299016c..7c3aea015c 100644--- a/gitbooks/features/privacy-and-security.md+++ b/gitbooks/features/privacy-and-security.md@@ -46,7 +46,7 @@ OpenHuman is designed so that the **memory of your life lives on your machine**.OpenHuman accesses an integration only after you complete its OAuth flow. Each connection has its own scope; you can revoke any of them at any time from the **Connections** page.-[Auto-fetch](obsidian-wiki/auto-fetch.md) does run continuously while a connection is active, that is the whole point. But it is bound by:+[Auto-fetch](memory.md) does run continuously while a connection is active, that is the whole point. But it is bound by:- The **OAuth scope** you granted that integration.- A **per-provider sync interval** (e.g. Gmail every 15 min by default).diff --git a/gitbooks/features/privacy-mode.md b/gitbooks/features/privacy-mode.mdindex 539289e1e5..8139ad476e 100644--- a/gitbooks/features/privacy-mode.md+++ b/gitbooks/features/privacy-mode.md@@ -48,7 +48,7 @@ Local-only mode is designed to work with [Local AI](model-routing/local-ai.md).- Chat and reasoning on a runtime you run (**Ollama, LM Studio, MLX, OMLX**, or another OpenAI-compatible server), with the models you pulled, added as a provider under **Connections → LLM**.- **Piper** text-to-speech, if you install the Piper binary and a voice yourself and set `PIPER_BIN`.-- Local embeddings for [Memory Tree](obsidian-wiki/memory-tree.md) retrieval, for example `embeddings_provider = "ollama:bge-m3"` after `ollama pull bge-m3`.+- Local embeddings for [Memory Tree](memory.md) retrieval, for example `embeddings_provider = "ollama:bge-m3"` after `ollama pull bge-m3`.With local-only on, a workload routed to a runtime that isn't running, or to a model you haven't pulled, fails instead of falling back to the cloud.diff --git a/gitbooks/features/token-compression.md b/gitbooks/features/token-compression.mdindex e12e8f58f5..381723d732 100644--- a/gitbooks/features/token-compression.md+++ b/gitbooks/features/token-compression.md@@ -165,12 +165,12 @@ Everything lives under the `[tokenjuice]` config block (`crates/openhuman-core/sAgents live or die by their context budget. A single working session can fan out across dozens of tool calls: greps, builds, test runs, `git` output, and large [web-fetch / scrape](native-tools/web-scraper.md) results the agent pulls down. TokenJuice sits on that tool-execution path and compacts each result before it lands in context, so an agent can sweep a noisy repo or a long web page without each step ballooning the window. The savings compound across a session and are metered in real dollars (see [Billing, Cost & Usage](billing-and-usage.md)).-> **Scope note.** TokenJuice runs on the agent's **tool results**, not on the background [auto-fetch](obsidian-wiki/auto-fetch.md) ingestion pipeline. The 20-minute sync that builds the [Memory Tree](obsidian-wiki/memory-tree.md) has its own canonicalization and chunking and does not route payloads through TokenJuice today.+> **Scope note.** TokenJuice runs on the agent's **tool results**, not on the background [auto-fetch](memory.md) ingestion pipeline. The 20-minute sync that builds the [Memory Tree](memory.md) has its own canonicalization and chunking and does not route payloads through TokenJuice today.---## See also- [Available Tools](native-tools/README.md): most heavy tool output flows through TokenJuice.-- [Memory Tree](obsidian-wiki/memory-tree.md): the downstream consumer of compressed output.+- [Memory Tree](memory.md): the downstream consumer of compressed output.- [Billing, Cost & Usage](billing-and-usage.md): where token savings show up as real money.diff --git a/gitbooks/guides/connect-obsidian.md b/gitbooks/guides/connect-obsidian.mddeleted file mode 100644index 610b6c55ef..0000000000--- a/gitbooks/guides/connect-obsidian.md+++ /dev/null@@ -1,80 +0,0 @@-----description: >-- Open OpenHuman's memory as an Obsidian vault so you can read, edit, and link- the agent's notes by hand, and have it pick up your edits.-icon: book-open------# Connect OpenHuman to Obsidian--**Goal:** browse and edit the assistant's memory as plain Markdown in [Obsidian](https://obsidian.md), and have your edits flow back into what the agent knows.--OpenHuman's memory isn't a black box: the same chunks the agent reasons over are written as `.md` files in an Obsidian-compatible vault inside your workspace. See [Memory](../features/obsidian-wiki/) for the full picture; this guide just gets you connected.-------## Prerequisites--- [Obsidian](https://obsidian.md) installed (free).-- OpenHuman set up with at least one source connected, so there's memory to look at. See [Create my personal AI assistant](personal-assistant.md).--## Privacy implications--- The vault is **local**. It lives in your workspace folder (`…/wiki/`) on your machine. Opening it in Obsidian doesn't upload anything.-- Obsidian reads local files directly; no OpenHuman account or backend is involved in browsing the vault.-- Anything you type into the vault becomes part of what the agent can read on its next ingest. Treat it like writing into the assistant's memory.-------## Steps--### 1. Open the vault from OpenHuman--Go to the **Memory** tab and click **View vault in Obsidian**. This opens your `…/wiki/` folder as a vault in Obsidian.--If you'd rather open it manually, point Obsidian at the `wiki/` folder inside your data folder:--| Platform | Vault path |-| ------------- | ---------------------------------- |-| macOS / Linux | `~/.openhuman/…/wiki/` |-| Windows | `%USERPROFILE%\.openhuman\…\wiki\` |--### 2. Explore the structure--Inside the vault you'll find auto-generated summaries organized by source, topic, and date, plus a place for your own free-form notes. Each summary file carries provenance in its frontmatter so you can trace a claim back to its source. See [Memory Tree](../features/obsidian-wiki/memory-tree.md).--### 3. Add your own notes and links--- Drop in your own Markdown notes.-- Build `[[wiki-links]]` between notes by hand.-- Correct or annotate anything the agent summarized.--### 4. Let the agent pick up your edits--Your changes are read on the next ingest, so you don't have to import anything. The agent will see notes you added and links you drew.-------## Success checks--- [ ] Obsidian opens the vault and shows OpenHuman's summary files.-- [ ] You can open a summary and see source/time provenance in its frontmatter.-- [ ] A note you add by hand is still there after OpenHuman runs (it isn't overwritten), and the agent can reference it in a later chat.--## Common failures--| Symptom | Cause | Fix |-| ------------------------------------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |-| Vault opens but is nearly empty | No sources ingested yet | Connect a source and wait an auto-fetch cycle (~20 min); see [personal assistant guide](personal-assistant.md) |-| "View vault in Obsidian" does nothing | Obsidian isn't installed, or the OS couldn't hand off the folder | Install Obsidian, then open the `wiki/` folder manually (paths above) |-| Your edits seem ignored | The next ingest hasn't run, or you edited inside an auto-managed summary block | Give it a cycle; put your own content in your own notes rather than inside generated blocks |--## Recovery--- The vault is just files. If Obsidian shows something odd, close it and reopen the folder. You can't break OpenHuman by browsing.-- If you deleted a note you wanted, the memory database still holds the underlying chunk; the summary can regenerate.--## See also--- [Memory](../features/obsidian-wiki/): how the vault is produced and organized.-- [Keep sensitive data private](privacy-sensitive-data.md): why the vault being local is the whole point.diff --git a/gitbooks/guides/personal-assistant.md b/gitbooks/guides/personal-assistant.mdindex 5dd1332890..d32d17a322 100644--- a/gitbooks/guides/personal-assistant.md+++ b/gitbooks/guides/personal-assistant.md@@ -49,7 +49,7 @@ If you're not sure, pick **Cloud**. You can change any of this later in **SettinAn assistant with no memory is just a chatbot. Connect at least one source so it has context to draw on:- Open **Settings** and connect an integration (Gmail is the common starting point). Each connection is a one-click OAuth approval.-- Once connected, [auto-fetch](../features/obsidian-wiki/auto-fetch.md) starts pulling data into your [Memory Tree](../features/obsidian-wiki/memory-tree.md) on a schedule (the first Gmail tick lands within about twenty minutes).+- Once connected, [auto-fetch](../features/memory.md) starts pulling data into your [Memory Tree](../features/memory.md) on a schedule (the first Gmail tick lands within about twenty minutes).### 4. Set your boundariesdiff --git a/gitbooks/overview/getting-started.md b/gitbooks/overview/getting-started.mdindex 9d8579cdbb..f5c18162a8 100644--- a/gitbooks/overview/getting-started.md+++ b/gitbooks/overview/getting-started.md@@ -65,7 +65,7 @@ OpenHuman picks the right model for each task automatically. See [Automatic Mode## 4. Open the Obsidian vault-The Memory tab has a **View vault in Obsidian** button. Click it to open `<workspace>/wiki/` in [Obsidian](https://obsidian.md). You can browse the agent's summaries, drop in your own notes, and even build manual links - the agent will pick up your edits on the next ingest. See [Obsidian-Style Memory](../features/obsidian-wiki/).+The Memory tab has a **View vault in Obsidian** button. Click it to open `<workspace>/wiki/` in [Obsidian](https://obsidian.md). You can browse the agent's summaries, drop in your own notes, and even build manual links - the agent will pick up your edits on the next ingest. See [Obsidian-Style Memory](../features/memory.md).---@@ -73,7 +73,7 @@ The Memory tab has a **View vault in Obsidian** button. Click it to open `<worksNow that the agent has memory and a model, the rest of the product is about giving it more surfaces:-- [**Auto-fetch from Integrations**](../features/obsidian-wiki/auto-fetch.md) - connect more sources from **Settings**; every twenty minutes the scheduler pulls fresh data into your tree.+- [**Auto-fetch from Integrations**](../features/memory.md) - connect more sources from **Settings**; every twenty minutes the scheduler pulls fresh data into your tree.- [**Native Voice**](../features/native-tools/voice.md) - push-to-talk dictation and TTS replies so you can talk to OpenHuman instead of typing.## Join the community