openai-agents-python AGENTS.md

A contributor guide for the OpenAI Agents Python repository. It explains the project structure, development rules, testing process, and repository-specific instructions for coding agents.

In plain words
What is it for?
Use it when modifying the Python agent library, tests, examples, build settings, or other files covered by the contributor rules.
Why use it?
It keeps changes consistent with the repository’s required checks, policies, and worktree and branch practices.

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/openai/openai-agents-python/agents-md
Clone the repo
git clone --depth 1 https://github.com/openai/openai-agents-python

Made for: Codex, OpenCode.

Per session 8,006 This file is loaded in full into every session.
When invoked 8,006 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.08006 $0.08006
Opus 5 $0.04003 $0.04003
Sonnet 5 $0.01601 $0.01601
Haiku 4.5 $0.00801 $0.00801

Measured yesterday against content hash 337fbeca5f88, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openai-agents-python 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 yesterday.

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 · 330 lines

How it starts

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

Contributor Guide

This guide helps new contributors get started with the OpenAI Agents Python repository. It covers repo structure, how to test your work, available utilities, and guidelines for commits and PRs.

Location: AGENTS.md at the repository root.

Table of Contents

  1. Policies & Mandatory Rules
  2. Code Review Rules
  3. Project Structure Guide
  4. Operation Guide

Policies & Mandatory Rules

Mandatory Skill Usage

Repository skills are stored under .agents/skills/. A reference such as $<skill-name> in this file is a repository instruction reference, not a request for manual user invocation. When a rule requires a skill, read .agents/skills/<skill-name>/SKILL.md completely before taking task actions, follow its instructions, and resolve referenced files relative to that skill directory.

$code-change-verification

Run $code-change-verification before marking work complete when changes affect runtime code, tests, or build/test behavior.

Run it when you change:

  • src/agents/ (library code) or shared utilities.
  • tests/ or add or modify snapshot tests.
  • examples/.
  • Build or test configuration such as pyproject.toml, Makefile, mkdocs.yml, docs/scripts/, or CI workflows.

You can skip $code-change-verification for docs-only or repo-meta changes (for example, docs/, .agents/, README.md, AGENTS.md, .github/), unless a user explicitly asks to run the full verification stack.

Treat $code-change-verification as the post-review final gate, not as an iterative review check. When $implementation-final-review applies, satisfy its clean-review condition before starting the repository-wide format, lint, typecheck, and test stack. Immediately before starting that stack, use available read-only task or process evidence to check for another broad test, typecheck, build, examples, or integration command already running on the same host. When concrete contention is visible, keep making progress on review, remediation, evidence preparation, or focused checks and defer the broad stack until capacity is available. Do not add a repository lock, host-wide mutex, sentinel file, or user-triggered finalize step. Lack of host telemetry alone is not a blocker.

Read the full file on GitHub · 330 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. yesterday First seen · 330 lines · 8,006 tokens per session scan A 337fbeca5f88

Subscribe to this mod's changes

openai-agents-python AGENTS.md is an instructions file published in the GitHub repository openai/openai-agents-python (29,075 stars, last pushed 4d ago), licensed MIT. It adds 8,006 tokens to every session, about $0.0400 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.