Adam — Modal engineer, maintainer of Prefect and FastMCP — on Hamel Husain’s channel, making the case that environment engineering, not agent design, is the hard part of background agents. ~27 minutes.
The thesis
- Agents have converged on a universal design (harness + context); the differentiator is the environment they operate in
- An homage to Anthropic’s “Don’t Build Agents, Build Skills” — one layer up: “the hard part of background agents is the background part, not the agent part”
Dev boxes, not sandboxes
- A bare sandbox can’t run a server, take screenshots, or profile on a GPU — an agent is doomed without a machine prepped for its task
- CI/CD treats environments as jobs: clone, run deterministic tests, throw away
- Agents need sessions: resumable state (snapshot the filesystem, resume mid-thought), an environment that’s alive (repo drifted, ffmpeg now needed), a different security boundary, and cold starts that don’t make you wait 2-10 minutes every spin-up
What Ramp and others converged on
- Per-repo images defined in code, rebuilt on a 30-minute schedule so agents boot warm in under a second
- Secrets kept out of the environment — agents submit requests to a proxy sidecar that attaches credentials deterministically
- Result: ~1M sandboxes, ~70% of Ramp’s PRs from background agents
- Async image builds mean humans never pay for the expensive rebuild
Control plane vs data plane
- The old pattern (agent + tools in one process) means one aberrant tool call kills the agent holding the state
- Put a fire door between the planner and the executor: the agent lives in the control plane and executes work in a throwaway dev box — at worst the data-plane environment gets corrupted, never the agent
- Same principle as Airflow never running Spark itself
Build vs buy
- The dev box supply chain is where to invest; Modal’s docs/examples cover single coding agents, a Lovable-style builder, LangGraph, computer-use, code interpreters
- Observability of “software factories” — instrumenting the impact of hundreds of agents, not one agent — is an underexplored open problem
“The hard part of the background agents is always the background part and not the agent part.”