CocoIndex is a Python framework that turns codebases, documents, Slack, PDFs, video, and other sources into continuously updated context for AI agents and LLM apps, reprocessing only changed inputs.
Overview
CocoIndex is an incremental data framework aimed at long-horizon AI agents. It ingests sources such as codebases, meeting notes, inboxes, Slack, PDFs, and videos and keeps derived searchable data—including vectors, graphs, and tables—in sync with minimal full reprocessing.
Users declare what a target should contain in Python, and the engine keeps that target aligned by recomputing only the delta. A one-time run can backfill data; later runs re-embed or transform only changed files. Built-in or custom connectors cover code, files, databases, message queues, web APIs, and media.
The Rust core handles parallel chunking, memoization when inputs and function code are unchanged, logic tracking for code dependencies, source-to-target lineage, and concurrent processing within configured limits. Targets can include relational databases, warehouses, vector databases, graph databases, and message queues.
Example flows include real-time codebase indexing, meeting notes to knowledge graphs, and repository wikis generated with an LLM. Documentation describes using the framework with AI coding agents and compares its mental model to React for data engineering.
Key features
- Incremental delta-only reprocessing
- Declarative Python flow definitions
- Rust engine with parallel execution
- Memoization and logic dependency tracking
- Connectors for code, files, and queues
- Vector, graph, and table targets
- Source change and code change detection
- Examples for RAG and codebase indexing
Use cases
- Keeping agent context fresh across repos
- Incremental embedding pipelines
- Knowledge graphs from meeting notes
- Code search and review agent data
- Syncing documents into a vector database