Continuously fresh context for AI agents

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

pip install -U cocoindex

Connect your sources and targets.

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

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 →

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.

flow.py · excerptRunnable quickstart →
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,
    ))
docs_flowillustrative update
sourcedocs/
  • intro.md
  • api.md Δ
  • guide.md
  • faq.md
  • install.md
  • config.md
  • notes.md
Δ api.md6 unchanged, served from cache
cocoindex engineprocess_file
  1. summarize
  2. embed
  3. declare_row
upsert 1 row
materialized viewpostgres · doc_rows
namesummaryembedding
intro.mdIntroduction to the API0.07 0.33 …
api.md ΔUpdated API reference0.12 −0.08 …
guide.mdUsage guide−0.22 0.05 …
faq.mdCommon questions0.31 −0.26 …

+ 3 rows unchanged

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 →

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.

  • 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.

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
claude · cocoindex
youIndex my /docs folder into Postgres.
claudewriting flow.py: chunk → embed → postgres target…
okflow.py written · running
logdocs/ → postgres.doc_chunks · in sync

What builders say.

Build your first pipeline.

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

Running at scale? CocoIndex Plus →