That inversion is what keeps the graph coherent: a required field with a relationship means the AI creates both the node and its edge every time, and an enum means it picks from your list rather than inventing a race. Worth knowing before you build on it: conflicting information is last-write-wins, so track sources in metadata or split disputed facts into separate nodes.
A local knowledge graph server aimed at text-based RPGs and interactive storytelling, where the tools an AI gets are generated from schemas you write.
- Nodes with a name, a nodeType you define, and metadata strings describing them
- Edges between nodes with an edgeType such as owns or located_in, and an optional weight from 0 to 1
- Tools generated from each schema: add, update and delete per entity type, so an npc schema yields add_npc, update_npc and delete_npc
- Schema features that steer the model — required fields, enum choices, and relationship definitions that make it create the edge along with the node
- 11 pre-built schemas for text-based RPGs, ready to start from
- Error feedback returned to the AI, so it can correct a malformed write
- A SchemaManager page for editing schemas visually, and a Memory Viewer for exploring the graph as a node-link diagram, table or raw JSON
Node.js 18 or higher and npm. Clone, npm install, npm run build, then point your client at dist/index.js. Schema files ending in .schema.json go in dist/data/schemas and are picked up at startup; a schema's name must start with add_ to be recognised. Data lives in dist/data/memory.json, and MEMORY_FILE and SCHEMAS_DIR can move both.
One command — npx -y memorymesh
