agentleFS
Microsoft AzureKnown publisherAzure/aigateway/AGENTS.md

aigateway

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

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. Azure/ai-gateway★ 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.

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
  1. Very specific:

    Run these from labs/ (Node.js 20 or later):

    line 19
  2. Very specific:

    Follow labs/AUTHORING.md for the metadata, lab anatomy, tracks, directives, writing style, Bicep, runtime calls, notebooks, and release …

    line 33
  3. Very specific:

    Never invent portal labels, CLI flags, JSON fields, or outputs.

    line 35
  4. Distinctive:

    Never print, commit, or screenshot keys, tokens, or connection strings.

    line 37
  5. Very specific:

    Commit only the sources under labs/.

    line 39
  6. Distinctive:

    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 …

    line 43
  7. Distinctive:

    If every release is covered, say so.

    line 63
  8. Very specific:

    Use the real outputs and error messages in the checkpoints and in the lab's section of labs/TROUBLESHOOTING.md.

    line 86
  9. Very specific:

    Add a ## <Month D, YYYY> section at the top of labs/RELEASE-NOTES.md, as described in Release notes:

    line 92
  10. Very specific:

    Run npm run sync && npm run build && npm run check, and fix every warning.

    line 117
  11. Very specific:

    Commit labs/ and the root README.md with a message that names the product release, then push.

    line 120
  12. Very specific:

    If the user publishes the Static Web App, run npm run deploy:swa and open /release-notes/ on it.

    line 122
  13. Distinctive:

    Delete the verification resources (gateways and Foundry accounts, purging soft-deleted ones) and their deployment history.

    line 123

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

Guidance for coding agents (GitHub Copilot, Claude Code, Codex, Cursor, and others) working in this repository.

Repository map

PathWhat it isEdit?
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 skillYes. Read labs/AUTHORING.md first
labs/RELEASE-NOTES.mdThe labs release notes, one section per product releaseYes
docs/The generated labs site, ignored by git. On main, .github/workflows/labs-pages.yml builds it from labs/ and publishes it to GitHub PagesNever. npm run build writes it
skills/, commands/, .claude-plugin/, .cursor-plugin/, .github/plugin/, gemini-extension.jsonThe coding-agent plugin: developer integration, gateway administration, migration from API Management, and local feedback packagingOnly when asked
cli/Installation guidance and the command reference for the published az aigateway CLI extensionOnly when asked
tools/Standalone command line tools. tools/migrate-apim/ inventories the AI assets of an Azure API Management instance for migration to AI GatewayOnly when asked. Read tools/migrate-apim/README.md first
samples/The samples catalogOnly 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.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 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/aigateways resource type with API version 2025-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 releases

The 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 -- --pages lists them.
  • npm run releases -- --save-bundle /tmp/aigw-docs.js saves the docs bundle. Search it for the exact portal labels, hints, and error messages of a feature, for example grep -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:

StatusWhenWhat to do
✅ CoveredA lab already teaches it as releasedNothing, beyond checking that the labels still match
✏️ UpdateIt extends or changes a feature that a lab teaches: a new option, a new wizard step, a renamed labelUpdate 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 labA new use case with its own outcome and at least 15 minutes of hands-on workUse 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 coveredIt can't be practiced, or it's too minor for a labSay 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.yaml and infra/, which the track runs from labs/quickstart in the clone of the repo; test it with azd up and azd down --purge --force), and the condensed output of a real CLI run that the home page shows (homePage in labs/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 sync regenerates its catalog.

6. Build, check, and ship

  1. Run npm run sync && npm run build && npm run check, and fix every warning.
  2. 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.
  3. Commit labs/ and the root README.md with a message that names the product release, then push. Once the change merges to main, the Publish labs site workflow builds the site and publishes it to GitHub Pages.
  4. If the user publishes the Static Web App, run npm run deploy:swa and open /release-notes/ on it.
  5. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.