Guides¶
KGLite has a set of how-to guides. Most projects only need three.
Start here (the load-bearing path)¶
Every project that loads its own data and queries it goes through these three, in this order:
Shape DataFrames, bulk-load with |
|
Build directly from JSON/dicts with |
|
The query surface — MATCH/WHERE/RETURN, aggregations, subqueries, mutations. Every other guide leans on this one. |
|
Ship the graph to Claude / Cursor / any MCP-capable agent. The bundled |
|
Teach agents how and when to use each tool with bundled/operator skills — methodology that injects into tool descriptions, gated per-graph. Use this instead of hand-rolling |
Add as needed¶
Domain-specific surfaces — pull them in when your data has the shape:
Guide |
Read this if… |
|---|---|
…the graph is long-lived state your app reopens across runs. |
|
…the authoritative copy of your data lives elsewhere — a warehouse, an API, a directory — and the graph is a rebuildable projection you query. Rebuild-and-swap, incremental refresh, carrying embeddings across a rebuild. |
|
…the graph is the authoritative copy. What holds (statement atomicity, WAL crash safety, snapshot isolation), what is opt-in, and the limits stated plainly. |
|
…your “data” is a markdown knowledge base — an OKF bundle, a Claude memory dir, a skills folder, an Obsidian vault. Frontmatter → nodes, links → typed edges. |
|
…your nodes have coordinates. R-tree indexing, distance-based filters, GeoJSON I/O. |
|
…property values change over time. Snapshot history, valid_at / valid_during temporal filters. |
|
…you want fuzzy / meaning-based lookup. |
|
…you want keyword search, or keyword and meaning in one ranking. BM25 via |
|
…you need PageRank, community detection, shortest paths, centrality. |
|
…your graph has parent-child / ancestor structure. |
|
…your type names have a “kind of” structure ( |
|
…properties carry tables or nested records. DataFrame table properties with fidelity, declared |
Power-user / less common¶
Guide |
When |
|---|---|
The fluent-API alternative to Cypher ( |
|
Declarative graph schemas — nodes/edges defined once in a CSV-driven config. Best for repeated builds of the same shape. |
|
Round-trip with Neo4j, JSON, N-Triples; CSV bulk export; SQLite export as the no-lock-in exit. |
|
Your graph is long-lived state whose shape changes over time. The user-schema version stamp, ordered Cypher migration scripts + |
|
|
|
Short snippets for “how do I do X” patterns that span multiple guides. |
If you want to know why¶
Background reading — not required, but the design decisions explain why APIs look the way they do:
Core Concepts — storage modes (memory / mapped / disk), return types, the fluent / Cypher split.
Architecture — Rust core + PyO3 bindings + petgraph, where each subsystem lives.
Design decisions — the label model, columnar storage, Cypher subset choices.