Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

OpenDocuments

> AI 编程
Open source

Self-hosted RAG platform for AI document search across GitHub, Notion, Google Drive, local files, and web sources with citations.

100 stars0 likes2 views
WebsiteGitHub

About

Self-hosted RAG platform for AI document search across GitHub, Notion, Google Drive, local files, and web sources with citations.

OpenDocuments

Self-hosted RAG platform for AI document search across GitHub, Notion, Google Drive, Confluence, S3, local files, and web sources

English | 한국어


What is OpenDocuments?

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:

  • A self-hosted alternative to enterprise AI search and proprietary knowledge-base search tools
  • AI document search with citations for engineering docs, product specs, policies, spreadsheets, API docs, and meeting notes
  • A local-first RAG stack that can run with Ollama so sensitive documents stay on your own infrastructure
  • A knowledge base for AI coding assistants through MCP, including Claude Code, Cursor, Windsurf, and other MCP clients
  • A TypeScript-first RAG platform with a CLI, Web UI, HTTP API, SDK, plugin system, and embeddable widget
bash
npm install -g opendocuments
opendocuments init
opendocuments start

Open http://localhost:3000, index your documents, and ask questions with source citations.

Why OpenDocuments?

Your team's knowledge is trapped in silos:

  • Engineering docs live in GitHub READMEs and Wiki pages
  • Product specs are scattered across Notion databases
  • Budget reports sit in Excel files on Google Drive
  • API docs are auto-generated Swagger specs nobody reads
  • Meeting notes rot in Confluence spaces
  • Onboarding guides are buried in .docx files on S3

When 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.

How OpenDocuments Answers Questions

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.

Key Features

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

OpenDocuments vs Alternatives

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

Recent Improvements

  • RAG accuracy overhaul: Structure-preserving chunking, contextual prefixes, HyDE + multi-query retrieval, parent-document recall, proposition augmentation, reranking, and adaptive context fitting
  • Workspace-scoped team mode: Admin/chat/document APIs stay inside the authenticated workspace, with shared conversation links plus session and API-key auth support
  • Backup & restore CLI: Snapshot SQLite + LanceDB data and recover an instance with one command
  • Plugin hardening: Plugin search/install routes are admin-only and use validated npm argument execution
  • One-touch Ollama setup: init auto-detects Ollama, offers to pull missing models
  • .env auto-loading: API keys in .env are loaded automatically (no manual export needed)
  • Multi-turn conversations: Chat remembers previous context for follow-up questions
  • Degraded mode warnings: Clear banners when models aren't configured, with fix instructions
  • Enhanced diagnostics: opendocuments doctor checks Ollama connectivity, model availability, and config validity
  • Security hardening: FTS5 injection prevention, file upload sanitization, OAuth state limits, workspace isolation

Real-World Use Cases

For Engineering Teams

"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.

bash
# Index your repo and API docs
opendocuments index ./docs
opendocuments connector sync github
opendocuments ask "How does JWT token refresh work in our API?"

For Operations & HR Teams

"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.

bash
opendocuments ask "도쿄 오피스 원격 근무 정책이 뭐야?" --profile precise
# Cross-lingual search finds both Korean and English documents

For Product Managers

"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.

For AI-Assisted Development (MCP)

Use OpenDocuments as a knowledge base for Claude Code, Cursor, or any MCP-compatible AI tool:

json
{
  "mcpServers": {
    "opendocuments": {
      "command": "opendocuments",
      "args": ["start", "--mcp-only"]
    }
  }
}

Now your AI coding assistant can search your organization's entire document corpus while writing code.

For Self-Hosted Knowledge Bases

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.

bash
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 UI

Quick Start

This is the fastest way to run a local AI document search engine with the OpenDocuments CLI.

1. Install

bash
npm install -g opendocuments

2. Initialize

bash
opendocuments init

The interactive wizard will:

  • Detect your hardware (CPU, RAM) and recommend the optimal LLM
  • Let you choose between local (Ollama) or cloud (OpenAI, Claude, Gemini, Grok) models
  • Auto-detect Ollama and offer to pull missing models automatically
  • Validate cloud API keys before saving
  • Select a plugin preset: Developer, Enterprise, All, or Custom
  • Generate opendocuments.config.ts and .env (API keys loaded automatically)

3. Start

bash
opendocuments start

Open 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 start never downloads a model. Run opendocuments doctor for full diagnostics.

4. Index Your Documents

bash
# 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 UI

5. Ask Questions

bash
opendocuments ask "What's our deployment process?"

How It Works

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.

…

The RAG Pipeline

  1. Intent Classification -- Understands whether you're asking about code, concepts, data, or want a comparison
  2. Query Decomposition -- Breaks complex questions into sub-queries for better retrieval
  3. Cross-Lingual Search -- Finds documents in both Korean and English regardless of query language
  4. Hybrid Search -- Combines dense vector search (semantic) with FTS5 sparse search (keyword) via Reciprocal Rank Fusion
  5. Reranking -- Scores results by keyword overlap and model-based relevance
  6. Confidence Scoring -- Tells you honestly when it's not sure about an answer
  7. Hallucination Guard -- Verifies each sentence is grounded in the retrieved sources
  8. 3-Tier Caching -- L1 query cache (5min), L2 embedding cache (24h), L3 web search cache (1h)

Supported File Formats

Format Extensions How It's Parsed
Markdown .md, .mdx Heading hierarchy, code block separation
Plain Text .txt Direct text indexing
PDF .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
Email .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:

typescript
parserFallbacks: {
  '.pdf': ['@opendocuments/parser-pdf', '@opendocuments/parser-ocr'],
}

Data Sources

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· 13 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptaiai-searchdocument-qadocument-search

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.