GPT-RAG: Instructions file for Codex

AGENTS.md

GPT-RAG AGENTS.md is an instructions file for Codex, OpenCode from Azure/GPT-RAG. It costs 1,538 tokens per session, scanned A, original, MIT.

A set of instructions that defines how an engineering agent should work in the GPT-RAG repository, an Azure-based system for finding information and generating answers.

In plain words
What is it for?
Use it when working on GPT-RAG code, documentation, deployment assets, or other repository tasks governed by its operating contract.
Why use it?
It gives the agent clear priorities, repository boundaries, and rules for handling uncertainty. This helps prevent unsafe guesses or changes that conflict with the project.

Instructions file for CodexOpenCode ✓ vendor

Written for Codex and OpenCode: the file is AGENTS.md.

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

About the project

GPT-RAG is an Azure solution accelerator for building agentic retrieval-augmented generation systems, where agents use connected organizational sources to ground their answers. It is for organizations deploying secure RAG applications with Microsoft Foundry, Microsoft Agent Framework, and Azure infrastructure. The catalogue add-ons provide agents, skills, and instructions for deploying and working with the accelerator.

Azure/GPT-RAG · 1,179 stars · on GitHub · aka.ms

Reuse

Borrowing it

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

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 GPT-RAG AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/azure/gpt-rag/agents-md"><img src="https://agentmods.dev/badge/instructions/azure/gpt-rag/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,538 This file is loaded in full into every session.
When invoked 1,538 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.01538 $0.01538
Opus 5.5 $0.00615 $0.00615
Sonnet 5.5 $0.00308 $0.00308
Haiku 4.5 $0.00154 $0.00154

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

Security

Grade A, and why

GPT-RAG 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 2mo 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 · 165 lines

How it starts

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

GPT-RAG agent operating contract

This file is the stable, repository-wide contract for engineering agents. Detailed procedures belong in .github/skills/, and file-specific rules belong in .github/instructions/. Product documentation remains on the docs branch and at https://azure.github.io/GPT-RAG/.

Priority

Follow, in this order:

  1. Security, privacy, authorization, and platform instructions.
  2. Task requirements and acceptance criteria.
  3. Executable configuration and versioned contracts in the repository.
  4. .github/copilot-instructions.md, this contract, and applicable scoped instructions.
  5. Local conventions observed in the affected code.

When information is insufficient, do not guess behavior that could affect data, contracts, identity, security, releases, or production. Record the uncertainty and obtain a human decision.

What this repository is

GPT-RAG is an enterprise-grade Retrieval-Augmented Generation solution accelerator on Azure. It provides architecture and deployment assets for secure, scalable, observable AI applications using Azure AI Foundry, Azure OpenAI, Azure AI Search, Azure Container Apps, Azure App Configuration, Key Vault, Cosmos DB, and Azure Monitor.

Its shipped capabilities include hybrid and agentic retrieval, NL2SQL, multimodal ingestion and retrieval, SharePoint integration, configurable agent strategies and MCP tools, Entra ID authentication, document-level authorization, feedback and conversation persistence, Responsible AI controls, observability, Bring Your Own VNet, and optional network isolation. The published documentation describes the currently supported combinations and deployment modes.

This repository is the platform and configuration core of a multi-repository solution:

  • manifest.json is the authoritative GPT-RAG release manifest and pins the runtime component repositories and versions.
  • .gitmodules and manifest.json pin the AI Landing Zone infrastructure.
  • main.parameters.json defines the GPT-RAG deployment topology and parameters.
  • Runtime application code lives in the component repositories referenced by manifest.json; do not duplicate it here.
  • infra/ is populated from the bicep-ptn-aiml-landing-zone submodule. Do not edit it by hand because local changes are replaced during provisioning.

Read the full file on GitHub · 165 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. 2mo ago First seen · 165 lines · 1,538 tokens per session scan A 6d0be6bfb1e7

Subscribe to this mod's changes

GPT-RAG AGENTS.md is an instructions file published in the GitHub repository Azure/GPT-RAG (1,179 stars, last pushed 1mo ago), licensed MIT. It adds 1,538 tokens to every session, about $0.0062 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

GPT-RAG AGENTS.md compared with instructions from other repositories

GPT-RAG AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
GPT-RAG AGENTS.mdAzure/GPT-RAGInstructions file1.2k1mo agoMITA1,538Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,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 file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode