visualize_memory_provenance() renders the ownership and data-flow story behind your memory — Tenant → User → Agent → Dataset → file, plus agent read/write access and agent-written sessions — to a self-contained HTML file.
Before you start:
- Complete Quickstart to understand basic operations
- Have some ingested data (the projection reads the relational database, so no graph backend is required)
Code in Action
include_memory=True to also fold in the extracted entities/relationships (from the relational nodes/edges tables) and link them back to the files they were extracted from.
Raw graph data
If you only need the projected graph data (in the same(nodes, edges) shape the renderer consumes) rather than HTML, call get_memory_provenance_graph():
Scoping in multi-tenant deployments
Both functions acceptscope_tenant_ids and scope_user_ids to restrict the projection to a tenant or user. In multi-tenant deployments you must pass a scope — an unscoped read returns every tenant’s actors, datasets, and files. When neither scope is given the read is global, which is the intended behavior only for single-user / OSS installs where one user owns everything.
Over HTTP
The HTTP endpointGET /api/v1/schema/provenance (query param include_memory) always scopes to the authenticated caller’s tenant (or user).
Full Example
A richer guide script ingests two documents into two datasets, then walks the ownership chain down to thementions edges that tie each memory node back to the file it came from, prints it as a tree, and renders the same projection to a standalone HTML file:
examples/guides/memory_provenance.py→.artifacts/memory_provenance.html
Memory provenance
Memory provenance
Graph Visualization
Render your knowledge graph to an interactive HTML file
Schema Inventory
Summarize the knowledge graph by semantic type