Building-AI-Agents-From-Zero-To-Production
AGENTS.md188 starsChanged 5 months agoMITView on GitHub
Guidance for AI coding agents (and human contributors) working in this repository. If you are an automated agent making changes here, read this file first and follow it. Building AI Agents from Zero to Production is a Microsoft learning course. It teaches developers to design, build, evaluate, deploy and operate AI agents on Microsoft Foundry using the Microsoft Agent Framework (MAF). The content is organised as a sequence of lessons, each with a README.md and runnable Python samples. Root docs:…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repository24 other files it gives its agents.
- translations/bn/AGENTS.mdAGENTS.md
- translations/cs/AGENTS.mdAGENTS.md
- translations/da/AGENTS.mdAGENTS.md
- translations/en/AGENTS.mdAGENTS.md
- translations/es/AGENTS.mdAGENTS.md
- translations/hu/AGENTS.mdAGENTS.md
- translations/id/AGENTS.mdAGENTS.md
- translations/ko/AGENTS.mdAGENTS.md
- translations/lt/AGENTS.mdAGENTS.md
- translations/mr/AGENTS.mdAGENTS.md
- translations/ms/AGENTS.mdAGENTS.md
- translations/nl/AGENTS.mdAGENTS.md
- translations/pa/AGENTS.mdAGENTS.md
- translations/pt-BR/AGENTS.mdAGENTS.md
- translations/pt-PT/AGENTS.mdAGENTS.md
- translations/th/AGENTS.mdAGENTS.md
- translations/tl/AGENTS.mdAGENTS.md
- translations/vi/AGENTS.mdAGENTS.md
- agent-evaluationSkill
- foundry-agent-basicsSkill
- hosted-agent-deploymentSkill
- mcp-integrationSkill
- microsoft-toolboxSkill
- multi-agent-a2aSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 27
Never commit secrets: Only *.env.example files are tracked.
- Very specific: line 32
No deprecated models: Use gpt-5.1 for chat/eval and gpt-5-codex for coding.
- Very specific: line 33
Do not introduce gpt-4o, gpt-4.1, or any retired model, and do not use *GitHub Models* (retiring July 30, 2026) — all models are served …
- Distinctive: line 86
Write focused commits with clear, imperative messages.
- Very specific: line 91
Do not commit generated caches, virtual environments, or .env files (all git-ignored).
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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 AI coding agents (and human contributors) working in this repository. If you are an automated agent making changes here, read this file first and follow it.
What this repository is
Building AI Agents from Zero to Production is a Microsoft learning course. It teaches developers
to design, build, evaluate, deploy and operate AI agents on Microsoft Foundry using the
Microsoft Agent Framework (MAF). The content is organised as a sequence of lessons, each with a
README.md and runnable Python samples.
lesson-1-agent-design/ Use case + how to design effective agents
lesson-2-agent-development/ Build specialised agents with MAF (multiple runnable samples)
lesson-3-agent-evals/ Evaluations and observability
lesson-4-agentdeployment/ Deploy a hosted agent + OpenAI ChatKit front end
lesson-5-hosted-agents-production/ Hosted Agents vs Capability Hosts, BYO storage, governance
lesson-6-toolbox/ Microsoft Toolbox: define + govern tools centrally
lesson-7-multi-agent-a2a/ Multi-agent orchestration over the A2A protocolRoot docs: README.md (start here), MIGRATION-GUIDE.md (SDK migration detail), CHANGELOG.md.
Golden rules
- Never commit secrets. Only
*.env.examplefiles are tracked; real.envfiles are git-ignored. Do not hardcode endpoints, keys, tokens, or connection strings in samples or docs. - Do not touch
translations/ortranslated_images/. These are generated automatically by a translation GitHub Action. Never hand-edit them; make source changes in the top-level lesson files only. - No deprecated models. Use
gpt-5.1for chat/eval andgpt-5-codexfor coding. Do not introducegpt-4o,gpt-4.1, or any retired model, and do not use GitHub Models (retiring July 30, 2026) — all models are served through Microsoft Foundry. - Use the current SDK surface. Samples target
agent-framework(pinned inrequirements.txt) withFoundryChatClientand the Responses API. Do not reintroduce the olderAzureAIClient/AzureAIAgentClient/AzureOpenAIChatClientpatterns. - Keep terminology current: Microsoft Foundry (not "Azure AI Foundry"), Microsoft Agent Framework, Hosted Agents, Capability Hosts, Microsoft Toolbox, MCP / Hosted MCP, A2A.
Setup
python -m venv .venv
# Windows: .venv\Scripts\Activate.ps1
# macOS/Linux: source .venv/bin/activate
pip install -r requirements.txt
az login # samples authenticate with your developer identity
cp .env.example .env # then fill in your Foundry project endpoint + modelRequirements: Python 3.12+, the Azure CLI, and access to a Microsoft Foundry project
with a deployed GPT-5-series model. Each lesson README lists its own prerequisites and the env vars
it needs (see the lesson-level .env.example where present).
Running samples
Most lesson-2 samples launch a local DevUI on a dedicated port (for example 8090–8096); the A2A
server in lesson 7 listens on port 9000. Check each sample's docstring/README for the exact command
and port. Because samples call live Foundry endpoints, they need a valid .env and az login.
Validating changes
There is no unit-test suite; validation is static + live:
- Static gate (must pass before commit): byte-compile every sample.
On Windows PowerShell:python -m py_compile $(git ls-files '*.py')git ls-files '*.py' | ForEach-Object { python -m py_compile $_ } - Markdown links: the CI
staticjob runsmarkdown-link-check(config:.github/workflows/markdown-link-check-config.json). Verify any new external links resolve (HTTP 200). - Smoke test:
.github/workflows/smoke-test-hosted-agent.ymlruns the AI Smoke Test action against a deployed hosted agent (workflow_dispatch, OIDC). Live agent runs require Azure access.
CI (static job) auto-discovers .py files, so new samples are covered without editing the
workflow. Do not commit code that fails py_compile.
Commit conventions
- Write focused commits with clear, imperative messages.
- Include the co-author trailer on agent-assisted commits:
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> - Do not commit generated caches, virtual environments, or
.envfiles (all git-ignored).
Where to make specific changes
| Change | Location |
| Course narrative / lesson text | lesson-*/README.md (source only — never translations/) |
| Runnable code | lesson-*/**.py, setup_vector_store.py |
| Dependencies | requirements.txt (keep versions pinned) |
| Env var documentation | .env.example, lesson-level .env.example |
| CI / static gate | .github/workflows/ |
| Course skills for AI assistants | .github/skills/ |
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.

