When infrastructure fails or drifts from its declared state, most teams still fall back on a slow, fragmented loop - open a dashboard, dig through logs, file a change request, and wait. Agentic infrastructure drift remediation offers a fundamentally different approach: compress that loop with a natural-language CLI, an AI coding assistant, and the governance guardrails you already have in place. For platform engineers building self-service infrastructure at scale, this pattern is worth understanding in detail.
Main insights
- Manual incident triage across metrics, logs, and ITSM tickets is slow. A CLI that accepts plain-language questions can answer "what failed and what drifted?" directly from the IaC platform.
- Guardrails stay intact. The agent inherits the role-based access control (RBAC) policies already configured on the platform, so an AI assistant cannot bypass them.
- Workflows model an "environment of environments," with dependency ordering, shared variables, and custom CI/CD flows that make complex deployments repeatable.
- Agentic remediation does not remove people from the loop. Approval gates, policy checks, and human review remain part of the design.
Artem Artyunov is Director of Solutions Architecture at env zero, where he builds features, influences product direction, and works with customers through intense troubleshooting scenarios. In this talk, he walks through how a natural-language CLI paired with an AI coding assistant can dramatically shorten the path from alert to action - without sacrificing governance.
You can watch the full discussion here if you missed it.
The problem: Slow, fragmented incident response
Artem opens by describing what resolution looks like today. When an environment fails or drifts, you typically open a metrics dashboard in an APM tool, pull up logs, piece together events around the time of the failure, and then request a change through an ITSM tool. A large share of the industry relies on ITSM for this, which means opening a change request, waiting for someone to act on it, and hoping the fix lands cleanly.
The delays are rarely technical. As Artem puts it, "Your request goes out there and it waits in the ether" - because the people who approve or perform the work are often in meetings or focused on something else.
The talk frames the alternative around three questions you can ask the platform directly:
- Which three environments failed most critically in the last 30 days?
- Which resources have drifted from the declared state?
- What is the safe remediation for each?
That shift - from navigating dashboards to querying a platform in plain language - is the core of the agentic pattern Artem demonstrates.
Building blocks: Environments and workflows
To understand the agentic layer, you first need the model underneath it. In env0, an environment is a deployment of infrastructure as code. The platform supports a dozen or so runtimes, including Terraform, OpenTofu, CloudFormation, and Pulumi.
A workflow is what Artem calls "an environment of environments." Each child environment is treated separately, so you can point different environments at different repositories, branches, or even different version control systems - GitHub, Bitbucket, and GitLab in the same workflow, if that reflects your reality.
Several capabilities make workflows useful at scale:
- Custom flows: A single CI/CD-driven YAML file lets you add gating conditions at each deployment stage - smoke tests that confirm you are authenticated against the right GCP project or Azure subscription, with output shown in real time during the run.
- Policy and approval gates: The platform respects your existing standard operating procedures, whether that means Open Policy Agent (OPA), Checkov, or other CLI-based scanning tools. Plans can be rejected before apply - for example, if a deployment exceeds a budget threshold.
- Blueprints: Templates (Artem calls them stencils) capture the IaC runtime, version control settings, and variables, so every deployment starts from a consistent baseline.
- Input and output variables: Child environments can pass values to one another. A network environment can output a subnet ID, and a downstream compute environment can consume it automatically - no manual re-entry required.
- Module registry: You can keep modules in private repositories, including a monorepo, filter by tag prefix, and expose them through a single API endpoint. Consumers use the modules without ever needing access to the underlying repositories.
Artem is candid about fit. For a single VM with a persistent disk, workflows may be overkill. They pay off when an application spans multiple cohesive resources - an account or project, several Kubernetes clusters, and virtual machines - where manual coordination introduces drift and misconfiguration.
The CLI and agent skill: Plain-language access with guardrails
The centerpiece of the demo is the env0 CLI, a free add-on that functions similarly to an MCP server. Instead of learning API endpoints, payloads, and methods, you ask a question in plain language and the agent finds the right call.
Artem describes the design choices behind building a CLI rather than IDE-specific integrations:
- Fewer security concerns and simpler deployment
- No need to test against every IDE - PyCharm, WebStorm, VS Code, Visual Studio
- Support for Windows PowerShell and Unix-based systems, including macOS
- A single binary with no Node runtime dependency
- A skill that loads automatically, with versions for Claude, Copilot, Cursor, and Codex
Authentication and guardrails are central to the pattern. "It respects whatever RBAC policies you've created on our back end," Artem explains. The governance you have already configured does not get bypassed by using a chatbot. If a team lacks access to a project or template, the agent will not surface it either.
The human role remains explicit. In Artem's words, "You still belong in the loop" - particularly when you manage the platform, billing accounts, or cloud hypervisors. What shifts is the volume of mundane, day-to-day triage work.
The demo: Redeploying a multi-stack Azure environment
Artem's live demo starts in an organization called Acme Financial Services, where work is divided into projects - an Azure module environment and a Google Project Factory environment. He authenticates to the CLI and then to Claude, runs two sanity checks (confirm the skill is loaded, confirm login succeeded), and then gives the agent a plain-language task: an Azure environment was recently destroyed or marked inactive, so use the CLI to redeploy it.
The agent locates the environment through the platform's API and the deployment proceeds through the workflow. That workflow contains two child environments:
- Network: Builds the virtual network and passes values downstream.
- Compute and storage: Builds Ubuntu LTS and Windows Server virtual machines with persistent disks.
A contingency clause in the workflow's YAML ensures the compute stack cannot deploy until the network exists - because the machines would have no route to communicate. Artem notes you can omit that clause to deploy in parallel, but here the dependency is real and the ordering is enforced automatically.
The run includes custom-flow steps - pre-checks before initialization, output after plan, and a post-apply network summary - plus a plan-review pause. Artem approves the network plan and later approves the compute stage through the CLI itself, demonstrating that approvals remain an explicit step even when the agent is driving.
Results appear in two places: the Azure portal showing the newly created virtual network, and a resource inventory filtered by virtual machine, showing Windows Server 2022 Datacenter and Ubuntu 22.04 LTS instances running on the same instance type. Artem also shows a fully bootstrapped Google Project Factory environment that created a GCP project, a network, a bucket, three VMs with two persistent disks each, and three GKE clusters of three nodes - all from a single action.
One practical note on model choice: the most capable, highest-effort model "is going to take forever" for routine workflow tasks. A lighter model at a lower effort level is often the right call for standard operations.
What this means for platform teams
A few practical implications stand out for anyone building an internal developer platform:
- Reuse your governance rather than rebuilding it. Because the agent inherits RBAC, OPA, and approval policies, you do not need a separate control plane for AI-driven operations.
- Design for dependency and data flow. Input and output variables with explicit ordering remove the manual handoffs that cause drift and misconfiguration in the first place.
- Standardize through blueprints and a module registry. Consistency is what makes it safe for an agent - or a developer - to repeat a deployment reliably.
- Scope realistically. This approach delivers the most value for mid-size to large teams managing many environments. At a dozen or more environments, manual triage becomes genuinely difficult. Below that threshold, the overhead may not be worth it.
If you enjoyed this, find more great insights and events from our Platform Engineering Community.
For more comprehensive guidance, check out the Platform Engineering Certified Architect Course and learn best practices from industry experts.
Key takeaways
- Ask questions, not APIs. A natural-language CLI lets practitioners query failed and drifted environments without learning endpoints or payloads - shortening the path from alert to action and reducing the cognitive load on on-call engineers.
- Inherit guardrails; do not reinvent them. When an agent honors your existing RBAC, policy, and approval gates, you can add AI assistance without widening your attack surface or creating a governance bypass.
- Model complexity with workflows. Dependency ordering, shared variables, blueprints, and a private module registry make multi-stack deployments repeatable - which is the foundation for any safe automation at scale.
- Keep humans in the loop. Agentic remediation reduces tedious work, but plan review and approval remain deliberate steps. Match model capability to task complexity, and apply this pattern where environment sprawl makes manual triage genuinely costly.

