Multi-tenant knowledge-base retrieval and RAG service with a native FastAPI API, OpenAI-compatible endpoints, a Next.js console, and a synchronous Python SDK.
This README describes the current main branch as of 2026-08-19. Read the Chinese capability map for the complete, implementation-verified feature inventory, dependencies, API routes, and limitations.
- Tenant isolation, API-key roles/scopes, document ACL security trimming, audit logging, rate limiting, and admin operations.
- Knowledge-base CRUD and text/URL/file/batch ingestion with document status, processing logs, chunk inspection, and interruption.
- Pluggable parsers, chunkers, enrichers, indexers and retrievers: dense, BM25, hybrid, fusion, HyDE, multi-query, self-query, parent-document, ensemble, LlamaIndex and RAPTOR.
- Traceable multimodal RAG: MinerU PDF parsing, image/table/formula content units, Qwen VL embedding, Qwen VL rerank provider wiring,
/v2/retrieve, and chat source panels. - Synchronous/SSE RAG, persisted conversations, OpenAI-compatible Chat Completions and Embeddings, plus multi-provider LLM/embedding/rerank configuration.
- PostgreSQL pgvector, in-memory BM25 or OpenSearch, Redis cache/rate limiting/Celery broker, and MinIO/S3-compatible object storage.
- Docker Compose deployment, health/readiness/metrics endpoints, maintenance scripts, console, and Python SDK.
# Default: PostgreSQL pgvector + Redis + MinIO + in-memory BM25
./deploy.sh up
# Shared sparse index for multi-instance or production-like search
./deploy.sh up search
curl http://localhost:8020/health
curl http://localhost:8020/readyConfigure a strong ADMIN_TOKEN and at least the required model provider credentials before creating a tenant. The API listens on 8020 and the console on 3003.
File uploads are queued through Celery with Redis; run the API and worker services together, then poll GET /v1/documents/{id} until processing_status is completed.
- 中文 README
- Capability map
- Getting started
- Multimodal RAG deployment
- API reference
- Pipeline architecture
- Operations
- Python SDK
uv sync
uv run pytest tests/ -v
uv run ruff check .
npm --prefix docs run buildProduction deployments must run Alembic migrations, replace all sample credentials, restrict CORS and network access to internal dependencies, configure TLS, and back up persistent volumes. For MinerU + Qwen VL embedding/rerank, keep secrets outside git, configure QWEN_RERANK_API_BASE, and run the smoke scripts documented in Multimodal RAG deployment.