memgraph_

Your newOS4 system drawn as a map of relationships instead of a tree of folders.

nodes 228 edges 321 newOS4 v4.6.26 system-wide 448 files · 45 modules · 28 skills · 49 agents updated 2026-10-17

01What is memgraph?

The memory graph (memgraph) is a live knowledge graph of your system itself. Every file, skill, module, task and agent becomes a node; every relationship between them — references, accesses, dependencies, co-use — becomes an edge carrying a type, a weight and timestamps.

Right now it holds 228 nodes and 321 edges, kept fresh by the MemoryGraphModule as you work. Nothing is hand-tagged: the map draws itself from ordinary activity, stored in the VFS at /.memory_graph/nodes.json and /.memory_graph/edges.json.

It already knows things like: your most-accessed file tonight is floatimg-buttons.html (16 accesses), with floating-ui.md trailing at 6, and that the recent tasks were “bake /memgraph-today.html”, “use agents” and “write the memgraph guide”. That little context block the AI sees at the top of every turn? It is read from this graph — it is shared memory between you and the machine.

One-line analogy: a folder tree tells you a thing's street address; the memory graph tells you its friendships. “Where is floating-ui.md?” is a folder question. “What is floating-ui.md used by, how often, and since when?” is a graph question.

02Why a graph?

Meaning over location.
Folders show paths; the graph shows relations. You find things by what they connect to, not by remembering where they were filed.
Use is visible.
Every access bumps a counter. Hotspots (floatimg-buttons.html ×16) pop out by node size and edge thickness; dead orphans sit as lonely islands.
Time is a dimension.
Nodes and edges carry created / last-used stamps — so the viewer can scrub back to any moment and replay history. You can literally watch your system grow.
Failures are marked.
Broken or failed items wear a red ✕. Dead references and failed jobs stand out immediately instead of hiding in logs.
It powers the AI.
The “Memory Graph Context” (recent tasks, most-accessed files) shown to the agent each turn comes straight from this graph. Ask the agent “what are my most used files?” — it answers from here.
Self-maintaining.
Edges grow as a side effect of doing work. No manual curation, no tagging chores — the map updates itself while you build.

03The data model

node { id, type, label, access_count, created | updated }
edge { source, target, type, weight, use_count, created | last_used }

storage   : /.memory_graph/nodes.json  ·  /.memory_graph/edges.json  (VFS)
loader    : MemoryGraphModule → VFS/localStorage → IndexedDB → embedded snapshot (fallback)

compact snapshot format (used when baking a standalone copy):
  n: [ id, type, label, accesses, created ]
  e: [ srcIdx, tgtIdx, type, weight, uses, born ]   // edges reference nodes by array index

Node types observed in your graph: file, skill, module, task — plus system/storage entities. An edge's type is the relationship kind; weight and use_count say how strong and how often.

04How to use it

The command

Run memgraph in the terminal (it's listed under Other in help). The module reports the graph's stats — node and edge counts, recency — and manages the data files under /.memory_graph/.

The visual viewers (HTML)

Both viewers are force-directed: nodes repel each other like magnets, and edges act as springs. Related things drift together and form clusters — so structure emerges from relationships, not from a layout anyone designed. A tight cluster is a working subsystem; look for the floating-UI cluster (floatimg-buttons.html + floating-ui.md + its skill) in your real map.

Reading the map

PatternMeaning
Hub node (many thick edges)A load-bearing component — many things depend on it
Large nodeFrequently accessed (count = size)
Thick edgeTwo things used together often (weight / use_count)
Island (no edges)Orphan — unused file/skill: prune it or revive it
Red ✕Failure marker — broken reference or failed item
Dense cyan bar on the scrubberA busy period in your system's history

05Viewer controls

ControlWhat it does
Drag a nodeRearrange it — the physics re-settles around your hand
Cyan time-scrubberSlide through history; density bars show activity per period; the graph rebuilds as of that moment
▶ ReplayAnimates your system's history forward in time
Click a nodeStats panel: type, access count, created, connections
PNG exportSaves the current map as an image

06Export & the bake — why downloaded copies break

Exported or previewed HTML runs in an opaque-origin sandbox: localStorage, IndexedDB and window.modules are all blocked. The 3-channel live loader dies instantly, and a plain copy shows “Embedded snapshot missing — re-export this file.”

The fix is to bake: embed the snapshot directly into the HTML — a const EMBED={n:[…],e:[…],ts:"…"} constant plus an embed() fallback at the end of the loader chain (edge indices remapped to real node ids). The file then renders anywhere, forever, with zero storage access.

That is exactly why memgraph.html (45 KB, baked) works when you double-click it, while the 21.5 KB memgraph-today.html still needs the newOS4 origin. Same code — the difference is the snapshot inside.
This guide follows the same lesson: fully self-contained — inline styles, inline demo, no CDN, no storage reads. It renders in the sandbox, in a download, anywhere. (And a good bake also hides the loading overlay once data lands, so the map doesn't sit behind “loading…” forever.)

07Try it — a miniature of the real thing

A tiny force-directed graph of tonight's actual cast (files, skills, modules, tasks — and one failed bake_out that got wiped by a filesystem flush, wearing its red ✕). Drag nodes around; watch the springs re-settle. Same physics as the real viewer.

file skill module task storage / system failure ✕

08Status tonight (2026-10-17)

FileSizeState
/memgraph.html45,049 bytesbaked ✓ — renders standalone
/memgraph-today.html21,545 bytesbake pending — needs newOS4 origin (or a bake)
/memgraph-guide.htmlthis pageself-contained ✓ — zero external deps

Live graph at time of writing: 228 nodes · 321 edges. Most-accessed: floatimg-buttons.html (16×), floating-ui.md (6×).