# Don't Build Agents, Build Environments Instead

## Executive summary

The talk argues that the most critical challenge in building agentic workflows is not the agent itself, but the underlying environment (the 'background part'). Teams should focus on 'environmental engineering'—designing robust, fast, and persistent development environments ('dev boxes') rather than optimizing the agents. Key architectural shifts involve treating sessions as long-running, stateful processes that require sophisticated isolation between the control plane (planning) and the data plane (execution).

## Key takeaways

- Focus on Environments, Not Agents: The difficulty in background agent systems lies in the environment they operate within. The focus should be on building reliable 'dev boxes' that provide necessary resources beyond a bare sandbox.
- Jobs vs. Sessions: Traditional CI/CD treats runs as stateless 'jobs.' Agents require long-running, resumable 'sessions' that must persist state (e.g., file system snapshots) and potentially outlive the initial machine runtime.
- Dev Boxes vs. Sandboxes: A sandbox is bare; a 'dev box' must be rich enough to handle complex tasks (e.g., running local servers, taking screenshots, profiling on GPUs), requiring more than just basic Linux access.
- Architectural Separation: To prevent failure, the system must separate the agent's planning logic (Control Plane) from the risky execution tools (Data Plane). The agent should issue remote calls to a dedicated sandbox rather than running tools collocated with its own process.

## Technical details

- Dev Box Design: A dev box must be capable of supporting diverse tasks beyond simple software engineering, such as data analysis or ML model profiling (e.g., requiring GPU access and specific ports).
- State Persistence: For long-running agent sessions, the system must implement state persistence by snapshotting memory or ensuring file system integrity so that work can resume days later.
- Security Model (Control/Data Plane): The security boundary for agents is different from CI/CD. Since agents may accidentally leak secrets by logging them in URLs, the system must use proxies or sidecars to intercept requests and imbue secrets without giving the agent direct access.
- Cold Start Mitigation: To achieve sub-second boot times at scale (e.g., millions of sandboxes), systems must treat environment images as code and manage them asynchronously. This ensures that new dev boxes are mounted on a 'warm' image, minimizing setup time.

## Practical implications

- Invest heavily in the 'dev box supply chain' (environmental engineering).
- Use platforms that allow defining and managing environments via code to ensure reproducibility and fast rebuilds.
- Implement architectural separation: keep planning/state management in the Control Plane, and execution in isolated Data Planes.
- Utilize sidecars or proxies for secret handling to prevent agents from accidentally leaking credentials.

## Topics

Agentic Workflows, Environmental Engineering, DevOps, System Architecture, AI Agents, Modal, Ramp, Prefect, FastMPP

Source: https://www.youtube.com/watch?v=JolFqvXj3BE
