Episode

Agentic Ops: Replacing Infrastructure Code with State Maps

Paul Stack of Swamp argues that traditional Infrastructure as Code is becoming obsolete in favor of state-based agent harnesses. This analysis covers the shift from declarative scripts to deterministic agent workflows, the economic impact of using small language models for triage, and the strategic necessity of maintaining human accountability in automated operations.

The Shift from Code to State

Traditional Infrastructure as Code (IaC) is facing a paradigm shift as AI agents demonstrate superior capability in managing infrastructure through state maps rather than declarative scripts. Paul Stack, founder of Swamp, argues that the complexity of modern IaC, with its layered abstractions and state dependencies, creates friction for agents. By contrast, state-based systems allow agents to translate intent directly into infrastructure changes, enabling flawless live migrations across cloud providers like Railway, DigitalOcean, and GCP. This approach eliminates the need for humans to write or maintain complex Terraform or Pulumi scripts, reducing the cognitive load on engineering teams.

Economic Efficiency in Agentic Ops

A critical insight from the discussion is the economic optimization of using small language models (SLMs) for routine operations. Stack highlights that replacing frontier models with SLMs for initial alert triage resulted in a 91% cost reduction. This strategy involves using cheap, fast models for classification and deduplication, reserving expensive frontier models only for complex root cause analysis. This tiered approach makes large-scale agentic operations financially viable, allowing companies to automate high-volume, low-value tasks without incurring prohibitive inference costs.

Security and Accountability Frameworks

The deployment of agents in production environments requires robust security and accountability frameworks. Stack emphasizes the importance of deterministic harnesses that constrain agent behavior to specific, audited workflows. By encoding credentials in vault structures and limiting agent access to read-only or specific automation tasks, organizations can mitigate the blast radius of potential errors. Furthermore, the principle that "a computer must never make a management decision" remains relevant; agents should provide context and evidence, while humans retain final authority on remediation actions. This hybrid model ensures that while toil is automated, strategic judgment and accountability remain with human operators.

Strategic Implications for Engineering Teams

For engineering leaders, the transition to agentic operations requires a cultural and structural shift. Teams must move away from siloed DevOps practices toward unified software factories where infrastructure and code are managed in a continuous loop. This involves extracting institutional knowledge from individual experts and encoding it into reusable agent behaviors. By automating the mundane aspects of operations, such as log analysis and dependency checks, organizations can empower their engineers to focus on high-impact system design and innovation, ultimately driving greater efficiency and resilience.

Key insights

Infrastructure as Code is becoming a bottleneck for AI agents due to its opinionated structure and state dependencies. State-based management allows agents to perform complex migrations more effectively than script-based approaches.
Impact: Reduces migration friction and enables faster cloud adoption by leveraging agent capabilities for state translation.
Infrastructure Strategy →
Using small language models for initial triage and classification significantly reduces operational costs compared to using frontier models for all tasks. This tiered model approach optimizes the cost-performance ratio of agentic systems.
Impact: Makes large-scale AI operations financially sustainable by reducing inference costs by up to 91%.
Cost Optimization →
Deterministic harnesses are essential for containing the blast radius of agents in production environments. By encoding workflows and restricting access, organizations can ensure agents execute only approved, audited actions.
Impact: Mitigates operational risk and ensures compliance by preventing unauthorized or probabilistic changes to critical systems.
Security & Risk →
Human judgment remains indispensable for final decision-making in operations. Agents should provide context and evidence, but humans must retain authority over remediation to ensure accountability and leverage domain expertise.
Impact: Preserves organizational accountability and ensures that strategic decisions are made with full context and expertise.
Human-AI Collaboration →
The integration of infrastructure management into the software delivery pipeline eliminates handoffs between teams. This unified approach creates a continuous feedback loop that enhances system resilience and deployment speed.
Impact: Accelerates time-to-market and improves system reliability by automating the entire lifecycle from code to production.
Process Optimization →

Action items

Evaluate current infrastructure management practices for agent compatibility. Identify areas where state-based tools can replace complex IaC scripts to streamline migrations and updates.
Impact: Reduces manual effort and error rates in infrastructure changes, enabling faster and more reliable cloud operations.
Implement a tiered model strategy for operational tasks. Use small language models for routine triage and classification, reserving frontier models for complex analysis to optimize costs.
Impact: Significantly reduces AI inference costs while maintaining high-quality decision support for critical issues.
Develop deterministic harnesses for agent workflows. Define specific, audited steps for agent actions and restrict access to necessary credentials to contain potential errors.
Impact: Enhances security and compliance by ensuring agents operate within defined boundaries, reducing the risk of production incidents.
Establish clear protocols for human oversight in agentic operations. Define which decisions require human approval and ensure agents provide comprehensive context for those decisions.
Impact: Maintains accountability and leverages human expertise for critical decisions, ensuring that automation supports rather than replaces strategic judgment.
Integrate infrastructure management into the software delivery pipeline. Automate the connection between code changes and infrastructure updates to eliminate manual handoffs between teams.
Impact: Improves deployment speed and system consistency by creating a seamless, automated flow from development to production.

Quotes

“For me, I'll never write another line of infrastructure as code.”
“Agents don't care. They're like, your cloud is here, the new cloud is here, let's do the migration.”
“A computer can never be held accountable, therefore a computer must never make a management decision.”