ragflow: Instructions file for Codex

AGENTS.md

ragflow AGENTS.md is an instructions file for Codex, OpenCode from infiniflow/ragflow. It costs 3,906 tokens per session, scanned A, original, Apache-2.0.

Repository-specific instructions for working on RAGFlow, a software project that combines a web interface, APIs, background workers, and search-related services. They describe the codebase, technology choices, and preferred approach to old code.

In plain words
What is it for?
Planning and implementing changes across RAGFlow's Python, Go, React, and TypeScript code, while following its project conventions.
Why use it?
They give an agent enough local context to make changes that fit the current project. They also discourage keeping unnecessary compatibility code or outdated material.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is infiniflow/ragflow's own configuration. It tells Codex and OpenCode how to work on ragflow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ragflow configures →

About the project

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.

infiniflow/ragflow · 93,628 stars · on GitHub · ragflow.io

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/infiniflow/ragflow/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/infiniflow/ragflow

Made for: Codex, OpenCode.

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

agentmods badge for ragflow AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/infiniflow/ragflow/agents-md/github.svg)](https://agentmods.dev/instructions/infiniflow/ragflow/agents-md)
Your own site
<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.

agentmods 80×15 button for ragflow AGENTS.md

Your own site · 80×15
<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>
Per session 3,906 This file is loaded in full into every session.
When invoked 3,906 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash 1d29b1257307, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 170 lines

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 from cmd/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 under web/, read and follow web/AGENTS.md for 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 .ort models and ocr.res out of internal/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.md when 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.

Read the full file on GitHub · 170 lines

Changes

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.

  1. 6d ago Changed · +12 lines · +317 tokens per session 1d29b1257307
  2. 8d ago Changed · -11 tokens per session ca9570c71572
  3. 15d ago Changed · -15 tokens per session 58cca691497b
  4. 24d ago Changed · +134 tokens per session 95d7be3bcea3
  5. 25d ago Changed · -4 tokens per session b9b2b9d56ccf
  6. 1mo ago Changed · +4 lines · +271 tokens per session 0bb4cb55ead6
  7. 1mo ago Changed · +4 lines · +661 tokens per session 9e134564584d
  8. 1mo ago Changed · +14 lines · +507 tokens per session e4d9ba57b2b8
  9. 1mo ago Changed · -2 tokens per session c4ee0553c957
  10. 2mo ago First seen · 136 lines · 2,048 tokens per session scan A 4bb133288a0d

Subscribe to this mod's changes

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.

Related

ragflow AGENTS.md compared with instructions from other repositories

ragflow AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ragflow AGENTS.mdinfiniflow/ragflowInstructions file94kyesterdayApache-2.0A3,906Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode