FengZhenfei/carrel
Self-hosted hybrid retrieval and optional knowledge graphs for agent evidence
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Carrel is a Python evidence backend, not an answer-generation service. Its containerized scheduler scans enabled document folders, parses files with MinerU or native parsers, and turns the results into searchable chunks and, optionally, graph facts. Standard uses Qdrant, OpenSearch, and Neo4j; Light embeds LanceDB and DuckDB without separate database containers. Both editions use SQLite to track files and tasks.
Parsing, indexing, and graph construction are maintained separately. Routine graph updates merge new and changed content; configured time or change thresholds trigger full rebuilds that can reuse parsed content and chunks without replacing the RAG indexes. Models run behind separately configured endpoints. The retrieval API and bundled carrel-search skill are the agent integration points: Carrel serves evidence, while the agent decides whether to fetch more context and how to answer. The planned Agent Loop plugin is not implemented.
Key Capabilities & Differentiators
Ingestion covers PDFs, Office documents and spreadsheets, images, HTML, Markdown, notebooks, source code, and workflow files. Retrieval combines vector, keyword, graph, and visual search, with automatic knowledge-base selection, rank fusion, and optional text and image reranking. An agent can request surrounding text, inspect original images, and follow graph relationships when initial results are insufficient. Graph facts retain provenance, time context, and conflict indicators. Historical and future claims remain visible by default; an explicit time query narrows the evidence, and reviewed corrections are scoped to the relevant sources and identities.
The v0.4.1 evaluation recorded 93.45% evidence Hit@5 and 0.8141 MRR@10 on 275 text queries. In a separate 24-question code study, Haiku answered 13 questions completely on the first response and 23 with Skill follow-up. These figures describe different outcomes in specific evaluations; neither establishes answer accuracy or performance for v0.4.4 on a new corpus.
Trade-offs & Limitations
Compared with using a standalone vector store as the retrieval substrate, Carrel takes on document parsing, scheduled refreshes, source-level evidence, and optional graph maintenance. That reduces the amount of pipeline code an agent team must own, but adds operational surface that is unnecessary if the application already has reliable ingestion and only needs similarity search. Light is the simpler starting point because there are no database containers to run. Standard is the fit when Qdrant, OpenSearch, and Neo4j are explicit requirements and the team can operate all three. The edition is fixed per deployment directory, so validate the storage choice early rather than treating it as a runtime switch.
Self-hosting the retrieval service does not make processing local by default: configured model endpoints can receive document and image content. Local endpoints keep that processing in your infrastructure but leave you responsible for model serving and capacity. Likewise, optional graph extraction adds model calls and graph maintenance, so weigh it against actual needs for relationship traversal or time-scoped evidence. The project is MIT-licensed; third-party dependencies and separately selected models or services still warrant their own review.
Hardware & Deployment Guide
Docker with Compose v2 runs the application and scheduler. The deploy.sh entry point supports --light --build and --standard --build; Compose can also be used directly. Open the console on localhost:9800, configure model endpoints and IDs, and enable document folders for scheduled ingestion. A text embedding endpoint is required; image descriptions use a vision-language endpoint, and optional graph construction needs a chat model. Search on port 9810 uses a bearer token. MinerU assets download on first startup, but Carrel does not start model servers or fetch their weights.
CPU parsing is available on Linux and macOS with Docker Desktop; GPU parsing on Linux needs an NVIDIA GPU and NVIDIA Container Toolkit. Windows requires WSL2. A DGX Spark setup is an example, not a minimum; size for the parser, collection size, ingestion concurrency, and any colocated models. v0.4.2 introduced the two containerized editions and separated model configuration from service deployment. v0.4.3 addressed publication, evidence consistency, and recovery and added document and section time context to graph extraction. v0.4.4 ships MinerU 3.4.5 for new deployments and improves PDF and table chunking, image descriptions, and index recovery.
Teams giving agents access to changing product docs, contracts, research, or code, where finding source passages, original images, or time-scoped facts matters more than returning a one-shot answer.
You need a turnkey chatbot, already have ingestion and citations covered and only need vector search, or cannot provision model endpoints that meet your data-handling requirements.
Quick Start & Installation
export CARREL_SEARCH_TOKEN='your search token' curl -sS http://127.0.0.1:9810/search \ -H "Authorization: Bearer $CARREL_SEARCH_TOKEN" \ -H 'Content-Type: application/json' \ -d '{"question": "What are the delivery and acceptance requirements?", "top_k": 8}'
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| carrel ★ | 794 | — | Python | MIT | Self-hosted hybrid retrieval and optional knowledge graphs for agent evidence |
| LightRAG | 41k | +110 | Python | MIT | Graph-backed RAG for cross-document retrieval and multimodal indexing |
| crawl4ai | 88.5k | +408 | Python | Apache-2.0 | Async browser crawler that turns web pages into Markdown and JSON for RAG |
| docling | 71.4k | +285 | Python | MIT | Local-first document parser for structure-aware RAG ingestion |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/FengZhenfei/carrel.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about carrel
How does an agent integrate with Carrel, and who generates the answer?
Do we need a GPU, and how should we size a deployment?
Can we use Carrel commercially while keeping documents on-premises?
When should we choose Carrel Light, Standard, or a standalone vector store?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy