Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/infiniflow/ragflow/agents-mdgit clone --depth 1 https://github.com/infiniflow/ragflowWhat 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 | $0.02027 | $0.02027 |
| Opus 5 | $0.01014 | $0.01014 |
| Sonnet 5 | $0.00405 | $0.00405 |
| Haiku 4.5 | $0.00203 | $0.00203 |
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 3d 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 — 136 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 CLAUDE.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: Python 3.13+, Quart-based API server, Peewee ORM, async workers.
- Frontend: React + TypeScript + Vite in
web/(dual-backend Go/Python variant conventions: seeweb/CLAUDE.md). - Go: the repository also has a substantial Go module for servers, ingestion, parser/runtime, CLI, and supporting services.
- Runtime services commonly include MySQL/PostgreSQL, Redis, MinIO, and Elasticsearch/Infinity/OpenSearch depending on configuration.
Code Layout to Expect
api/: Python API server entrypoints, blueprints, services, and database code.rag/: ingestion, retrieval, LLM integration, and graph RAG logic.deepdoc/: parsing and OCR.agent/: workflow canvas, components, tools, and templates.cmd/: Go entrypoints.ragflow_mainis the main server/admin/ingestor binary surface;ragflow-cliis the CLI entrypoint.internal/: main Go application code. Important subtrees:internal/agent/: Go agent runtime, canvas execution, components, tool bindings, workflow helpers.internal/cli/: CLI parsing, HTTP transport, command execution, response formatting.internal/dao/: Go data-access layer and persistence-facing helpers.internal/deepdoc/: Go DeepDOC integrations, especially native-backed PDF/DOCX parsing.internal/engine/: search/index backends such as Elasticsearch and Infinity.internal/entity/: shared Go entities and model definitions.internal/handler/: HTTP handlers and route-facing request logic.internal/ingestion/: Go ingestion pipeline, canvas adapter, components, wiring, service orchestration.internal/ingestion/component/: stage implementations such as file/parser/chunker/tokenizer/extractor.internal/ingestion/pipeline/: DSL translation, canvas-driven execution, checkpoints, resume/run logic.internal/parser/: parser and chunk libraries used by ingestion and other Go paths.internal/parser/parser/: typed parse-result parsers for markdown/html/pdf/docx/xlsx/text and related families.internal/parser/chunk/: chunk operator library and DSL/typed execution helpers.internal/service/: higher-level business services used by handlers and server flows.internal/storage/: storage backends and in-memory test doubles.internal/router/: HTTP route registration.internal/server/: server bootstrap/config wiring.internal/cpp/: C++ sources used by native-backed Go features.web/: frontend application.docker/: local and production compose files.sdk/andtest/: SDK and automated tests.
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.
- 3d ago First seen · 136 lines · 2,027 tokens per session scan A 16920b40d670
ragflow AGENTS.md is an instructions file published in the GitHub repository infiniflow/ragflow (89,841 stars, last pushed today), licensed Apache-2.0. It adds 2,027 tokens to every session, about $0.0101 per session on Opus 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.
Other instructions, from other repositories
RAGLight CLAUDE.md
Instructions for Bessouat40/RAGLight, covering claude.md, commands, install dependencies, run all tests and run a single test module.
rag AGENTS.md
Instructions for NVIDIA-AI-Blueprints/rag, covering nvidia rag blueprint, project structure, development commands, backend (python) and optional: ragas benchmark cli (see scripts/eval/readme.md).
rag CLAUDE.md
Instructions for NVIDIA-AI-Blueprints/rag, covering nvidia rag blueprint, project structure, development commands, backend (python) and optional: ragas benchmark cli (see scripts/eval/readme.md).
plur CLAUDE.md
Instructions for plur-ai/plur, covering claude.md, what is plur, development, package dependency and version bumps.
manifold AGENTS.md
Instructions for intelligencedev/manifold, covering go/manifold, coding conventions, project structure & module organization, package organization and dependency injection.
Context-Engine GEMINI.md
Instructions for Context-Engine-AI/Context-Engine, covering ai agent rules for context-engine mcp tools, stop — read this first, glossary, tool selection decision tree and requirements.