CocoIndex
An incremental data framework that keeps context stores for AI applications fresh by recomputing only changed data.
- Source repo
- cocoindex-io/cocoindex
- Stars
- ★ 12k
- Last updated
- 1d ago
- License
- Apache-2.0
- Primary language
- Rust
- FA score
- 61/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platform
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A developer team wants to load a local documentation directory into a PostgreSQL vector table and update the affected text chunks after documents change.
- Not a fit if
- Teams wanting a turnkey pipeline without supplying their own database and embedding service
- Teams expecting a CLI or container deploy instead of writing Python code
- Website
- cocoindex.io ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-10latest release v1.2.0 (2026-11-09)+8.0 ★/day over 7 days
- Source review
- 61/100 · Some gaps
What does this agent do, and when should you use it?
CocoIndex is a Python-declared incremental data-processing framework with a Rust core. It is positioned for keeping targets used by RAG, vector retrieval, knowledge graphs, and other AI applications synchronized with sources such as codebases, documents, and meeting notes. Developers define transformations with @coco.fn and execute updates through coco.App(...).update_blocking(); the supplied example reads local files, splits text, creates embeddings, and writes rows to PostgreSQL. A function marked memo=True is described as cached by input and code hash, supporting the repository's delta-only recomputation model. This is an embeddable Python library rather than a standalone conversational agent, and its example crosses the deployment boundary into an external PostgreSQL target while leaving the connection configuration and embedding implementation to the adopter.
The example enumerates a local directory with localfs.walk_dir(src).items(), then index_file reads each file through await file.read_text(). RecursiveSplitter().split(...) produces chunks, and table.declare_row(text=chunk.text, embedding=embed(chunk.text)) declares a text-and-embedding row for each chunk. main mounts a PostgreSQL target with postgres.mount_table_target(PG, table_name="docs"), declares a vector index with table.declare_vector_index(column="embedding"), and uses coco.mount_each(index_file, ..., table) to apply the transformation to every file. coco.App(coco.AppConfig(name="docs"), main, src="./docs").update_blocking() runs the update; the README states that subsequent runs re-embed changed files.
- A developer team wants to load a local documentation directory into a PostgreSQL vector table and update the affected text chunks after documents change.
- An engineer building code retrieval or coding-assistant context needs AST-aware splitting, embedding, and incremental indexing of a Git repository.
- A team operating a PDF question-answering system needs a repeatable RAG index that extracts, chunks, and writes PDF content to a vector store.
- A research or operations team wants to extract topics from Hacker News threads and comments, calculate weighted mentions, and store the results in PostgreSQL.
- A team processing meeting transcripts, Slack conversations, or podcasts needs to extract people, topics, decisions, and action items into a Neo4j or Kuzu graph.
- A data engineer needs to watch CSV files and publish changed rows as JSON messages to a Kafka topic.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pip install -U cocoindex
- Runtime
- Python 3.10
How do you install or deploy this agent?
The documented runtime is Python 3.10–3.13. Install with:
pip install -U cocoindexThe README does not provide a PG connection value or credential format, nor an implementation, model configuration, or key for embed. A complete database-backed first-run configuration therefore cannot be derived from the supplied material alone.
How do you use this agent?
The README's first execution entry point is:
coco.App(coco.AppConfig(name="docs"), main, src="./docs").update_blocking()In that example, main calls postgres.mount_table_target(PG, table_name="docs") and index_file calls embed(chunk.text). To run it successfully, the adopter must supply PG and embed; the provided material does not define either value, its credentials, or a complete runnable script. The shown input is ./docs and the output is a PostgreSQL target table named docs with a vector index on its embedding column.
What are this agent's strengths and limitations?
- Its incremental execution model is concrete: the README says repeated runs reprocess changed files, while @coco.fn(memo=True) caches by input and code hash.
- Python transformations can be expressed as async functions, and coco.mount_each maps a per-file function across source items without a separate DAG definition in the example.
- The example shows an end-to-end declarative path from local-file reads and text splitting to a PostgreSQL vector table and vector index.
- The README identifies several target patterns, including code indexing, PDF RAG, knowledge graphs, structured extraction, and CSV-to-Kafka flows.
- The minimal example is incomplete: neither the PG connection configuration nor the embed function is defined, so it cannot run unchanged as a first deployment.
- Real deployments commonly need external systems; the shown path uses PostgreSQL, while other described examples involve Neo4j, Kuzu, Kafka, or model services.
- The README claims retries, backoff, dead-letter queues, and no-data-loss behavior for the Rust core, but does not show their configuration interfaces or operating procedures.
- No CLI deployment flow, container configuration, or production credential-management instructions are provided, so teams must establish their own execution, scheduling, and secret-management approach.
How does this agent compare with similar options?
Compared with periodically rerunning a full batch data pipeline, CocoIndex is positioned to recompute only data and outputs affected by changes in source data or transformation code.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| CocoIndex This agent | 61 · Some gaps | Library / SDKFree + model costs | ★ 12k | 1d ago | Rust | — |
| Telegram Search | 66 · Some gaps | Self-hosted serviceFree + model costs | ★ 4.1k | 1d ago | TypeScript | — |
| M-flow Cognitive Memory Engine | 57 · Major gaps | CLIFree + model costs | ★ 4.5k | 3mo ago | Python | OpenAI API · Claude API |
| Mnemosyne | 71 · Some gaps | CLIFree | ★ 3.6k | 1d ago | Python | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The CLI offers confirmation for updates, a force option to skip it, preview mode, and confirmation options for drop; db-only limits one drop operation. Rust CLI documentation says Google Drive OAuth tokens are stored readable only by the current user and can be revoked. Target synchronization and cleanup when component paths disappear make some data flows and external effects visible. Deductions: general permission boundaries, sensitive-data handling across connectors, and rollback coverage are incomplete; the dependency list has no security audit evidence in the packet; attribution is limited to the CocoIndex name and email, while publisher identity remains unknown.
Code and documentation both describe incremental processing, target states, and component paths, but the README advertises Python 3.10–3.13 while pyproject requires >=3.11 and lists 3.14. The project declares lower bounds for core dependencies and optional connector dependencies, but the supplied material does not establish their availability or security status. CLI parameter errors carry context, exceptions propagate, and Ctrl+C cancellation is handled. Deduction: evidence for recovery behavior and its coverage is limited.
The README, skill, and examples cover documents, code, databases, vector indexes, knowledge graphs, LLM extraction, and streaming, with Python engineers as the stated audience. The skill describes common task triggers and core APIs. Deduction: despite broad claims, the boundary between this framework and an autonomous agent, scenario-specific fit, and concrete runtime constraints are not fully defined in the supplied material.
Repository guidance maps Rust, Python, CLI, connectors, tests, and documentation; the skill provides initialization, dependency, and run instructions, while the README points to examples and docs. A complete Apache-2.0 LICENSE is present, and the project explains that release workflows set published versions. Deductions: Python support ranges conflict between README and package metadata; the supplied files provide little FAQ, limitation, or formal maintenance-responsibility information; the sample is insufficient to establish the completeness of examples and docs.
The materials show declarative target states, incremental recomputation, function memoization, multiple target stores, and CLI inspection and preview features, which suit pipelines that keep indexes or derived data current. Deductions: README claims about compute savings, cost, and production reliability are promotional and are not substantiated by results or independent evidence in the supplied material; integration costs are also not described.
Core concepts are described across AGENTS.md, the skill, API code, and CLI options; the CI workflow specifies build/test and type-check jobs. Deductions: the packet contains no executed results, the README makes strong freshness, cost, and reliability claims, and its Python support range conflicts with package metadata. The distinction between claims and demonstrated facts is therefore incomplete.
- The README and pyproject.toml disagree on supported Python versions; confirm the target version against the relevant release documentation before adoption.
- The project provides an incremental data-pipeline framework and context indexing for agents; the supplied evidence does not establish that it is itself an autonomous agent.
- Update or drop can change external target state, and component-path changes can trigger target-state cleanup; review targets and cleanup scope before deployment.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
What's Changed Discord source connector cocoindex.connectors.discord indexes the messages and threads of Discord text, announcement and forum channels, using the token of a bot you create and invite to your server (pip install cocoindex[discord]): DiscordChannel(app=DiscordApp(token=...), channel_id=...). * DiscordChannel.items() yields one DiscordMessage per message in the channel and one DiscordThread per thread, active or archived, including forum posts. Both have read_text() for embedding …View on GitHub ↗ -
Release notes excerpt
What's Changed * fix(engine): a live component that calls operator.update() before any update_full() no longer loses what it mounted on its first run. Its existence row was only written at its parent's commit, so the first child's eager existence write filed it as a directory node, and the parent's commit then tombstoned every child mounted so far. Watch-only feeds (Kafka, Iggy, any LiveMapFeed with only watch()) hit this on a first run against a backlog; later runs were unaffected. Items a first run lost come back when the source delivers them again by @georgeh0 in https://github. …View on GitHub ↗ -
Release notes excerpt
What's Changed Connector key fixes: no more collisions or lost writes Every source item and target state has a key. CocoIndex uses the key to match an object with its previous run, and to decide what to create, update or delete. Prompted by the Google Drive fix in #2485, this release audits how every Python connector builds its keys. It fixes each case where the connector gave two different objects one key, or where a key that changed for the same object made CocoIndex delete that object. Two keys you choose can also reach one object, such as overlapping directories or two `ContextKey …View on GitHub ↗
FAQ
Is this a standalone conversational AI agent?
What is needed for an initial run?
Does every update rebuild the whole index?
Can it target systems other than PostgreSQL?
Is CocoIndex free?
Is CocoIndex open source?
Is CocoIndex safe to use?
Is CocoIndex still maintained?
Who makes CocoIndex?
What is CocoIndex's official website?
Thanks — we use this to improve the page.