---
title: "CocoIndex — incremental data framework for AI agents"
description: "Open-source Python framework for incremental indexing. Keep code, documents, and other data current for AI agents by reprocessing changed inputs."
canonical: https://cocoindex.io/
last_updated: 2026-11-05
---

# Continuously fresh context for AI agents

> Open-source Python framework for incremental indexing. Keep code, documents, and other data current for AI agents by reprocessing changed inputs.

Last updated: 2026-11-05 · Canonical: https://cocoindex.io/

An open-source Python framework that keeps code, documents, and meeting notes ready for your agents. Reprocess only what changes.

[Try a change](https://cocoindex.io/react-cocoindex/#playground)
[Star on GitHub](https://github.com/cocoindex-io/cocoindex)

```sh
pip install -U cocoindex
```

Figure: The agent data loop: sources such as code, pull requests, logs and messages change; only the delta syncs into a view of vectors, graphs and tables that CocoIndex keeps fresh; the agent reads the view, decides and writes; what the agent writes becomes the next run's source.

## Connect your sources and targets.

Use a built-in connector or write a custom integration in Python. Declare the data your target should hold.

[All connectors →](https://cocoindex.io/docs/connectors/)

Figure: Sources such as codebases, meeting notes, web APIs, file systems, databases, message queues, images and voice flow into a Python CocoIndex flow; unchanged sources are cache hits, a changed file re-runs split, and only the affected vectors are re-embedded; targets such as relational databases, warehouses, vector and graph databases, message queues and feature stores stay in sync.

### The engine handles the update work

- **Memoization**: Reuse results when inputs and function code stay unchanged.
- **Logic tracking**: The engine tracks code dependencies to identify affected work.
- **Source tracking**: Processing components connect source items to their declared target state.
- **Parallel processing**: Independent work runs concurrently within configured limits.

[Compare Open Source and Plus capabilities and availability →](https://cocoindex.io/enterprise/#compare)

## Write the transform. The engine keeps it fresh.

In this example, one file changes. Cached results skip six unchanged files, and the engine updates one Postgres row.

[See the React ↔ CocoIndex mental model →](https://cocoindex.io/react-cocoindex/)

flow.py · excerpt
[Runnable quickstart →](https://cocoindex.io/docs/getting_started/quickstart/)

```python
import cocoindex as coco
from cocoindex.connectors import postgres

@coco.fn.as_async(batching=True)
async def embed(texts: list[str]) -> list[list[float]]: ...

@coco.fn(memo=True)
async def process_file(
    file: FileLike,
    target: postgres.TableTarget[DocRow],
):
    summary = await summarize(file)
    vector = await embed(summary)
    target.declare_row(row=DocRow(
        name=file.name,
        summary=summary,
        embedding=vector,
    ))
```

Figure: Source to engine to materialized view: of seven docs, only api.md changed; the engine re-runs process_file for that file alone while six are served from cache, and upserts one row in the Postgres table

**Source changes.** Update changed items and remove target rows when their sources disappear.

**Code changes.** Re-run affected work when function logic changes. [How change detection works →](https://cocoindex.io/docs/programming_guide/function/)

## Find code and trace what a change affects.

CocoIndex Code Plus is the licensed code search service built on CocoIndex Plus. Search code and follow symbol references across your indexed repositories.

[See CocoIndex Code →](https://cocoindex.io/cocoindex-code/)

Figure: CocoIndex Code: flow.py changed in the repo; tree-sitter parses it into an AST, only the changed function's chunk is re-embedded and four chunks are reused; a coding agent asks where embed() is called and gets three callers from the fresh index.

### Complete functions

Syntax-aware chunks keep functions and classes together in search results.

### Search by meaning

Find code by its purpose, then inspect exact text and symbols.

### Trace callers

Find the callers of a changed function across indexed repositories.

Built for coding, code-review and security-review agents.

## Built with CocoIndex.

Clone an example and configure its source. Each example includes a flow and setup instructions.

### [Real-time codebase indexing](https://github.com/cocoindex-io/realtime-codebase-indexing)

Figure: Pipeline: git repo, then tree-sitter AST, then pgvector

Keep an index of your repo in sync with every commit. Give code-review and coding agents structured code context.

### [Meeting notes → knowledge graph](https://github.com/cocoindex-io/meeting-notes-knowledge-graph)

Figure: Pipeline: meeting notes, then LLM extract, then graph

Extract people, topics, decisions and action items from notes into a live graph. Query them with your agent.

### [Automatic repository wiki](https://github.com/cocoindex-io/cocoindex/tree/main/examples/multi_codebase_summarization)

Figure: Pipeline: git repos, then LLM summarize, then org wiki

Use a large language model to summarize each repository and build an organization overview. Rerun to process changes.

[See all examples →](https://cocoindex.io/docs/examples/)

## Describe the flow. Claude writes the pipeline.

Describe your sources, transformations and targets. Use the CocoIndex skill to help Claude write the flow.

[Try the Claude skill](https://github.com/cocoindex-io/cocoindex-claude)

Example session: the user asks Claude to index a /docs folder into Postgres. Claude writes flow.py with chunk, embed and Postgres target steps, then runs it. The log shows docs/ in sync with postgres.doc_chunks.

## What builders say.

> At Unity, we use CocoIndex to incrementally index critical unstructured assets. With it, we've managed to dramatically reduce unnecessary data processing computation and remote LLM embedding calls.
>
> CocoIndex is our **“Kubernetes moment”** – it empowers us to index and operate data with exceptional efficiency, keeping everything always current and context-ready for AI.

**Wenlan Yang**, Staff Engineer, Unity

> I'm in love with CocoIndex. ❤️ It's a very mature project — with incredible optimizations like incremental processing, parallel chunking, and maximum efficiency built right in. These are hard to design and maintain, yet they just work out of the box.
>
> I'm inspired to learn Rust because I want to contribute to CocoIndex and Zed. Both represent the best of engineering excellence and community spirit.
>
> And honestly — CocoIndex has one of the most responsible, thoughtful communities I've seen.

**Shivansh Subramanian**, Startup Founder

> Cocoindex makes the need of so many event driven services (like Azure Functions, Event Grids, Service Bus) relevant when your main goal is to ensure data remains fresh and is always indexed incrementally.
>
> The docs are solid and the support from the team impeccable. Moreover if you need a lens to peek inside the inner workings, CocoInsight is another offering which gives a transparent view to show the flow of data.

**Ansuman Satapathy**, Principal Software Engineer, Deloitte

> One of the core ideas behind DeepVista.ai is context modeling, which requires a continuous index pipeline for unstructured data. After extensive research, I found CocoIndex to be the best solution. It propagates change from source to knowledge base on my custom processing logic seamlessly, saving me huge amounts of time.
>
> The product is outstanding, the support is world-class, and I am super excited to keep building with them as they evolve!

**Jing Conan Wang**, CEO, DeepVista

## Build your first pipeline.

Start with one source and one target. The quickstart walks through it end to end.

[Open the quickstart](https://cocoindex.io/docs/getting_started/quickstart/)
[Star on GitHub](https://github.com/cocoindex-io/cocoindex)

Running at scale? [CocoIndex Plus →](https://cocoindex.io/enterprise/)

## Sitemap

- [Home](https://cocoindex.io/index.md)
- [Documentation](https://cocoindex.io/docs/)
- [Blog index](https://cocoindex.io/blogs.md)
- [Site index (llms.txt)](https://cocoindex.io/llms.txt)
- [Markdown sitemap](https://cocoindex.io/sitemap.md)
- [XML sitemap](https://cocoindex.io/sitemap.xml)
