Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Deploy, evaluate, and manage AI agents end-to-end on Microsoft Azure AI Foundry
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
foundry-agent/observe/references/cicd-monitoring.md
1# Step 6 — CI/CD Evals & Continuous Production Monitoring23After confirming the final agent version through the observe loop, present two complementary monitoring options. The user may choose one, both, or neither.45## Option 1 — CI/CD Pipeline Evaluations (Pre-Deploy Gate)67*"Would you like to add automated evaluations to your CI/CD pipeline so every deployment is evaluated before going live?"*89CI/CD evals run batch evaluations as part of your deployment pipeline, catching regressions **before** they reach production.1011If yes, generate a GitHub Actions workflow (for example, `.github/workflows/agent-eval.yml`) that:12131. Triggers on push to `main` or on pull request142. Accepts a metadata-file input or environment variable such as `FOUNDRY_METADATA_FILE` and defaults it to `.foundry/agent-metadata.yaml`153. Reads evaluation-suite definitions from the selected metadata file (for example, `.foundry/agent-metadata.prod.yaml` for prod CI)164. Reads evaluator definitions from `.foundry/evaluators/` and test datasets from `.foundry/datasets/`175. Runs `evaluation_agent_batch_eval_create` against the newly deployed agent version186. Fails the workflow if any evaluator score falls below the configured thresholds for the environment and evaluation suite resolved from that metadata file197. Posts a summary as a PR comment or workflow annotation2021Use repository secrets for the selected environment's project endpoint and Azure credentials, and keep the metadata filename explicit in the workflow so prod rollouts do not depend on the local/dev default file. Confirm the workflow file with the user before committing.2223## Option 2 — Continuous Production Monitoring (Post-Deploy)2425*"Would you like to set up continuous evaluations to monitor your agent's quality in production?"*2627Continuous evaluation uses Foundry-native MCP tools to automatically assess agent responses on an ongoing basis — no additional CI/CD pipeline setup is needed for this option. This catches regressions that emerge **after** deployment from changing data, user patterns, or upstream service drift.2829### Enable Continuous Evaluation3031Use the [continuous evaluation reference](continuous-eval.md) to configure monitoring. The workflow:32331. **Check existing config** — call `continuous_eval_get` to see if monitoring is already active.342. **Select evaluators** — recommend starting with the same evaluators used in batch evals for consistent comparison:35- **Quality evaluators** (require `deploymentName`): e.g., groundedness, coherence, relevance, task_adherence36- **Safety evaluators**: e.g., violence, indirect_attack, hate_unfairness373. **Enable** — call `continuous_eval_create` with the selected evaluators. The tool auto-detects agent kind and configures the appropriate backend (real-time for prompt agents, scheduled for hosted agents).384. **Confirm** — present the returned configuration to the user.3940### Acting on Monitoring Results4142Monitoring is only complete when score drops trigger investigation and remediation.4344For instructions on how to read evaluation scores, triage regressions, and verify fixes, see [Acting on Results](continuous-eval.md#acting-on-results).4546The observe loop does not end at deployment. Continuous monitoring closes the loop: **observe → optimize → deploy → monitor → observe**. Always offer to set up monitoring after completing an optimization cycle.4748## Reference4950- [Azure AI Foundry Cloud Evaluation](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/develop/cloud-evaluation)51- [Hosted Agents](https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/hosted-agents)52- [Continuous Evaluation Reference](continuous-eval.md)53