It requires Zig 0.16 or later and links the engine’s shared library, built by CMake. It exposes dense indexes; sequence, matrix and geospatial indexes follow as the C library ships them.
Topics
| Installation | |
|---|---|
| Quickstart | An index owns entries; an Executor owns the threads or streams a verb runs on; an Arena holds every output whose length scales with the call. |
| Executors20 | One executor serves any number of indexes, and its kind must match the residency their handles were built for. |
| Keys6 | A key is 128 bits of opaque identity, and integer identities park in the low eight bytes, so a UUID rendering and an integer identity sort alike. |
| Inputs and Outputs33 | Every output whose length only the call knows, such as matches, rows, products, monoliths and cursor or stream batches, lands in an Arena you pass, and the verb answers a view over it without copying. |
| Metrics42 | |
| Residency5 | Where the payload lives is the constructor's name, as in the C lifecycle verbs, so a residency an index lacks has no constructor to call. |
| Serialization17 | The path extension picks the layout: a .safegraphs path is one monolith, and a .safegraphs.json path is a manifest cataloging many. |
| Filtered Search6 | A Predicate in the search config admits only the keys it approves, and non-matching entries still route the traversal, so recall does not collapse at low selectivity. |
| Refinement7 | refine re-selects the neighbors of every stored entry against the finished graph and returns a DenseRefineReport: the entries re-selected and changed, the islands found and reconnected, and the closing audit. |
| Linear Algebra15 | Three verbs, multiply, maxsim and attend, treat the index as a sparse operand rather than as a kNN store, each folding its arithmetic into the graph walk instead of materializing a match list. |
| Retrieval and Streaming22 | get lands every vector stored under a key in the arena, one packed row per entry in insertion order, as the scalar you name; an absent key yields no rows. |
| Introspection8 | health audits how much of the graph a search reaches from its landmarks; entries it misses stay unfound until a refine re-links them. |
| Errors8 | Every verb answers Error!T, one error per final status of the C interface. |
| Platform Notes |