Skip to main content
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

This projection is read purely from the relational database β€” it does not require the graph backend or an LLM, so it works even when the graph database is unavailable. Set 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 accept scope_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 endpoint GET /api/v1/schema/provenance (query param include_memory) always scopes to the authenticated caller’s tenant (or user).

Full Example

A richer demo drives the production projection against representative records β€” so it runs without an LLM or a graph database β€” and writes a standalone HTML file to your home directory: The complete flow β€” remember data, render the provenance HTML, and read the raw projection is in the following code:

Graph Visualization

Render your knowledge graph to an interactive HTML file

Schema Inventory

Summarize the knowledge graph by semantic type