OpenSource-Hub

cocoindex

框架

cocoindex-io/cocoindex

长周期AI代理增量引擎,实时上下文更新。

项目简介

CocoIndex 让AI代理从代码库、会议记录、Slack、PDF和视频中获取持续更新的数据。仅处理增量变化,开销最小。适用于生产级别的RAG和知识图谱应用。

README 预览

\n  \n    \n    \n    \n  \n\nYour agents deserve fresh context.\n\n\n  Star us ❤️ →   · \n    · \n    · \n  \n\n\n\nCocoIndex turns codebases, meeting notes, inboxes, Slack, PDFs, and videos into live, continuously fresh context for your AI agents and LLM apps to reason over effectively — with minimal incremental processing.  Get your production AI agent ready in 10 minutes with reliable, continuously fresh data — no stale batches, no context gap\n\n\n  Incremental · only the delta  ·  Any scale · parallel by default  ·  Declarative · Python, 5 min\n\n\n\n\n\n[](https://github.com/cocoindex-io/cocoindex)\n[](https://pepy.tech/projects/cocoindex)\n[](https://pypi.org/project/cocoindex/)\n[](https://www.python.org/)\n[](https://www.rust-lang.org/)\n[](https://opensource.org/licenses/Apache-2.0)\n[](https://discord.com/invite/zpA9S2DR7s)\n\n[](https://github.com/cocoindex-io/cocoindex/actions/workflows/CI.yml)\n[](https://github.com/cocoindex-io/cocoindex/actions/workflows/release.yml)\n[](https://github.com/cocoindex-io/cocoindex/actions/workflows/links.yml)\n\n\n\n\n\n\n\n\n\n[Deutsch](https://readme-i18n.com/cocoindex-io/cocoindex?lang=de) |\n[English](https://readme-i18n.com/cocoindex-io/cocoindex?lang=en) |\n[Español](https://readme-i18n.com/cocoindex-io/cocoindex?lang=es) |\n[français](https://readme-i18n.com/cocoindex-io/cocoindex?lang=fr) |\n[日本語](https://readme-i18n.com/cocoindex-io/cocoindex?lang=ja) |\n[한국어](https://readme-i18n.com/cocoindex-io/cocoindex?lang=ko) |\n[Português](https://readme-i18n.com/cocoindex-io/cocoindex?lang=pt) |\n[Русский](https://readme-i18n.com/cocoindex-io/cocoindex?lang=ru) |\n[中文](https://readme-i18n.com/cocoindex-io/cocoindex?lang=zh)\n\n\n\n\n\n\nBuilt with CocoIndex ❤️\n\n\n\n  \n\n\nSee all 20+ examples · updated every week →\n\n\n\nGet started\n\n```sh\npip install -U cocoindex\n```\n\nDeclare *what* should be in your target — CocoIndex keeps it in sync forever

常见问题 (2)

故障排除
为什么在 cocoindex 中增量重新索引会失败,并出现错误 'Forbidden global during unpickling: numpy.core.numeric._frombuffer'?

这是cocoindex 1.0.6在使用numpy 1.x(例如在Intel Mac上)时的已知bug。serde白名单仅注册了numpy 2.x的_frombuffer路径。修复方法:更新python/cocoindex/_internal/serde.py,将_frombuffer同时注册到('numpy.core.numeric', '_frombuffer')('numpy._core.numeric', '_frombuffer')下。具体补丁请参见issue #2011,或应用PR #2012。

来源 Issue #2011
操作指南
如何在CocoIndex中排除除了.github/workflows之外的所有隐藏目录?

将每个隐藏目录显式列出在 excluded_patterns 中。这是当前在支持否定语法(例如 !)之前的权宜之计。示例:excluded_patterns=["**/.git","**/.vscode","**/.idea","**/.ruff_cache","**/.pytest_cache","...添加所有其他已知的隐藏目录"]。请注意,此列表会随着新工具的出现而增长。关注 issue #1778 以获取官方否定支持。

来源 Issue #1778