RAGFlow is an open-source Retrieval-Augmented Generation engine that combines document retrieval, context management, and agent capabilities to help build AI applications. Developers use it to turn complex data into searchable, context-aware systems through workflows, datasets, and agent templates; the catalogue entries support working with RAGFlow.
Borrowing it
Nothing to install: this file belongs to infiniflow/ragflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/infiniflow/ragflow/main/AGENTS.mdgit clone --depth 1 https://github.com/infiniflow/ragflowWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/infiniflow/ragflow/agents-md)<a href="https://agentmods.dev/instructions/infiniflow/ragflow/agents-md"><img src="https://agentmods.dev/badge/instructions/infiniflow/ragflow/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/infiniflow/ragflow/agents-md"><img src="https://agentmods.dev/badge/instructions/infiniflow/ragflow/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03906 | $0.03906 |
| Opus 5.5 | $0.01562 | $0.01562 |
| Sonnet 5.5 | $0.00781 | $0.00781 |
| Haiku 4.5 | $0.00391 | $0.00391 |
Grade A, and why
ragflow AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
RAGFlow Instructions
Use this file as the local operating guide for the current codebase. Prefer the code and the current AGENTS.md over any older convention or remembered project shape.
Core Stance
- Treat legacy code as liability, not as a compatibility target.
- Prefer deletion over shims, deprecated branches, wrapper APIs, and dual-track migration notes.
- If old and new implementations coexist, converge to one path unless an external contract forces compatibility.
- Remove dead tests, commented-out code, stale docs, and "move later" notes instead of preserving them.
- Reduce public surface area when a helper can be made private or internal.
- Keep refactors centered on the owning abstraction, not on adjacent compatibility layers.
Current stack
- Backend: Go implements the API, admin, ingestor, and syncer modes in
cmd/ragflow_server.go; the CLI runs fromcmd/ragflow-cli.go. The Docker entrypoint starts the Go services according to its command-line flags, and the frontend development server uses fixed Go backend proxy routes. The Python API, admin, and workers are still present pending removal. - Frontend: React + TypeScript + Vite in
web/. When working underweb/, read and followweb/AGENTS.mdfor frontend conventions. - The Go module contains the server, ingestion, parsing, agent runtime, CLI, and supporting services.
- Runtime services commonly include MySQL/PostgreSQL, Kvrocks, NATS JetStream, MinIO, ClickHouse, and Elasticsearch/Infinity/OpenSearch depending on configuration.
Go-only target
- Remove all Python code and Python-specific dependencies, scripts, containers, CI jobs, documentation, SDKs, and tests from the repository. Do not add new Python code while this removal is in progress. Replace Python-based preparation of Go native libraries, DeepDoc models, and the BPE table before removing the existing download scripts.
- Move any still-required behavior and test coverage into the Go backend or the frontend before deleting the old implementation. Do not preserve a Python server, compatibility layer, fallback, or dual-backend path.
- Before deleting
rag/, move the Go DeepDoc.ortmodels andocr.resout ofinternal/rag/res/deepdoc/, then update model discovery, dependency preparation, Docker packaging, and tests together. - Remove the frontend's Go/Python backend variants and update
web/CLAUDE.mdwhen the frontend no longer needs them. Until then, treat its dual-backend instructions as migration-only guidance; new frontend work should target the Go API. - Update Docker's default entrypoint, dependency image, and CI workflows when removing their remaining Python paths. Keep the frontend development proxy routes aligned with the Go API and Admin ports in
web/vite.config.ts. - Keep this guide aligned with the checked-in tree. Once the Python directories are deleted, remove their migration inventory below.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago Changed · +12 lines · +317 tokens per session 1d29b1257307
- 8d ago Changed · -11 tokens per session ca9570c71572
- 15d ago Changed · -15 tokens per session 58cca691497b
- 24d ago Changed · +134 tokens per session 95d7be3bcea3
- 25d ago Changed · -4 tokens per session b9b2b9d56ccf
- 1mo ago Changed · +4 lines · +271 tokens per session 0bb4cb55ead6
- 1mo ago Changed · +4 lines · +661 tokens per session 9e134564584d
- 1mo ago Changed · +14 lines · +507 tokens per session e4d9ba57b2b8
- 1mo ago Changed · -2 tokens per session c4ee0553c957
- 2mo ago First seen · 136 lines · 2,048 tokens per session scan A 4bb133288a0d
ragflow AGENTS.md is an instructions file published in the GitHub repository infiniflow/ragflow (93,628 stars, last pushed yesterday), licensed Apache-2.0. It adds 3,906 tokens to every session, about $0.0156 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
ragflow AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ragflow AGENTS.mdinfiniflow/ragflow | Instructions file | 94k | yesterday | Apache-2.0 | A | 3,906 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |