-
Notifications
You must be signed in to change notification settings - Fork 0
The graph
Records do not have to stay loose notes. dm-lite keeps a lightweight graph over them, so related memory travels together at recall time and you can walk from a record to its neighbours.
Every record has a daimon:// uri (recall and dmem recent print it). Connect two records with a typed edge:
dmem link <from-uri> <to-uri> --rel depends_on # the default rel is "links"
dmem links <uri> # the edges touching a record, both directions
dmem neighbors <uri> --depth 2 # records reachable within N hops
dmem unlink <from-uri> <to-uri> --rel depends_on # remove an edgeYou can also link by reference: write [[Exact Title]] inside a record body, then run dmem reindex_links to materialise an edge to the record whose title matches. The per-turn recall in your wired agents expands along these edges automatically, pulling a hit's neighbours in with it, so a single recall returns a small connected neighbourhood rather than one isolated note.
Mint the recurring nouns in your domain (an org, a product, a person, a site) as typed graph nodes, then relate them:
dmem entity --kind org --name "ACME" --attr sector=public --attr role=client
dmem entity --kind product --name "Widget"
dmem link daimon://resources/entities/org/acme daimon://resources/entities/product/widget --rel usesEntity kinds are org, engagement, product, solution_stack, person, framework, and site. Attributes are free-form key=value pairs, repeat --attr for several.
Curated edges (dmem link, [[Exact Title]] via reindex_links) stay the high-trust graph. A second, retractable pass mines weaker edges:
dmem reindex_mentions # write record -[mentions]-> entity edges
dmem reindex_mentions --dry-run # count only
# server: POST /reindex_mentions {"dry_run": false}Wherever a record's title or body mentions a canonical entity title in plain text (word boundary, exact case), dm-lite links record -[mentions]-> entity. Rel is mentions, distinct from curated links, so expansion can weight curated edges above mined ones and you can wipe or re-run the pass without touching hand-made edges.
Aliases are title-derived only (parenthetical strip, / variants). Richer aliases stay entity curation. Re-running is idempotent: existing mentions edges are not duplicated.
dmem ui --open # default 127.0.0.1:8088, also opens your browser
dmem ui --addr 127.0.0.1:9000dmem ui serves a small embedded viewer of the graph. It is offline and reads your local store, so nothing leaves your machine.