ContextFit
A token-native knowledge base for LLM agent memory that keeps storage, indexing, search and graph traversal entirely in discrete token-ID space, decoding text only at the final retrieval step, avoiding embedding APIs and vector databases altogether.
ContextFit retrieves memory for LLM agents without ever converting most of the pipeline into text or float embeddings: content is tokenized once, stored and indexed as integer token IDs, and only decoded back to text at the final step before the LLM sees it. Its authors report roughly half the storage of raw text, since tokens are not repeatedly re-tokenized, and integer-only operations throughout instead of float-based vector math.
The storage layer memory-maps token arrays with delta encoding and Zstd compression; the index layer combines an inverted index over token IDs using Roaring bitmaps, a suffix array for instant exact n-gram search, and BM25 scoring computed directly on token IDs; and a graph layer connects chunks by token n-gram overlap and Jaccard similarity, using MinHash and LSH for fast similarity without floats, with community detection for finding common themes across chunks. Retrieval tokenizes a query, searches these indexes, traverses the graph, and feeds the resulting token IDs directly to an LLM as input_ids.
Structure-aware ingestion understands Markdown headings, plain-text paragraphs, and a project-specific Tabular Markdown ledger format, preserving each format's own structural metadata during chunking.