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.
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- repo/
- api.ts Δ
- #eng
- notes.md
- PR #482
› fix getUser null check
reads view · 4 call sites
› opens PR #483
Connect your sources and targets.
Use a built-in connector or write a custom integration in Python. Declare the data your target should hold.
- Codebases
- Meeting notes
- Web APIs
- Files and object storage
- Databases
- Message queues
- Images and video
- Audio and transcripts
@coco.fn(memo=True)
def index(doc, target):
row = to_row(split(doc))
target.declare_row(row=row)- Relational DB
- Data warehouse
- Vector DB
- Graph DB
- Message queue
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.
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,
))- intro.md
- api.md Δ
- guide.md
- faq.md
- install.md
- config.md
- notes.md
- summarize
- embed
- declare_row
| name | summary | embedding |
|---|---|---|
| intro.md | Introduction to the API | 0.07 0.33 … |
| api.md Δ | Updated API reference | 0.12 −0.08 … |
| guide.md | Usage guide | −0.22 0.05 … |
| faq.md | Common questions | 0.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.
- src/
- flow.pyΔ
- pipeline.py
- embed.py
- api/
- route.ts
- tests/
- t_embed.py
› where is embed() called?
3 callers · fresh index
src/flow.py:42
src/pipeline.py:18
tests/t_embed.py:7
›
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
Keep an index of your repo in sync with every commit. Give code-review and coding agents structured code context.
Meeting notes → knowledge graph
Extract people, topics, decisions and action items from notes into a live graph. Query them with your agent.
Automatic repository wiki
Use a large language model to summarize each repository and build an organization overview. Rerun to process changes.
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 skillWhat 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 →