自主托管的 RAG 平台,可在 GitHub、Notion、Google Drive、本地文件和包含引用的 Web 资源中进行 AI 文档搜索。
自主托管的 RAG 平台,可在 GitHub、Notion、Google Drive、本地文件和包含引用的 Web 资源中进行 AI 文档搜索。
OpenDocuments
Self-hosted RAG platform for AI document search across GitHub, Notion, Google Drive, Confluence, S3, local files, and web sources
English | 한국어
OpenDocuments is an open source, self-hosted RAG (Retrieval-Augmented Generation) platform that turns scattered company documents into an AI-searchable knowledge base. It connects to sources like GitHub, Notion, Google Drive, Confluence, S3, Swagger/OpenAPI, local files, and web pages, indexes them with hybrid vector + keyword search, and answers natural-language questions with cited sources.
Use OpenDocuments when you want:
npm install -g opendocuments
opendocuments init
opendocuments startOpen http://localhost:3000, index your documents, and ask questions with source citations.
Your team's knowledge is trapped in silos:
.docx files on S3When someone asks "How does our auth system work?" or "What was the Q3 budget for the AI team?", they spend 15 minutes hunting through five different tools. OpenDocuments centralizes that search without forcing all of your content into a hosted vendor.
OpenDocuments connects to your document sources, parses and chunks each document, stores metadata in SQLite and vectors in LanceDB, then retrieves, reranks, and generates grounded answers. Every answer can include source citations, confidence scores, and links back to the underlying documents.
In short: OpenDocuments is a private AI search engine for your organization's documents.
| Feature | What it means |
|---|---|
| Self-hosted RAG | Run the full document search stack on your own infrastructure |
| Cited AI answers | Ask natural-language questions and see exactly which documents support the answer |
| Hybrid retrieval | Combine vector search, FTS5 keyword search, reranking, HyDE, multi-query retrieval, and parent-document recall |
| Broad source coverage | Index GitHub, Notion, Google Drive, Confluence, S3/GCS, Swagger/OpenAPI, web pages, web search, uploads, and local files |
| Many file formats | Parse Markdown, PDF, DOCX, XLSX, CSV, HTML, Jupyter notebooks, email, code, PPTX, JSON, YAML, TOML, and more |
| Local or cloud models | Use Ollama locally or cloud providers such as OpenAI, Anthropic, Google, and xAI |
| MCP server | Let Claude Code, Cursor, Windsurf, and other MCP clients search your internal knowledge base |
| Team mode | Add API keys, roles, rate limits, PII redaction, audit logs, alerts, OAuth SSO, and workspace isolation |
| Extensible plugins | Build custom parsers, connectors, model providers, and middleware in TypeScript |
| If you are comparing... | Choose OpenDocuments when you need... |
|---|---|
| OpenDocuments vs hosted enterprise search | A self-hosted, open source AI search platform with control over infrastructure and data flow |
| OpenDocuments vs a vector database | A complete RAG application layer: connectors, parsers, chunking, retrieval, chat, citations, auth, CLI, Web UI, and MCP |
| OpenDocuments vs a chatbot wrapper | Source-grounded answers over your real document corpus, not a generic chat UI |
| OpenDocuments vs building RAG from scratch | A TypeScript monorepo with batteries included, while still keeping plugin-level extensibility |
| OpenDocuments vs local-only scripts | A production-oriented system with team mode, API access, syncable connectors, backups, and admin tooling |
init auto-detects Ollama, offers to pull missing models.env auto-loading: API keys in .env are loaded automatically (no manual export needed)opendocuments doctor checks Ollama connectivity, model availability, and config validity"How do I authenticate against our internal API?"
OpenDocuments pulls the answer from your GitHub repo's docs/auth.md, links to the relevant Swagger endpoint, and includes a code example from the codebase -- all in one response.
# Index your repo and API docs
opendocuments index ./docs
opendocuments connector sync github
opendocuments ask "How does JWT token refresh work in our API?""What's the remote work policy for the Tokyo office?"
OpenDocuments searches across your Confluence HR space, the employee handbook on Google Drive, and the latest policy update email -- even if some documents are in Korean and others in English.
opendocuments ask "도쿄 오피스 원격 근무 정책이 뭐야?" --profile precise
# Cross-lingual search finds both Korean and English documents"Compare the feature specs of v2.0 vs v3.0"
OpenDocuments decomposes the question, searches both versions' specs, and presents a structured comparison table -- citing each source document.
Use OpenDocuments as a knowledge base for Claude Code, Cursor, or any MCP-compatible AI tool:
{
"mcpServers": {
"opendocuments": {
"command": "opendocuments",
"args": ["start", "--mcp-only"]
}
}
}Now your AI coding assistant can search your organization's entire document corpus while writing code.
Deploy on your own infrastructure. Your data never leaves your network when using a local LLM via Ollama. No cloud dependency, no vendor lock-in, no subscription fees.
OPENDOCUMENTS_MODEL_PROVIDER=ollama \
OPENDOCUMENTS_MODEL_BASE_URL=http://ollama:11434 \
OPENDOCUMENTS_MODEL_LLM=qwen2.5:14b \
OPENDOCUMENTS_MODEL_EMBEDDING=mxbai-embed-large \
docker compose --profile with-ollama up -d
# Everything runs locally: LLM, embeddings, vector search, web UIThis is the fastest way to run a local AI document search engine with the OpenDocuments CLI.
npm install -g opendocumentsopendocuments initThe interactive wizard will:
Developer, Enterprise, All, or Customopendocuments.config.ts and .env (API keys loaded automatically)opendocuments startOpen http://localhost:3000 -- you'll see a chat UI, document manager, and admin dashboard.
First time? If the model or corpus is not ready, the Web UI blocks questions and shows the exact recovery step. A normal
startnever downloads a model. Runopendocuments doctorfor full diagnostics.
# Index a local directory (recursively finds all supported files)
opendocuments index ./docs
# Watch mode: auto-reindex when files change
opendocuments index ./docs --watch
# Or drag-and-drop files in the Web UIopendocuments ask "What's our deployment process?"OpenDocuments uses a standard RAG architecture with practical production pieces around it: source connectors, format parsers, chunking, embeddings, metadata storage, vector storage, retrieval profiles, answer generation, citations, and security controls.
…| Format | Extensions | How It's Parsed |
|---|---|---|
| Markdown | .md, .mdx |
Heading hierarchy, code block separation |
| Plain Text | .txt |
Direct text indexing |
.pdf |
Page-level extraction, OCR fallback for scanned docs | |
| Word | .docx |
HTML conversion with heading detection |
| Excel / CSV | .xlsx, .csv |
Sheet-aware table chunking (header + rows) |
| HTML | .html, .htm |
Structure-preserving extraction, script/nav stripping |
| Jupyter Notebook | .ipynb |
Markdown cells + code cells with language detection |
.eml |
Header parsing (from/to/subject/date) + body extraction | |
| Source Code | .js, .ts, .py, .java, .go, .rs, .rb, .php, .swift, .kt + more |
Function/class-level chunking with import extraction |
| PowerPoint | .pptx |
Slide-level text extraction |
| Structured Data | .json, .yaml, .yml, .toml |
Config and schema indexing |
| Archive | .zip |
Placeholder (full extraction planned) |
Fallback Chains: If a parser fails, the next one tries automatically:
parserFallbacks: {
'.pdf': ['@opendocuments/parser-pdf', '@opendocuments/parser-ocr'],
}| Source | What It Indexes | Auth | How It Syncs |
|---|---|---|---|
| Local Files | Any supported format on your filesystem | None | File watching (--watch) |
| File Upload | Drag-and-drop in Web UI | None | Instant |
| GitHub | README, Wiki, code files, Issues | Personal Access Token | Polling / webhook |
| Notion | Pages, databases, all block types | Integration Token | Polling |
| Google Drive | Docs, Sheets, Slides |
暂无开放 Issues,或尚未同步最近议题。