ai-gateway
AGENTS.md17 starsChanged 15 days agoMITView on GitHub
Guidance for coding agents (GitHub Copilot, Claude Code, Codex, Cursor, and others) working in this repository. Run these from labs/ (Node.js 20 or later): - Each lab's README.md is the single source of truth for the site, GitHub, and the agent skill. Never edit docs/, the <!-- gh:begin --> … <!-- gh:end --> regions, or lines that end with <!-- gh -->. - Follow labs/AUTHORING.md for the metadata, lab anatomy, tracks, directives, writing style, Bicep, runtime calls, notebooks, and release…
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Azure/aigatewayword for word, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Azure/aigateway★ 17100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,196 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- azure-ai-gateway-labsSkill
- feedback-ai-gatewaySkill
- manage-ai-gatewaySkill
- migrate-apimSkill
- use-ai-gatewaySkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 0 are common, 4 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Run these from labs/ (Node.js 20 or later):
- Very specific: line 33
Follow labs/AUTHORING.md for the metadata, lab anatomy, tracks, directives, writing style, Bicep, runtime calls, notebooks, and release …
- Very specific: line 35
Never invent portal labels, CLI flags, JSON fields, or outputs.
- Distinctive: line 37
Never print, commit, or screenshot keys, tokens, or connection strings.
- Very specific: line 39
Commit only the sources under labs/.
- Distinctive: line 43
When the user asks to update the labs (or to check for new AI Gateway releases, or to align the labs with the latest release), follow these …
- Distinctive: line 63
If every release is covered, say so.
- Very specific: line 86
Use the real outputs and error messages in the checkpoints and in the lab's section of labs/TROUBLESHOOTING.md.
- Very specific: line 92
Add a ## <Month D, YYYY> section at the top of labs/RELEASE-NOTES.md, as described in Release notes:
- Very specific: line 117
Run npm run sync && npm run build && npm run check, and fix every warning.
- Very specific: line 120
Commit labs/ and the root README.md with a message that names the product release, then push.
- Very specific: line 122
If the user publishes the Static Web App, run npm run deploy:swa and open /release-notes/ on it.
- Distinctive: line 123
Delete the verification resources (gateways and Foundry accounts, purging soft-deleted ones) and their deployment history.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Guidance for coding agents (GitHub Copilot, Claude Code, Codex, Cursor, and others) working in this repository.
Repository map
| Path | What it is | Edit? |
labs/ | The Azure AI Gateway hands-on labs: one folder per lab (NN-slug/README.md, infra/, terraform/, optional notebook, plus the unnumbered quickstart/), the site engine (site/, build.mjs), tools, shared assets, and the azure-ai-gateway-labs agent skill | Yes. Read labs/AUTHORING.md first |
labs/RELEASE-NOTES.md | The labs release notes, one section per product release | Yes |
docs/ | The generated labs site, ignored by git. On main, .github/workflows/labs-pages.yml builds it from labs/ and publishes it to GitHub Pages | Never. npm run build writes it |
skills/, commands/, .claude-plugin/, .cursor-plugin/, .github/plugin/, gemini-extension.json | The coding-agent plugin: developer integration, gateway administration, migration from API Management, and local feedback packaging | Only when asked |
cli/ | Installation guidance and the command reference for the published az aigateway CLI extension | Only when asked |
tools/ | Standalone command line tools. tools/migrate-apim/ inventories the AI assets of an Azure API Management instance for migration to AI Gateway | Only when asked. Read tools/migrate-apim/README.md first |
samples/ | The samples catalog | Only when asked |
Labs essentials
Run these from labs/ (Node.js 20 or later):
npm install
npm run releases # product releases, and which ones labs/RELEASE-NOTES.md doesn't cover yet
npm run sync # refresh the generated GitHub navigation in the READMEs and the skill catalog
npm run build # sync, then write ../docs
npm run check # strict build: must finish with zero warnings before you commit
npm run serve # preview at http://localhost:4173/aigateway/
npm run deploy:swa # optional: publish to the swa-ai-gateway-labs Static Web App in rg-ai-gateway-labs- Each lab's
README.mdis the single source of truth for the site, GitHub, and the agent skill. Never editdocs/, the<!-- gh:begin -->…<!-- gh:end -->regions, or lines that end with<!-- gh -->. - Follow
labs/AUTHORING.mdfor the metadata, lab anatomy, tracks, directives, writing style, Bicep, runtime calls, notebooks, and release notes. - Never invent portal labels, CLI flags, JSON fields, or outputs. Verify every step on a live gateway first: the
labs create the
Microsoft.ApiManagement/aigatewaysresource type with API version2025-09-01-preview. - Never print, commit, or screenshot keys, tokens, or connection strings. Delete the Azure resources you create to verify a change.
- Commit only the sources under
labs/.docs/is ignored by git; the Publish labs site workflow builds it.
Update the labs
When the user asks to update the labs (or to check for new AI Gateway releases, or to align the labs with the latest release), follow these steps.
1. Find the new product releases
cd labs
npm run releasesThe tool reads the changelog from https://ai.gateway.azure.com/docs/ and marks every release that
RELEASE-NOTES.md doesn't cover yet with ✗. For each one it prints the changelog entry and the full release page,
including the product docs links and the URLs of the product screenshots. The docs site is a single-page app, so
fetching a docs URL directly returns no content; use the tool instead:
npm run releases -- --page /docs/<page>prints any product docs page, and-- --pageslists them.npm run releases -- --save-bundle /tmp/aigw-docs.jssaves the docs bundle. Search it for the exact portal labels, hints, and error messages of a feature, for examplegrep -o '.\{100\}Supported MCP versions.\{200\}' /tmp/aigw-docs.js.
If every release is covered, say so. Then only refresh what the user asked for, such as changed portal labels or newer models.
2. Map every change to a lab
For each product change, search the labs (grep -il "<feature>" labs/[0-9][0-9]-*/README.md labs/quickstart/README.md) and
labs/catalog.json, and choose one action:
| Status | When | What to do |
| ✅ Covered | A lab already teaches it as released | Nothing, beyond checking that the labels still match |
| ✏️ Update | It extends or changes a feature that a lab teaches: a new option, a new wizard step, a renamed label | Update every affected track (portal, CLI, REST, Bicep, Terraform, code, notebook), the checkpoints, the lab's section in labs/TROUBLESHOOTING.md, next steps, and the metadata (duration, tags, objectives) |
| 🆕 New lab | A new use case with its own outcome and at least 15 minutes of hands-on work | Use the next free number, follow the lab anatomy in AUTHORING.md, and add it to catalog.json (paths, usecases, shortTitles) and to the home page's architecture map (HX in labs/site/templates.mjs). Add a diagram in labs/tools/diagrams/ and, when it helps, a widget |
| ➖ Not covered | It can't be practiced, or it's too minor for a lab | Say so in the release notes |
Show the user the mapping as a table and confirm it before you write, unless they asked you to go ahead.
3. Verify on a live gateway
Deploy a throwaway gateway with lab 01's Bicep, plus what the
labs need (for example a Foundry account with the lab models), or run azd up in the lab's folder. Then run every new or changed step: CLI and REST
calls, az bicep build and a real deployment of each changed template, terraform apply (then a no-changes
terraform plan -detailed-exitcode and terraform destroy) of each changed Terraform configuration, scripts, code samples, and notebooks.
Use the real outputs and error messages in the checkpoints and in the lab's section of
labs/TROUBLESHOOTING.md. Check portal steps in the live portal at
https://ai.gateway.azure.com and capture new screenshots into labs/assets/screens/.
4. Write the release notes
Add a ## <Month D, YYYY> section at the top of labs/RELEASE-NOTES.md, as described in
Release notes:
- An
### <title>heading that matches the product changelog title. - A one-sentence summary and a link to
https://ai.gateway.azure.com/docs/releases#release-<YYYY-MM-DD>. - The mapping table, linking to the lab sections.
- The date added to the
**Releases:**jump line.
npm run releases -- --check must then exit with code 0.
5. Update the references
labs/README.md: hand-written text that mentions the labs.- The root
README.md: the lab count and the use-case list. labs/quickstart/: when provisioning, the portal flow, the default model, or the runtime URL changes, update its portal, Azure CLI, Bicep + azd, and Terraform tracks (keep them paste-ready for Cloud Shell once the One-time setup card is done), its azd template (azure.yamlandinfra/, which the track runs fromlabs/quickstartin the clone of the repo; test it withazd upandazd down --purge --force), and the condensed output of a real CLI run that the home page shows (homePageinlabs/site/templates.mjs).labs/AUTHORING.md: the lists of screens, diagrams, and widgets.labs/skills/azure-ai-gateway-labs/SKILL.md: the hand-written facts, when runtime behavior or lab conventions change.npm run syncregenerates its catalog.
6. Build, check, and ship
- Run
npm run sync && npm run build && npm run check, and fix every warning. - Preview with
npm run serve. Check the release notes page, the What's new pill on the home page, and each changed lab in light and dark themes and at mobile width. - Commit
labs/and the rootREADME.mdwith a message that names the product release, then push. Once the change merges tomain, the Publish labs site workflow builds the site and publishes it to GitHub Pages. - If the user publishes the Static Web App, run
npm run deploy:swaand open/release-notes/on it. - Delete the verification resources (gateways and Foundry accounts, purging soft-deleted ones) and their deployment history.
Finish with a short report: the releases handled, the labs added or updated, and any product change that no lab covers yet.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

