Repolode
SWE-agent

SWE-agent/SWE-ReX

A runtime interface that lets AI agents run shell commands in sandboxed environments, locally or on cloud platforms like Docker, AWS, and Modal.

Stars
623
Forks
131
Open issues
61
Last commit
3 days ago

What is it?

SWE-ReX is a runtime layer that lets an AI agent run arbitrary shell commands in a sandboxed environment without changing the agent code. The same agent can run commands locally, in Docker containers, on AWS machines, on Modal, or on other backends.

It detects when a command has finished, extracts its output and exit code, and returns them to the agent. It also supports interactive tools such as ipython and gdb, and lets an agent keep several shell sessions open in parallel. The project was built for SWE-agent and is aimed at running many agents at once, including on non-Linux machines without Docker.

Install with pip, with optional extras for Modal or Fargate support.

Key features

  • 01Runs shell commands in local or remote sandboxes behind one interface.
  • 02Detects command completion and returns output and exit codes.
  • 03Supports interactive tools such as ipython and gdb.
  • 04Manages multiple shell sessions in parallel.
  • 05Supports Docker, AWS Fargate, and Modal backends.

Use cases

  • Running coding agents against many software repositories in parallel.
  • Evaluating AI agents on large benchmarks such as SWE-bench.
  • Giving an agent a sandboxed shell without changing its code when moving between infrastructure.

Quick start

  1. 1

    Install the core package from PyPI

    pip install swe-rex
  2. 2

    Optionally install with Modal support

    pip install 'swe-rex[modal]'
  3. 3

    Read the documentation to learn how to use it

Things to know

  • Documentation and deeper usage depend on the external docs site rather than the README.
  • Cloud backends such as Modal, Fargate and Daytona need separate setup and accounts.
  • The Daytona extra is marked as work in progress.

Topics

FAQ

What is SWE-ReX?
A runtime interface that lets AI agents run shell commands in sandboxed environments, locally or on cloud platforms like Docker, AWS, and Modal. SWE-ReX is a runtime layer that lets an AI agent run arbitrary shell commands in a sandboxed environment without changing the agent code. The same agent can run commands locally, in Docker containers, on AWS machines, on Modal, or on other backends.
Is SWE-ReX free to use? What license does it have?
SWE-ReX is open source under the MIT license. Check the license terms before using it in commercial products.
Is SWE-ReX still maintained?
Actively maintained. The last commit to SWE-ReX was on Oct 19, 2026.
What can I use SWE-ReX for?
Running coding agents against many software repositories in parallel. Evaluating AI agents on large benchmarks such as SWE-bench. Giving an agent a sandboxed shell without changing its code when moving between infrastructure.
How do I install SWE-ReX?
Install the core package from PyPI: pip install swe-rex Optionally install with Modal support: pip install 'swe-rex[modal]' Read the documentation to learn how to use it
Where can I get SWE-ReX?
The source code and installation instructions are on GitHub: https://github.com/SWE-agent/SWE-ReX

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects