Deploy an Azure SRE Agent, break a sample app, and watch it diagnose and fix the issue. ~40 minutes.
| Resource | Purpose |
|---|---|
| SRE Agent | AI agent with managed identity, knowledge base, custom agents |
| Grubify App | Sample food ordering app (API + Frontend on Container Apps) |
| Log Analytics + App Insights | Monitoring and log storage |
| Azure Monitor Alert | HTTP 5xx alert → auto-triggers agent investigation |
| Container Registry | Grubify container images |
| Managed Identity | Reader + Monitoring Reader + Log Analytics Reader RBAC |
| Component | Purpose |
|---|---|
| Knowledge Base | HTTP error runbook, app architecture docs |
| incident-handler | Investigates using logs, KQL, runbooks |
| code-analyzer | Same + source code search, creates GitHub issues |
| issue-triager | Triages customer issues with labels and comments |
| Response Plan | Routes alerts to custom agents autonomously |
| GitHub OAuth | Code search + issue management (optional) |
| Scheduled Task | Triage issues every 12 hours (optional) |
| Global Tools | DevOps + Python plotting enabled |
| # | Scenario | Persona | GitHub Required? |
|---|---|---|---|
| 1 | Break app → Agent investigates logs + remediates | IT Operations | No |
| 2 | Same break → Agent finds root cause in source code + creates GitHub issue | Developer + IT | Yes |
| 3 | Triage customer issues → classify, label, comment | Workflow Automation | Yes |
| Tool | macOS | Windows |
|---|---|---|
| Azure CLI 2.60+ | brew install azure-cli |
winget install Microsoft.AzureCLI |
| Azure Developer CLI 1.9+ | brew install azd |
winget install Microsoft.Azd |
| Git 2.x | brew install git |
winget install Git.Git |
| Python 3.10+ | brew install python3 |
winget install Python.Python.3.12 |
Windows: After installing Python, disable Store aliases: Settings → Apps → App execution aliases → turn OFF
python.exeandpython3.exe
- Active Azure subscription with Owner role
- Register:
az provider register -n Microsoft.App --wait
- GitHub account — fork dm-chelupati/grubify for Scenarios 2 & 3
The setup.sh script handles everything: login, deploy, and configure.
macOS / Linux:
git clone https://github.com/microsoft/sre-agent.git
cd sre-agent/labs/starter-lab
bash scripts/setup.shWindows:
git clone https://github.com/microsoft/sre-agent.git
cd sre-agent\labs\starter-lab
"C:\Program Files\Git\bin\bash.exe" scripts/setup.shThe script will:
- Check prerequisites
- Sign in to Azure (
--use-device-code) - Sign in to Azure Developer CLI
- Register resource providers
- Ask for GitHub username (optional)
- Deploy infrastructure (~5-8 min)
- Configure the SRE Agent
If you prefer to run each step yourself:
az login --use-device-code
azd auth login --use-device-code
az provider register -n Microsoft.App --wait
azd env new sre-lab
azd env set AZURE_LOCATION eastus2
# Optional: azd env set GITHUB_USER <your-username>
azd up
bash scripts/post-provision.shOpen sre.azure.com → Full Setup → verify:
- Code: 1 repository (if GitHub connected)
- Incidents: Connected to Azure Monitor
- Azure resources: 1 resource group
- Knowledge sources: runbook files indexed
Break the app and ask the agent to investigate using logs and knowledge base.
# macOS/Linux
bash scripts/break-app.sh
# Windows
"C:\Program Files\Git\bin\bash.exe" scripts/break-app.sh- Open the Grubify frontend — try adding to cart (it's broken!)
- Start a new chat → type
/→ select any custom agent - Send:
The Grubify API is not responding — specifically the "Add to Cart" is failing. Can you investigate, find the root cause, and create a GitHub issue with your detailed findings? - Agent investigates: searches memory, queries KQL, references runbook, identifies memory leak
- Ask:
Can you mitigate this issue? - Verify recovery in browser
Automated Alert: After 10-15 min, check Activities → Incidents — Azure Monitor may have fired an alert and the agent investigated autonomously.
Same break as Scenario 1, but the agent also:
- Searches Grubify source code for the root cause
- Finds exact file:line causing the memory leak
- Creates a GitHub issue with code references and fix suggestion
- May create a PR with the fix
If the agent can't create an issue, nudge it:
Use the GitHub API to create the issue if the direct tool isn't working
# Create sample customer issues (uses gh CLI, no PAT needed)
bash scripts/create-sample-issues.sh <your-user>/grubify
# Or Windows:
"C:\Program Files\Git\bin\bash.exe" scripts/create-sample-issues.sh <your-user>/grubify- Go to Builder → Scheduled tasks → triage-grubify-issues → Run task now
- Check
github.com/<your-user>/grubify/issues— each[Customer Issue]gets:- Classification: Bug, Performance, Feature Request, Question
- Labels:
bug,api-bug,severity-high, etc. - Triage comment from the agent
Try these prompts in a new chat (no /agent needed — the meta agent handles these):
What is the public endpoint URL for the Grubify frontend container app?
Show me the CPU and memory usage trends for the Grubify container app over the last hour
Check if there are any Azure Advisor recommendations for my resource group
What recent changes were made to resources in my resource group? Check the Activity Log.
Using the http-500-errors runbook, walk me through all the diagnostic KQL queries
and show me the results for the Grubify app
Remember that our on-call rotation is: Monday-Wednesday is Team Alpha,
Thursday-Sunday is Team Beta. The escalation path is: on-call → team lead → VP Engineering.
Then later ask: Who is on call today?
azd down --purge| Issue | Fix |
|---|---|
| Python not found (Windows) | Disable Store aliases, reopen CMD |
| 405 on response plan | Wait 30s, run: bash scripts/post-provision.sh --retry |
| GitHub issue creation fails | Nudge: "Use the GitHub API to create the issue" |
az login uses wrong account |
Run az logout then az login --use-device-code |
| Resource | Link |
|---|---|
| SRE Agent Portal | sre.azure.com |
| Documentation | sre.azure.com/docs |
| Blog | aka.ms/sreagent/blog |
| Labs | aka.ms/sreagent/lab |
| Pricing | aka.ms/sreagent/pricing |
| Support | aka.ms/sreagent/github |