Gradio is a Python package for building web interfaces around machine learning models, APIs, or ordinary Python functions. It is used by developers and data scientists to create and share interactive demos without writing frontend code.
Borrowing it
Nothing to install: this file belongs to gradio-app/gradio. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/gradio-app/gradio/main/AGENTS.mdgit clone --depth 1 https://github.com/gradio-app/gradioWrote 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.
[](https://agentmods.dev/instructions/gradio-app/gradio/agents-md)<a href="https://agentmods.dev/instructions/gradio-app/gradio/agents-md"><img src="https://agentmods.dev/badge/instructions/gradio-app/gradio/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.
<a href="https://agentmods.dev/instructions/gradio-app/gradio/agents-md"><img src="https://agentmods.dev/badge/instructions/gradio-app/gradio/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00893 | $0.00893 |
| Opus 5.5 | $0.00357 | $0.00357 |
| Sonnet 5.5 | $0.00179 | $0.00179 |
| Haiku 4.5 | $0.00089 | $0.00089 |
Grade A, and why
gradio 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Instructions for AI coding agents working on this repository.
Repository Structure
gradio/— Python source for the Gradio library (backend)gradio/components/— all Gradio componentsgradio/cli/— CLI commands (gradio,gradio cc,gradio skills, etc.)
client/python/— thegradio_clientPython client libraryclient/js/— the@gradio/clientJavaScript client libraryjs/— frontend code (Svelte/TypeScript), with each component in its own subdirectorytest/— Python backend tests (pytest)js/spa/test/— browser/Playwright tests (*.spec.ts)demo/— example Gradio appsguides/— written guides and tutorials for the website
Pull Request Rules
Follow these rules when creating or contributing to pull requests:
-
Target an issue. Every non-trivial PR should reference an existing GitHub issue. If one doesn't exist, create it first. PRs without a linked issue may be closed.
-
Use the PR template. Fill out every section of
.github/PULL_REQUEST_TEMPLATE.md, including:- A clear description of the change
- The AI disclosure checkbox (see below)
- The linked issue (
Closes: #NNN)
-
AI disclosure is mandatory. If AI was used in any non-trivial way (drafting code, writing the PR description, etc.), you must disclose this in the PR template. Trivial autocomplete does not need to be disclosed. All AI-generated code must be self-reviewed.
-
Format your code before pushing.
- Backend:
bash scripts/format_backend.sh - Frontend:
bash scripts/format_frontend.sh
- Backend:
-
Tests must pass. PRs are only merged when CI is green. Run backend tests locally with
bash scripts/run_backend_tests.sh. -
PR title and description should be clear and written in English. The title should concisely describe what the PR does. The description should explain why.
-
Don't write changeset files. A GitHub Action (committing as
gradio-pr-bot) adds.changeset/*.mdto your branch from the PR title, so a good title is all that's needed. The bot leaves an existing changeset alone, so a hand-written one silently replaces your title in the changelog.- Reviewers (human or AI): a
.changeset/*.mdfile in a PR is expected, because the CI adds one to every PR. Don't flag it or ask for it to be removed. This rule is about what authors should do, not something to check in review.
- Reviewers (human or AI): a
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.
- 1mo ago Changed · +1 lines · +72 tokens per session ea492860c394
- 2mo ago First seen · 73 lines · 821 tokens per session scan A 975541e72c77
gradio AGENTS.md is an instructions file published in the GitHub repository gradio-app/gradio (44,010 stars, last pushed yesterday), licensed Apache-2.0. It adds 893 tokens to every session, about $0.0036 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.
gradio AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| gradio AGENTS.mdgradio-app/gradio | Instructions file | 44k | yesterday | Apache-2.0 | A | 893 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |