CI/CD for AI Agents on Microsoft Foundry
Building and deploying AI agents reliably to production environments often presents significant hurdles, particularly concerning version control, quality assurance, multi-environment promotion, and enterprise governance. Microsoft Foundry aims to mitigate these challenges by offering a comprehensive platform for managing the entire lifecycle of AI agents.
Unlike conventional software CI/CD pipelines that primarily rely on test pass/fail criteria, AI agent pipelines demand an additional layer of evaluation-driven quality gates. Before an agent version can advance to the next environment, it must successfully pass rigorous evaluations across three critical categories: quality (e.g., answer correctness, task completion, hallucination rate), safety (e.g., grounded responses, policy compliance), and performance (e.g., token usage, response latency).
Another fundamental difference lies in the deployment unit. Instead of deploying a standalone binary or container image, Foundry deploys an 'agent version.' This immutable artifact encapsulates the model selection, system instructions, tool definitions, and configuration, enabling consistent and auditable deployments across development, testing, and production environments.
Microsoft Foundry also integrates robust governance and responsible AI features directly into the platform. This includes role-based access control (RBAC) per environment, ensuring that only authorized personnel or service principals can promote agent versions. Furthermore, the Foundry control plane maintains a comprehensive agent registry and audit trail, recording deployment details for compliance and traceability.
For programmatic control within CI/CD scripts, the Azure AI Projects SDK is the recommended approach, facilitating deterministic and scriptable deployments. The platform also provides reference architectures and pipeline YAMLs for both GitHub Actions and Azure DevOps, demonstrating how to implement a four-stage pipeline (CI Build, CI Evaluate, CD Dev, CD Test, CD Production) with appropriate approval gates for each environment.
Read original source