# RAGFlow

Self-hosted RAG engine with deep document parsing, agents, a REST API and an MCP endpoint.

RAGFlow is a retrieval-augmented generation engine that parses complex documents into chunks, answers questions with citations, and runs agent workflows. The Go API server exposes a documented REST API with API-key auth and, built in, a three-tool MCP endpoint for retrieval and listing. It needs a heavy stack: a document engine, MySQL, MinIO and Redis-compatible services.

- Capabilities: adaptable, operable
- Vertical: notes-knowledge
- Shape: product
- Form factor: web-app
- Execution model: hybrid
- Provenance: unknown (recorded, never ranked)
- Repo: https://github.com/infiniflow/ragflow (Apache-2.0), 93689 stars, last commit 2026-11-06
- Last activity: 2026-11-06
- Page: apps/infiniflow--ragflow.html
- JSON: apps/infiniflow--ragflow.json

## Use it when

- you want your agent to search and cite answers from a large pile of PDFs, Word files and spreadsheets
- you want to build a question-answering assistant over company documents and call it from your own code

## Gotchas

- README recommends 4 CPU cores, 16 GB RAM and 50 GB disk; the stack runs several services
- The built-in MCP endpoint exposes only retrieval and listing of datasets and chats; uploads, parsing and agent edits need the REST API
- Cloud Free has no API key, so an agent needs Cloud Starter or higher; self-hosted API keys are not gated
- The provider and connector routes work with an API key but are missing from the HTTP API reference, so read internal/router/router.go
- Cloud prices on ragflow.io are limited-time; ragflow.io/pricing/details shows $59 and $259 under the names Small team and Medium team
- 1.0 removed several older API routes (docs/references/http_api_reference.md, Migrate to 1.0)
- macOS is not currently supported for the Docker deployment per the README
- Model provider and connector routes accept an API key but are not in the HTTP API reference, so they can change without notice.

## Editions

- Self-hosted: Free, open source
  - source: https://github.com/infiniflow/ragflow
  - container: git clone https://github.com/infiniflow/ragflow.git && cd ragflow/docker && git checkout v1.0.0 && docker compose -f docker-compose.yml up -d
- Cloud Free: Free, closed source
  - hosted: https://cloud.ragflow.io
- Cloud Starter: $29 per month, closed source
  - hosted: https://cloud.ragflow.io
- Cloud Pro: $129 per month, closed source
  - hosted: https://cloud.ragflow.io
- Enterprise: price not recorded, closed source

## Adaptable: make it yours

Effort: config-only (11 things to edit), surface kind admin-ui

docker/.env and docker/service_conf.yaml.template hold deployment values: document engine choice, database and object store hosts and passwords, ports, and the optional MCP listener (RAGFLOW_MCP_* variables). Business behavior is set in the web UI and stored in the database: dataset parser settings, chat assistant prompts, agent workflows, and model providers. The same objects are reachable over the REST API. Built-in prompts in internal/rag/prompts are compiled into the binary, and agent templates in internal/agent/templates are copied into the image, so changing those means a rebuild.

- Env vars: DOC_ENGINE, DB_TYPE, MYSQL_HOST, MINIO_HOST, REDIS_PASSWORD, RAGFLOW_MCP_ENABLED, RAGFLOW_MCP_LAUNCH_MODE, RAGFLOW_MCP_HOST_API_KEY
- Config files: docker/.env, docker/service_conf.yaml.template, docker/docker-compose.yml
- Prompt files: none
- Accounts you'll need: LLM, embedding and reranker provider accounts or a local model server

## Operable: what an agent can drive

Operability: official. Interface: api at https://ragflow.io/docs/dev/http_api_reference (published by the builder, both).

### Reach (partial coverage)

- Create datasets and upload documents: reachable. REST POST /api/v1/datasets, POST /api/v1/datasets/{dataset_id}/documents
- Parse and ingest documents into chunks: reachable. REST POST /api/v1/datasets/{dataset_id}/chunks and POST /api/v1/documents/ingest
- Edit, add and delete chunks and metadata: reachable. REST POST/PATCH/DELETE on /api/v1/datasets/{dataset_id}/documents/{document_id}/chunks; POST .../metadata/update
- Retrieve chunks from datasets: reachable. MCP tool ragflow_retrieval; REST POST /api/v1/retrieval
- Create and configure chat assistants: reachable. REST POST/PUT/PATCH/DELETE /api/v1/chats
- Chat with an assistant and manage sessions: reachable. REST POST /api/v1/chat/completions, /api/v1/chats/{chat_id}/sessions; OpenAI-compatible POST /api/v1/openai/{chat_id}/chat/completions
- Create, edit and run agent workflows: reachable. REST POST/PUT/DELETE /api/v1/agents, POST /api/v1/agents/chat/completions, agent versions endpoints
- Memory for agents: reachable. REST /api/v1/memories and /api/v1/messages endpoints
- Add LLM, embedding and reranker model providers: not reachable. Not in the Builder's HTTP API reference. PUT /api/v1/providers and POST /api/v1/providers/{name}/instances in internal/router/router.go, behind the same AuthMiddleware that takes an API key; sdk/python/test/conftest.py calls them. The routes exist in source, so this may change if they are documented.
- Connect external data sources and sync them: not reachable. Not in the Builder's HTTP API reference. GET/POST/PATCH/DELETE /api/v1/connectors, plus /rebuild and /test, in internal/router/router.go behind the same API key auth. Google Drive, Gmail and Box need a browser OAuth step. The routes exist in source, so this may change if they are documented.

## Code stack

- Languages: Go, Python, TypeScript
- Frameworks: none
- Package manager: none
- Database: MySQL, Elasticsearch, Infinity
- Hosting target: docker

## Model stack

- Providers: any LLM, embedding and reranker provider added in the UI
- Models: none
- Keys you need (names only): none
- Prompts live in: internal/rag/prompts/*.md, internal/agent/component/prompts
- Tools: ragflow_retrieval, ragflow_list_datasets, ragflow_list_chats

## Skills

contributor: The only skill found under .agents/skills is go-naming, which is for people working on the repo.
- Paths: .agents/skills/*/SKILL.md

## Evidence and confidence

- formFactor: README: Docker deployment with web UI (confidence 0.95)
- executionModel: deterministic parsing and retrieval plus LLM-backed chat and agents (confidence 0.8)
- operability: docs/references/http_api_reference.md lists endpoints with Authorization Bearer API key; docs/develop/mcp/mcp_tools.md lists three MCP tools; both published by infiniflow. Provider and connector routes read from internal/router/router.go. (confidence 0.9)
- effort: docker/.env and service_conf.yaml.template read: deployment values only. Prompts and workflows live in the UI and database. internal/rag/prompts/templates.go embeds the built-in prompts with go:embed; Dockerfile line 279 copies agent templates into the image; docker-compose.yml mounts only service_conf.yaml.template and entrypoint.sh. (confidence 0.7)
- editions: ragflow.io home page pricing section: Free $0, Starter $29 (struck $59), Pro $129 (struck $259), Enterprise Contact us, all per month; Free reads API key not available. ragflow.io/pricing/details: billed monthly, limited-time discounts. internal/handler/auth.go returns "API key requires a Starter or Pro plan" only when billing is on; internal/service/billing/stub.go leaves billing off in the open build. (confidence 0.9)
- active: commits on 2026-11-06; release v1.0.0 published 2026-11-06
- reach:  (confidence 0.85)

## Sources

- https://ragflow.io (sourcing:notes-knowledge:curated)
- https://github.com/infiniflow/ragflow/blob/main/docs/develop/mcp/mcp_tools.md (analysis)
- https://github.com/infiniflow/ragflow/blob/main/docs/references/http_api_reference.md (analysis)
- https://ragflow.io/pricing/details (verification)
- https://github.com/infiniflow/ragflow/blob/main/internal/router/router.go (verification)
