Skip to main content

Sandboxed code execution for AI agents, locally or on the cloud.

Project description

SWE-ReX

SWE-agent Remote Execution Framework

👉 Read the documentation 👈

Pytest Check Markdown links build-docs

SWE-ReX is a runtime interface for interacting with sandboxed shell environments, allowing you to effortlessly let your AI agent run any command on any environment.

Whether commands are executed locally or remotely in Docker containers, AWS remote machines, Modal, or something else, your agent code remains the same. Running 100 agents in parallel? No problem either!

Specifically, SWE-ReX allows your agent to

  • Interact with running shell sessions. SWE-ReX will recognize when commands are finished, extract the output and exit code and return them to your agent.
  • ✅ Let your agent use interactive command line tools like ipython, gdb or more in the shell.
  • ✅ Interact with multiple such shell sessions in parallel, similar to how humans can have a shell, ipython, gdb, etc. all running at the same time.

We built SWE-ReX to help you focus on developing and evaluating your agent, not on infrastructure.

SWE-ReX came out of our experiences with SWE-agent and SWE-agent enigma. Using SWE-ReX, we

  • 🦖 Support fast, massively parallel agent runs (which made evaluating on large benchmarks a breeze).
  • 🦖 Support a broad range of platforms, including non-Linux machines without Docker.
  • 🦖 Disentangle agent logic from infrastructure concerns, making SWE-agent more stable and easier to maintain.

This is SWE-agent using SWE-ReX to run on 30 SWE-bench instances in parallel:

SWE-ReX in action

Get started

pip install swe-rex
# With modal support
pip install 'swe-rex[modal]'
# With fargate support
pip install 'swe-rex[fargate]'
# Development setup (all optional dependencies)
pip install 'swe-rex[dev]'

Then head over to our documentation to learn more!

Related projects

SWE-agent    SWE-smith    SWE-bench    sb-cli

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swe_rex-1.3.0.tar.gz (39.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swe_rex-1.3.0-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

Details for the file swe_rex-1.3.0.tar.gz.

File metadata

  • Download URL: swe_rex-1.3.0.tar.gz
  • Upload date:
  • Size: 39.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for swe_rex-1.3.0.tar.gz
Algorithm Hash digest
SHA256 7bfafd44e05af277c19db019b8213e07c45f2a66283d7526b55c2dc143802407
MD5 1caba6b5c865a7c2b9d366a4908712c7
BLAKE2b-256 99b7b02f0901fe1fc797381e2c1a727298d2a96c4ba35b9cc41b5ea38a7a2a71

See more details on using hashes here.

File details

Details for the file swe_rex-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: swe_rex-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 44.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for swe_rex-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7e2a88f1b559efa483d63fdb1510a72ce6850acaa0c1eae723f6417a92ea124
MD5 d29fe907991a886ee46aaf3fb097a369
BLAKE2b-256 dc9f9f2ea5ebae6dcade1d04cdfa7fda85ab6185e787bf2b03e6105b7cbac2a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page