What is an agent sandbox? Sandboxes and runtimes for AI agents

Revyl Team6 min read

An agent sandbox is an isolated environment where an AI agent runs code, uses tools or drives a computer. On Revyl, an agent starts a web browser, iOS simulator, Android emulator or Mac computer, and Atlas records what the app does. Revyl's Free plan includes up to 1,200 free device minutes a month on iOS, Android, web and Mac with no card and no monthly fee; past that, a Revyl Mac computer is $0.05 a minute.

Agent sandboxes and runtimes at a glance
FeatureWhat the agent getsWhere it runsHow agents connectWhat a run leaves behind
E2BAn isolated sandbox per agent session in its own Firecracker microVM, a Linux desktop for computer use, or an Android 16 template driven with adb[3]E2B Cloud, or BYOC in your own AWS, GCP or Azure account on Enterprise[23]E2B SDKs; the Desktop SDK adds mouse, keyboard and screen capture[5]A sandbox you can pause and resume with its filesystem and memory[24]
CuaShared desktops (Cua Spaces) and local macOS and Linux VMs (Lume)[25]Computers you own or rent, including VMs in your own cloud account[25]Cua skills and the cua MCP server, added to the agent's settings[26]A Space on your computer that your team can watch and step into[25]
RevylWeb sessions in Chrome, cloud iOS simulators and Android emulators, and Mac computers with a desktop, shell, files and processes[11]Revyl's cloud: web browsers, iOS simulators, Android emulators and macOS computers, streamed live to the browser[12]Revyl CLI, a local MCP server, and a hosted MCP server for chat apps[16]A report per app session, and an Activity log of each command, file and process action on a Mac computer[13]

An agent sandbox is an isolated environment where an AI agent runs code, uses tools or drives a computer, with its actions kept apart from your own systems. They come in three kinds: code sandboxes such as E2B, computer-use desktops on hardware you control such as Cua, and hosted runtimes for the surfaces an agent works on, such as Revyl’s web browsers, iOS simulators, Android emulators and macOS computers.

What is an agent sandbox?

An agent sandbox gives an AI agent a place to act. The agent runs commands, reads and writes files, installs packages or clicks through a desktop, and whatever it does stays inside that environment. The sandbox also gives the agent an interface it can call: an SDK, a CLI or an MCP server that starts the environment, sends it work and shuts it down.

People search for this under several names, including AI agent sandbox, sandbox for AI agents and agent runtime. They usually mean the same need: somewhere other than a laptop for an agent to do real work, with a record of what it did.

What kinds of agent sandbox are there?

Three kinds cover most agent work. They differ in what the agent can reach and in who runs the computer underneath.

Code and Linux sandboxes

E2B runs each agent session in its own Firecracker microVM, with SDKs to run commands and manage files. It adds a Linux desktop for computer-use agents and an Android 16 template driven over adb. Sandboxes run for up to 1 hour continuously on Hobby and 24 hours on Pro, per E2B’s lifetime docs. See Revyl vs E2B for the side-by-side.

Computer-use desktops on your own or rented hardware

Cua Spaces turns your Macs, Linux boxes and cloud VMs into shared desktops that agents work in and people watch. Lume runs macOS and Linux VMs on an Apple silicon Mac, and Cua Driver lets agents operate desktop apps (repository). See Revyl vs Cua for the side-by-side.

Hosted runtimes for app surfaces

Some agents need the place an app runs: a web browser, an iOS simulator, an Android emulator or a Mac. Revyl hosts all four as runtimes. Web apps run in live Chrome sessions, mobile apps run on cloud iOS simulators and Android emulators (sessions), and Mac computers give an agent a macOS desktop, shell, files and processes. Each streams live to the browser, so a person can watch what the agent does.

For computer-use agents that specifically need macOS, computer-use agents on macOS compared covers the options in detail.

What does an agent sandbox need for desktop work?

When an agent works through a screen, it takes a screenshot, decides what to do, and sends clicks, keystrokes and scrolls, so its sandbox needs a desktop it can see and act on. E2B’s Desktop SDK does this on Linux. On a Revyl Mac computer, revyl computer screenshot, click, drag, scroll, type and key do it, and a click can name its target, such as “the Save button” (CLI reference). The macOS computer-use comparison covers the other ways to give such an agent a Mac.

Most computer-use work also goes faster when the agent can run a command instead of clicking through a menu. revyl computer exec runs a program on the Mac for up to an hour, and revyl computer files reads and writes files (Mac computers).

People need to see the work too. On a Revyl Mac computer a teammate watches the desktop live and can take control with mouse and keyboard. Cua Spaces is built around the same idea for desktops on your own computers. Afterwards, a Revyl computer’s page keeps an Activity log of each command, file and process action, plus the desktop recording when one was saved, and Share gives a view-only public link.

Can Revyl be an agent’s sandbox?

Yes, when the agent’s work happens in a browser, a mobile app or on macOS. An agent starts a web session, an iOS simulator or an Android emulator with revyl device start, then taps, types and swipes with revyl device commands that can name their target, such as “Login button” (CLI reference). For macOS, it runs revyl computer create --os macos, works on the computer, and stops it when the job is done. Web and iOS apps can also run inside a Mac computer as app sessions, each with its own session page, live stream, video and report.

A Mac computer runs for up to two hours from creation (Mac computers). Revyl’s Linux computers are available on request. GitHub Actions jobs in private repositories can run on a single-use Revyl Mac with runs-on: revyl-macos (GitHub Actions on Mac computers).

An agent that already lives in a code sandbox can keep it. Revyl’s sandboxed environments guide covers running the Revyl CLI inside containers and coding-agent runners, so the agent writes code in its own sandbox and opens the app on Revyl.

How do agents connect?

E2B agents use its SDKs, with the Desktop SDK for screen control. Cua agents connect through Cua skills and the cua MCP server, which you add to the agent’s settings (connect your agent).

Revyl agents connect in three ways (MCP setup):

  1. The Revyl CLI, which coding agents call directly for sessions, Mac computers, tests and builds.
  2. A local MCP server, revyl mcp serve, registered in the coding agent.
  3. A hosted MCP server for chat apps, with no CLI install or API key. Its tools find your apps, open an app’s Atlas map, start an iOS, Android or web session or a macOS computer, take a screenshot and stop the session.

Every session also has a live viewer, so the person who asked the agent for the work can open it in a browser.

How does pricing compare?

E2B bills sandbox compute, Cua bills its software, and Revyl bills device minutes, so each is stated in its own unit. E2B and Cua prices are as of November 11, 2026.

Revyl’s Free plan is $0, with up to 1,200 free device minutes a month on iOS, Android, web and Mac, 2 devices at once and no card needed. Pro is pay as you go with no monthly fee: use continues past the free minutes at $0.075 per device minute on iOS and Android, with 10 devices at once and a $20 starting credit, and the free minutes still arrive every month. Those minutes also buy the run report, Atlas filled in from observed runs, and the pull-request verdict through proof of changes. Web sessions are $0.05 a minute. Mac computers are $0.05 a minute.

E2B bills per second for CPU and RAM while a sandbox runs. Hobby is free with a $100 one-time credit, Pro is $150/month plus usage, and Enterprise starts at a $2,000/month commit, per e2b.dev/pricing.

Cua Spaces’ Free plan includes 2 computers in use at once and 20 remote hours a month. Pro is $18/month and Teams is $30 per seat a month, per Cua’s plans page. Your own computers and cloud VMs are billed by whoever provides them.

Beyond agent sandboxes: what else Revyl runs

An agent that uses a Revyl runtime as its sandbox can open the app it builds on Revyl’s other runtimes and keep the record in one place.

  • Web: web apps run in live Chrome sessions at a desktop or mobile viewport, on every plan, started with revyl device start --platform web (web sessions).
  • iOS simulators: an agent starts a cloud iOS simulator from the CLI or MCP server and drives it with the same revyl device commands (sessions).
  • Android emulators: cloud Android emulators stream live to the browser in the same way (sessions).
  • macOS computers: covered above. The same Mac computer an agent drives also hosts web and iOS app sessions.
  • Atlas: Atlas is the shared record of what the app does, filled in from the screens, states and transitions observed in Revyl tests, sessions and explorations. Agents query it with revyl atlas, and Explore sends parallel agents through an app to add to it.
  • Agent access: agents start and drive every runtime through the Revyl CLI and MCP server, including from sandboxed environments.
  • Reports and PR verdicts: each test run produces a report with video, a step timeline, device logs and network traffic (on iOS and debuggable Android builds). With proof of changes, Revyl runs the changed flows on each pull request’s build and posts a verdict.

Sources

Facts were checked against these public pages on November 12, 2026. Spot an error? Email support@revyl.ai and we will correct it.

  1. E2B
  2. E2B pricing
  3. E2B enterprise
  4. E2B sandbox lifetime
  5. E2B computer use
  6. E2B Android
  7. Cua repository
  8. Cua Spaces
  9. Cua Spaces plans and Teams
  10. Lume
  11. Revyl core concepts
  12. Revyl sessions
  13. Revyl Mac computers
  14. Revyl GitHub Actions on Mac computers
  15. Revyl CLI reference
  16. Revyl MCP setup
  17. Revyl sandboxed environments
  18. Revyl reports
  19. Revyl Atlas
  20. Revyl Explore
  21. Revyl proof of changes
  22. Revyl pricing
  23. e2b.dev/security
  24. docs.e2b.dev/sandbox/persistence
  25. cua.ai/pricing
  26. cua.ai/docs/spaces/guides/connect-your-agent

Frequently asked questions

What is an agent sandbox?

An agent sandbox is an isolated environment where an AI agent runs code, uses tools or drives a computer, so its actions stay inside that environment. Common kinds are code sandboxes that run commands and files, computer-use desktops the agent controls by screen, and hosted runtimes where the agent opens a browser, a mobile simulator or emulator, or a Mac.

Is an agent sandbox the same as a VM?

Not always. A VM is one way to isolate an agent sandbox. E2B runs each sandbox in its own Firecracker microVM, and Cua's Lume runs macOS and Linux VMs on an Apple silicon Mac. Other sandboxes isolate the agent as a container or a restricted process. What makes a sandbox useful to an agent is the interface on top: commands, files, a screen to read and act on, and a way to start and stop it. Revyl's runtimes are hosted sessions and Mac computers that an agent starts and stops from the CLI or MCP server.

Can an AI agent sandbox include a desktop?

Yes. A sandbox with a desktop lets an agent work through the screen, taking screenshots and sending clicks and keystrokes. E2B Desktop runs Linux, a Cua Space runs on your own computer, and a Revyl Mac computer is driven with revyl computer screenshot, click, type and key commands.

What is an agent runtime?

An agent runtime is the environment where an agent's work actually runs, as opposed to the model that decides what to do. For a coding agent that might be a Linux sandbox; for an agent checking an app, it is the browser, iOS simulator, Android emulator or Mac computer the app runs on. Revyl's docs describe sessions and Mac computers as its runtimes.

Can an agent inside a sandbox use Revyl?

Yes. Revyl's sandboxed environments guide covers running the Revyl CLI in isolated runners, containers and coding-agent environments: install it with uv, inject REVYL_API_KEY, and allow backend.revyl.ai plus the specific hosts each operation returns. The agent keeps its own sandbox and opens Revyl sessions or Mac computers from it.

Can an AI agent sandbox run iOS or Android apps?

E2B has an Android 16 template driven over adb, and Cua's macOS Space with developer tools runs Xcode and the iOS Simulator on your own Apple silicon Mac. Revyl starts cloud iOS simulator and Android emulator sessions from its CLI or MCP server, streams them live to the browser, and produces a report for each test run.

What else does Revyl do?

Revyl runs web apps in live Chrome sessions, mobile apps on cloud iOS simulators and Android emulators, and macOS computers, all from the dashboard, the CLI or the MCP server. Atlas is the shared record of what the app does, filled in from observed runs, and Revyl posts a verdict on each pull request with proof of changes.

Revyl Team

Published November 12, 2026