FengZhenfei / carrel
git clone https://github.com/FengZhenfei/carrel.git
v0.2.0 · 19d ago
Ontology-Augmented Generation for AI agents.
+90
stars, 24h · #422
+~352
stars, 7 days · #622
+463
stars, 30 days · #1,773
463
★ total · +317% this week
3
forks · 1 open issues
Star history (as recorded here)
LanguagePython
LicenseMIT
Created2026-09-28 (25d ago)
Last push1d ago
Watchers2
OwnerUser
GitHub topics
agent-skillsai-agentsdgx-sparkdocument-parsingicloud-syncknowledge-graphmineruneo4jontologyopensearchqdrantragretrieval-augmented-generation
Links
README excerpt
# Carrel English | 中文 **Ontology-Augmented Generation for AI agents.** Carrel is a self-hosted knowledge base for AI agents. It automates document parsing, indexing, and retrieval, with optional knowledge graphs. Agents use its API to retrieve source passages, images, and related facts, then generate their own answers. Use it to give an agent access to a collection of product documents, research, contracts, meeting notes, or other files that change over time. A web console manages knowledge bases, models, and processing tasks. A bundled search skill connects agents such as Claude Code and Codex to the retrieval service. Features · Quick start · Agent integration · Documentation ## Features - **Document parsing:** PDF, Word, PowerPoint, spreadsheets, images, HTML, Markdown, and source code, with processing suited to each format. - **Automatic updates:** scan for file changes, update indexes, and maintain enabled knowledge graphs through scheduled tasks. - **Hybrid retrieval:** combine vector, keyword, graph, and visual search, with automatic knowledge-base selection and optional reranking. - **Knowledge graphs:** extract entity types, relationships, and facts from your documents; retain sources, time information, and conflict indicators. - **Agent access:** search through an API, fetch surrounding text or original images, and follow graph relationships when more evidence is needed. - **Web console:** configure processing, inspect chunks and graphs, track tasks, and manage services. Available in English and Chinese. ## How it works [code] Carrel uses MinerU and native parsers for ingestion, Qdrant for vectors, OpenSearch for keywords, and Neo4j for graph queries. SQLite tracks files and tasks. Model services can run locally or through compatible hosted endpoints. See Architecture for the pipeline and retrieval design. ## Requirements - Python 3.12+ and Docker 25+ with Compose v2. - A text embedding endpoint; a vision-language endpoint for image descriptions; and a chat model for knowledge graph construction, if enabled. - An NVIDIA GPU and NVIDIA Container Toolkit to run the optional local model stack. CPU parsing is also supported. Resource needs depend on the models and collection size. | Platform | Deployment | |---|---| | Linux with NVIDIA GPU | GPU parsing and optional local model services; systemd scheduling | | Linux without GPU | CPU parsing; connect to model services on another host or a provider | | macOS with Docker Desktop | CPU containers and native Python services; arrange scheduling separately | | Windows | Use WSL2; native Windows deployment is not supported | Example setup describes the author's installation on an NVIDIA DGX Spark and some lighter alternatives. ## Quick start ### 1. Deploy the services [code] The script detects the host, starts the infrastructure, installs the Python app, and creates configuration files. On Linux with user systemd available, it also enables services and scheduled tasks. Other hosts rec