If your team builds AI agents in Azure AI Foundry , you have probably lived this story:
Someone tweaks a prompt in the portal "just to test something".
A week later the agent behaves differently and nobody knows why.
There is no history, no review and no easy way back.
The "dev" agent and the "prod" agent quietly drifted apart months ago.
Prompts, model choices, temperatures and tool definitions are code . They change behaviour in production just as much as a line of TypeScript does. So we started treating them that way.
This post walks through the setup: one Git repo as the single source of truth for every agent across several Foundry projects, where the only way to change production is a reviewed pull request .
The core idea
Every agent is a folder of plain files. A change reaches Foundry only through a reviewed PR. Completing the PR deploys it automatically. The PR review is the approval.
That's it. Everything else is tooling that makes this safe and painless.
1.β¦