cocoindex-io/cocoindex
Incremental engine for long horizon agents 🌟 Star if you like it!
What it solves
CocoIndex 解决了 AI 代理和 LLM 应用中数据陈旧的问题。传统的批处理管道常会导致“上下文缺口”,使代理在过时信息上进行推理。CocoIndex 提供了一种方式,仅重新处理变更(增量),而不是整个数据集,从而持续维护企业数据(代码库、Slack、会议记录、PDF 等)的实时新鲜索引。
How it works
它作为一个声明式、Python 原生的增量索引框架运行。用户定义一个转换函数 (F) 将源映射到目标状态。引擎追踪每行的来源信息,并使用 Rust 为核心来管理实时缓存、版本追踪和数据血缘。当源文件被编辑或转换代码本身被修改时,引擎会精确识别需要更新的目标部分,确保亚秒级的新鲜度,并降低计算和嵌入成本。
Who it’s for
它面向需要在大规模企业数据源上保持始终新鲜上下文的工程师,这些工程师正在构建生产级的 AI 代理和 RAG(检索增强生成)管道。
Highlights
- Incremental Processing: Only the delta ($Δ$) is reprocessed on every change, significantly reducing LLM and embedding costs.
- Sub-second Freshness: Source changes propagate to the target index almost instantly.
- End-to-End Lineage: Every target vector or row traces back to its exact source byte for auditing and debugging.
- Production-Ready Core: Built with a Rust core featuring retries, exponential back-off, and dead-letter queues to guarantee no data loss.
- Broad Connectivity: Supports various sources (Codebases, APIs, Databases, Message Queues) and targets (Vector DBs, Graph DBs, Relational DBs).