UltraRAG: Instructions file for Codex

AGENTS.md

UltraRAG AGENTS.md is an instructions file for Codex, OpenCode from OpenBMB/UltraRAG. It costs 4,158 tokens per session, scanned A, original, Apache-2.0.

A project guide for coding agents working on UltraRAG, a Python framework for building systems that search documents and use the results to generate answers. It explains the repository structure, system design, conventions, and work process.

In plain words
What is it for?
Use it when modifying UltraRAG, especially its retrieval, prompting, generation, routing, memory, evaluation, or YAML pipeline code.
Why use it?
It gives agents one source of truth for understanding the codebase and making changes safely. This reduces confusion about where code belongs and how the parts fit together.

Instructions file for CodexOpenCode

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

This is OpenBMB/UltraRAG's own configuration. It tells Codex and OpenCode how to work on UltraRAG 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 UltraRAG configures →

About the project

UltraRAG is a low-code framework for building retrieval-augmented generation pipelines, which let language models use information from knowledge bases when producing answers. Researchers and developers use it to assemble, inspect, deploy, and evaluate RAG systems through the Model Context Protocol. The catalogue includes instructions for working with UltraRAG.

OpenBMB/UltraRAG · 5,737 stars · on GitHub · ultrarag.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to OpenBMB/UltraRAG. 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/OpenBMB/UltraRAG/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/OpenBMB/UltraRAG

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 UltraRAG AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/openbmb/ultrarag/agents-md/github.svg)](https://agentmods.dev/instructions/openbmb/ultrarag/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/openbmb/ultrarag/agents-md"><img src="https://agentmods.dev/badge/instructions/openbmb/ultrarag/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 UltraRAG AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/openbmb/ultrarag/agents-md"><img src="https://agentmods.dev/badge/instructions/openbmb/ultrarag/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,158 This file is loaded in full into every session.
When invoked 4,158 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.04158 $0.04158
Opus 5.5 $0.01663 $0.01663
Sonnet 5.5 $0.00832 $0.00832
Haiku 4.5 $0.00416 $0.00416

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

Security

Grade A, and why

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

AGENTS.md · 632 lines

How it starts

The opening of the file, as written. The whole thing — 632 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

This document is the primary engineering guide for autonomous coding agents working in the UltraRAG repository.

Use this file as the source of truth for architecture, conventions, workflows, and safe change patterns. If CLAUDE.md exists, it should only point to this file.


1) Project Identity

UltraRAG is a lightweight RAG framework built around the Model Context Protocol (MCP). The key design choice is strict modularization: retrieval, prompting, generation, routing, memory, and evaluation are implemented as independent MCP servers orchestrated by YAML pipelines.

Current core metadata:

  • Package: ultrarag
  • Version: 0.3.0
  • Python: >=3.11, <3.13
  • CLI entrypoint: ultrarag = ultrarag.client:main
  • Package manager: uv ([tool.uv] package = true)

2) Repository Map (What Matters Most)

UltraRAG/
├── src/ultrarag/                    # Installable core package
│   ├── client.py                    # CLI + pipeline engine + run/build orchestration
│   ├── server.py                    # UltraRAG_MCP_Server (FastMCP extension)
│   ├── api.py                       # Python API wrappers (ToolCall, PipelineCall)
│   ├── cli.py                       # Rich banner and CLI visuals
│   ├── mcp_logging.py               # Central logging setup
│   ├── mcp_exceptions.py            # Node.js checks for remote MCP
│   └── utils.py                     # Subprocess lifecycle helpers
│
├── servers/                         # MCP microservices (each server is independent)
│   ├── retriever/
│   ├── generation/
│   ├── prompt/
│   ├── reranker/
│   ├── benchmark/
│   ├── evaluation/
│   ├── corpus/
│   ├── memory/
│   ├── router/
│   ├── custom/
│   ├── pageindex/
│   └── sayhello/
│
├── examples/
│   ├── demos/                       # UI-ready demo pipelines
│   └── experiments/                 # Experiment/research pipelines
│
├── ui/
│   ├── backend/                     # Flask backend + pipeline manager
│   └── frontend/                    # Vite + React + TypeScript
│
├── docs/                            # Docs and assets
├── script/                          # Utility scripts (deploy, case study, etc.)
├── pyproject.toml                   # Dependencies + package metadata
├── uv.lock                          # Locked dependency graph
├── Dockerfile*                      # Container variants
└── .gitignore

Read the full file on GitHub · 632 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. 8d ago Changed · +1 lines · +6 tokens per session f10193f5da17
  2. 24d ago Changed · +1 lines · +6 tokens per session adeff11b9563
  3. 1mo ago Changed · +1 lines · +7 tokens per session 3c1db5887593
  4. 2mo ago First seen · 630 lines · 4,145 tokens per session scan A e535f85f0c63

Subscribe to this mod's changes

UltraRAG AGENTS.md is an instructions file published in the GitHub repository OpenBMB/UltraRAG (5,737 stars, last pushed 2d ago), licensed Apache-2.0. It adds 4,158 tokens to every session, about $0.0166 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

UltraRAG AGENTS.md compared with instructions from other repositories

UltraRAG AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
UltraRAG AGENTS.mdOpenBMB/UltraRAGInstructions file5.7k2d agoApache-2.0A4,158Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode