Skip to main content
get_schema_inventory() summarizes your knowledge graph by semantic type instead of rendering every node. It returns deterministic per-type instance counts, a bounded set of representative sample names, and the relationship distribution between types β€” useful for understanding the shape of a graph at a glance or for driving custom dashboards. Before you start:
  • Complete Quickstart to understand basic operations
  • Have some remembered data or any existing knowledge graph

Code in Action

Each list entry is a dict describing one semantic type:

How types are resolved

Extracted entities are grouped under their resolved semantic type (the EntityType reached via the is_a edge) rather than the generic "Entity" label, and the internal EntityType taxonomy nodes are not surfaced as their own group. Passing a negative samples_per_type, or a sort value other than "count"/"none", raises ValueError.

Over HTTP

The same projection is available at GET /api/v1/schema/inventory (query params dataset_id, samples_per_type, sort). The endpoint is caller-scoped: it returns 403 when the caller is not authorized to read the dataset, and 409 if the inventory cannot be built.

Full Example

A runnable guide script ingests a handful of sentences about one domain with remember() β€” so several distinct types show up β€” and renders the graph with the schema side panel to an HTML file next to the script. It needs a working LLM_API_KEY: The complete flow β€” remember data, then summarize the graph by type is in the following example:

Graph Visualization

Render your knowledge graph to an interactive HTML file

Reading the Visualization

What the rendered file’s Schema tab shows, alongside its other views

Memory Provenance

Visualize the ownership and data-flow story behind your memory