Status: public, MIT-licensed, early-stage (v0.1.0). The library is inspectable and exercised by a Jest test suite with CI on Node 20/22, but it’s pre-1.0 with no stable release. It’s distributed as source on GitHub — there is no published npm package under this name (that name on the registry belongs to an unrelated author). The “What’s Needed To Tighten” section is the honest gap list.
InfiniteContext is a TypeScript memory layer that lets AI applications work past the context window — storing, organizing, and retrieving large amounts of information across storage tiers instead of cramming everything into one prompt. It ships as a Node library and a CLI (infinite-context), with OpenAI wired in for embeddings and summarization.
Three Hierarchies
The system layers at three distinct levels:
- Storage tiers — a
Memory Routerfronts pluggable providers (local disk today, Google Drive via the cloud provider, with a commonStorageProviderinterface for adding more), so hot and cold memory live where they belong. - Multi-level summarization — a
SummarizationEnginecompresses content into summaries at several levels of abstraction, so long histories can be served without replaying everything verbatim. - Hierarchical bucket organization — content is filed into a domain/topic bucket tree and retrieved through a
HierarchicalRetriever, with automatic categorization deciding where new content lands.
What’s Implemented Today
- Vector retrieval — exact flat index artifacts that persist and support rebuild / merge / split / save / load, plus an approximate HNSW backend (
hnswlib-node, with graceful flat fallback) that the hierarchical retriever switches to per-trace above a ~2,000-item threshold for sub-linear search at scale. A committed, key-free benchmark (docs/retrieval-benchmark.md) measures the HNSW backend against exact flat search: recall@10 = 0.995 at N=1,000 (≈1.3× p50 speedup), scaling to ~24× p50 speedup at 100k vectors — i.e. near-exact results at a fraction of the latency. - Hierarchical bucket store — domain→topic organization with a multi-strategy retriever, covered by tests.
- Automatic categorization — a
PromptCategorizerroutes content using keyword, vector-similarity, and adaptive strategies, with a category cache. - Multi-level summarization — OpenAI-driven summaries at configurable abstraction levels (real
chat.completionscalls), with a deterministic extractive fallback when no LLM client is configured. - Negation-aware retrieval — Widdows orthogonal negation, so “X but not Y” queries subtract the negated subspace (with a design note connecting it to compositional/DisCoCat meaning).
- Pluggable storage — local and Google Drive providers behind one interface.
- Robustness layer — transaction management with rollback, data-integrity verification, backup/recovery, and data portability (JSON / JSONL / CSV import-export).
Technical Stack
- Language: TypeScript (Node library +
infinite-contextCLI) - Vector index: exact flat (persisted artifacts) + approximate HNSW via
hnswlib-nodefor retrieval at scale (IVF reserved) - Embeddings / summarization: OpenAI (
text-embedding-3-smallby default) - Storage: local filesystem, Google Drive; SQLite / MongoDB / Redis client deps present for backends
- Tests / CI: Jest, GitHub Actions on Node 20 + 22
- License: MIT
- Docs: API, Architecture, Categorization, Compositional Meaning, Memory Monitoring, Extending, llamafile, macOS setup
What’s Needed For This Entry To Tighten
- A tagged stable release (it’s at v0.1.0). An install path already exists if wanted: the bare npm name
infinite-contextis taken by another author, but the package’s actual scoped name@ototao/infinite-contextis unpublished (free) — so shipping to npm is a choice, not a blocker. - A hosted demo or a recorded end-to-end run (ingest → store → retrieve) a visitor can verify without cloning.
- A labeled retrieval-quality eval. The committed benchmark above measures HNSW’s fidelity to exact search (approximation quality + speedup), not end-to-end answer quality against ground-truth relevance — that’s the next benchmark to add.
Verification
Full proof report → All claims, all projects →- Shipped
Exact flat vector store with persisted, rebuildable index artifacts (save/load/merge/split), plus an approximate HNSW backend for retrieval at scale
src/core/VectorStore.ts (persisted exact flat artifacts), src/utils/IndexManager.ts (flat + hnswlib-node HNSW, graceful flat fallback), src/core/HierarchicalRetriever.ts (per-trace HNSW ANN above a 2,000-item threshold); tests/core/VectorStore.test.ts
- Shipped
Hierarchical bucket memory with a multi-strategy retriever
src/core/{Bucket,MemoryManager,HierarchicalRetriever}.ts; tests/core/{Bucket,HierarchicalRetriever}.test.ts
- Shipped
Automatic prompt/output categorization with keyword, vector-similarity, and adaptive strategies
src/categorization/PromptCategorizer.ts + strategies/
- Shipped
Multi-level summarization via OpenAI embeddings/completions
src/summarization/SummarizationEngine.ts
- Shipped
Negation-aware retrieval (Widdows orthogonal negation)
src/core/NegationAwareRetrieval.ts; tests/core/NegationAwareRetrieval.test.ts
- Shipped
Pluggable storage tiers — local disk and Google Drive behind a common provider interface
src/providers/{StorageProvider,LocalStorageProvider,GoogleDriveProvider}.ts
- Shipped
Continuous integration on Node 20 and 22 (build + test)
.github/workflows CI; Jest suite under tests/
Repository README
We couldn't load this repository's README from GitHub right now. You can view it directly on GitHub instead.
View README on GitHubRelated work
-
in-development
Memory Mind Mesh — Living Memory for AI
AI memory that learns from feedback. Responses get more accurate and more concise the more they're used — instead of decaying as the model drifts. Hybrid static + adaptive store.
-
beta
SUM — Verifiable Bidirectional Knowledge Distillation
Cryptographic provenance for AI knowledge transforms. Every transform — render, extract, compose, slider — emits a signed receipt anyone can verify offline. Six-regime compliance validators (EU AI Act, GDPR, HIPAA, SOC 2, ISO 27001, PCI DSS) and a layered sum verify --explain output landed in v0.7.0; current release is v0.8.1. Same bytes verify identically in Python, Node, and modern browsers.
-
in-development
HFAO — Hugging Face Agent Observatory
Observe and debug AI agents in production. Trace every step an agent takes, evaluate outputs against expected behavior, and watch quality drift before users do. Open-source, standards-native (OpenTelemetry GenAI + OpenInference), MCP-queryable, Apache-2.0.