The viewer
A small read-only web dashboard for looking at what your agent actually remembers.
$ kgl-memory-viewer --root memory/graph --port 8420Open http://127.0.0.1:8420/. The viewer is its own process using the same code path as the MCP tools to read the same files, so it shows exactly what an agent sees. You can run it with or without the MCP server, or point several viewers at several graphs.
What's in it
- Overview. Node and edge counts, unresolved-link and lint-warning counts, which search backend is active, and whether auto-extract is on.
- Graph view. The whole graph on a pan-and-zoom canvas with a force-directed layout, coloured and sized by type and connection count. Click a node to see its fields, tags, body and clickable incoming and outgoing links. Filter by type in the legend.
- By type. One row per entity with real columns from the schema.
- Recent activity. Messages, facts, preferences and reasoning merged into one feed, newest first.
- Sessions. Every session with a message count and a full transcript.
- Search. The same hybrid search the tools use, showing which embedder answered.
- Entity pages. Fields, body and both directions of relationships, cross-linked.
- Lint. The same structural warnings the overview counts, with file, node and message.
- AI activity log. Recent
search_memories,get_contextandquery_graphcalls the graph has served. This is for answering the question "did the agent even search before it wrote that?" - Raw file view. The literal
.kglsource for any node. Paths are validated against the graph root.
Safe by construction
The viewer uses only the Python standard library's HTTP server, never imports the writer and never takes the write lock. There is no write path in the module at all. It binds to localhost by default.