UltraRAG AGENTS.md

UltraRAG AGENTS.md is an instructions file for Codex, OpenCode from OpenBMB/UltraRAG. It costs 4,145 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

Install

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.

agentmods
npx agentmods add instructions/openbmb/ultrarag/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,145 This file is loaded in full into every session.
When invoked 4,145 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.04145 $0.04145
Opus 5 $0.02073 $0.02073
Sonnet 5 $0.00829 $0.00829
Haiku 4.5 $0.00415 $0.00415

Measured 4d ago against content hash e535f85f0c63, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 630 lines

How it starts

The opening of the file, as written. The whole thing — 630 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 · 630 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. 4d 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,679 stars, last pushed 2d ago), licensed Apache-2.0. It adds 4,145 tokens to every session, about $0.0207 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.