OpenHands Runtime vs SWE-ReX
Choose OpenHands Runtime for running OpenHands agents in disposable Docker sandboxes, locally or in CI, with the same server reachable through a hosted runtime for large evaluations; choose SWE-ReX for running many SWE-agent-style shell sessions in parallel across local, Docker, Modal or Fargate backends. OpenHands Runtime uses Docker container isolation and is open source; SWE-ReX uses Docker / Modal / Fargate isolation and is open source.
Key differences between OpenHands Runtime and SWE-ReX
- Isolation: OpenHands Runtime uses Docker container; SWE-ReX uses Docker / Modal / Fargate.
- SDKs and interfaces: Only OpenHands Runtime lists JavaScript/TypeScript.
What they have in common
- Both are open-source projects you run yourself.
- Both use container isolation.
- Both are open source.
- Both can be self-hosted.
- Both list Python and REST API.
OpenHands Runtime vs SWE-ReX at a glance
| Attribute | OpenHands Runtime | SWE-ReX |
|---|---|---|
| What it is | The sandbox layer of the OpenHands agent SDK: an agent server that runs in a Docker container, in-process locally, or on the hosted OpenHands Runtime API. | Runtime interface from the SWE-agent team for running agent shell sessions locally or in Docker, Modal and AWS Fargate sandboxes, built for massively parallel runs. |
| Type | Open-source project | Open-source project |
| Isolation | Docker container running the agent-server image (DockerWorkspace), with the agent proxying commands and file transfer over HTTP/WebSocket; a local workspace runs in the same process rather than in a sandbox; the hosted Runtime API runs the image in a "sandboxed environment" whose mechanism is not named | Depends on the deployment: Docker or Podman container (DockerDeployment), Modal or AWS Fargate (ModalDeployment, FargateDeployment), a remote host, or no isolation with LocalDeployment; a FastAPI server inside the environment relays commands |
| Open source | Yes (MIT) | Yes (MIT) |
| Self-host / BYOC | Yes / Not documented | Yes / No |
| SDKs | Python, JavaScript/TypeScript, REST API | Python, REST API |
| Cold start (vendor claim) | Not documented | Not documented |
| Max session | Not documented | Not documented |
| Persistence | Docker workspaces are "automatically stopped and cleaned up" when the context exits; persistence beyond a session is not documented on the runtime pages | Multiple interactive shell sessions stay open for the life of the deployment; file read/write through the runtime; no snapshot or persistence beyond the deployment documented |
| Snapshots / pause | Not documented / Not documented | Not documented / Not documented |
| GPU | Not documented | Not documented |
| Networking | Agent server exposed on a host port (examples use 8010); extra_ports exposes VS Code Web (port+1) and VNC (port+2); client talks over HTTP and WebSocket | The container runtime server listens on port 8000, mapped to a free host port; other deployments expose the server over HTTP; network policy is not documented |
| Pricing | Free to self-host (MIT). The hosted Runtime API requires a RUNTIME_API_KEY; pricing is not published on the runtime docs | Free (MIT); Modal and Fargate backends are billed by those providers |
| Free tier | Free to self-host | Free to self-host |
| Compliance | Not documented | Not documented |
| Regions | Not documented | Not documented |
| Company headquarters | Cambridge, Massachusetts, United States | Not documented |
| Good fit for | Running OpenHands agents in disposable Docker sandboxes, locally or in CI, with the same server reachable through a hosted runtime for large evaluations | Running many SWE-agent-style shell sessions in parallel across local, Docker, Modal or Fargate backends |
Verified November 14, 2026 from each provider’s documentation. Cold-start figures are vendor claims, not our measurements.
Which should you choose?
Reasons to choose OpenHands Runtime
- You run OpenHands agents and want their execution isolated in disposable containers
- You need a VNC-visible browser and VS Code inside the sandbox
- You run large benchmark sweeps and want a hosted runtime for the same image
Reasons to choose SWE-ReX
- You run SWE-agent or similar and want to swap execution backends without changing agent code
- You need many parallel shell sessions for benchmark evaluation
- You want to run on Modal or Fargate without writing provider-specific glue
Trade-offs to check first
- OpenHands Runtime: The documented sandbox is a Docker container; a microVM option is not documented
- OpenHands Runtime: Persistence, limits and hosted pricing are not documented on the runtime pages
- SWE-ReX: Isolation is whatever the chosen backend provides; LocalDeployment has none
- SWE-ReX: Snapshots, persistence and network policy are not documented
Both are worth piloting with your own image and region. See the full OpenHands Runtime profile and SWE-ReX profile, or the complete comparison.
More comparisons
Frequently asked questions
Is OpenHands Runtime or SWE-ReX better for AI agents?
What is the difference between OpenHands Runtime and SWE-ReX?
Which is open source, OpenHands Runtime or SWE-ReX?
How do OpenHands Runtime and SWE-ReX isolate code?
How does OpenHands Runtime pricing compare with SWE-ReX?
Can you self-host OpenHands Runtime or SWE-ReX?
Sources
- docs.openhands.dev/sdk/guides/agent-server/overview
- docs.openhands.dev/sdk/guides/agent-server/docker-sandbox
- docs.openhands.dev/sdk/guides/agent-server/api-sandbox
- github.com/OpenHands/software-agent-sdk
- github.com/SWE-agent/SWE-ReX
- swe-rex.com/latest/
- swe-rex.com/latest/architecture/
- swe-rex.com/latest/api/deployments/docker/
Check before you rely on it. Products change quickly, and this page reflects public documentation as of November 14, 2026. Confirm anything that matters in the provider’s own documentation.
Cite this page
Agent Sandboxes. (2026). OpenHands Runtime vs SWE-ReX. agentsandboxes.org. Last reviewed November 14, 2026. https://agentsandboxes.org/compare/openhands-runtime-vs-swe-rex/