How are you actually using agent sandboxes like E2B or Daytona? Trying to work out if I need one

Reddit r/AI_Agents News

Summary

A developer discusses the tradeoffs of using agent sandboxes like E2B and Daytona for running code execution, asking the community about lifespan, state persistence, network isolation, and managed vs self-hosted solutions.

I keep circling back to the sandbox question and I can't tell if I'm overthinking it. The setup makes sense on paper. If an agent is writing and running code, you don't want it doing that on your host. E2B, Daytona, and the DIY Firecracker/gVisor route all solve roughly the same problem: give the agent a disposable box to make a mess in. Where I get stuck is the actual usage patterns. A few things I keep going back and forth on: - Lifespan. Do you spin up a fresh sandbox per task and tear it down, or keep a warmer pool around? Cold start latency vs. state bleed between runs seems like the real tradeoff. - State. How much do you persist? Some workflows need the agent to install deps once and reuse them. Others you want completely clean every time. - Filesystem + network. How locked down do you actually go? Full network isolation sounds nice until the agent needs to `pip install` something. - Managed vs. self-hosted. E2B and Daytona are lovely to get started with, but I get twitchy about sending code execution to someone else's infra. So for those of you running agents that execute code in anger: What are you using, and did you land there on purpose or by accident? What actually made it worth it over just running things in a container yourself? Genuinely curious whether people find these indispensable or whether it's a solved problem with plain Docker for most cases.
Original Article

Similar Articles

Deploy agent in sandbox VS Decoupling

Reddit r/AI_Agents

The article compares two patterns for deploying AI agents in the cloud: directly in sandboxes vs decoupling components. It explains the limitations of the sandbox approach due to cloud failures, and highlights Anthropic's Claude Managed Agent as a solution that decouples session store, agent runtime, and sandbox for resilience.