Related problems
agent-toolchain-coexist— Agent 工具链全家桶能一起装吗?(17 工具 57 对实测兼容清单)
Member of combos (3)
combo-ai-code-review— AI 代码审查工作流(repomix + code-review-graph + swe-rex)combo-auto-test— 自动化测试闭环(静态分析 → 沙箱执行 → 浏览器 E2E)combo-cicd-quality— CI/CD 质量门禁(swe-rex + deepcode + code-review-graph)
No conflict-matrix pairs for this tool yet.
# SWE-ReX — Agent Guide
name: swe-rex | version_range: 1.4.0~1.4.0 | generated: 2026-08-28
title_en: SWE-Rex - Sandboxed Agent Code Execution | desc_en: Local/cloud sandboxed code execution with parallelism (by SWE-agent).
Preflight
note: Requires Python >= 3.10; sandbox execution requires Docker.
python3 --version && docker --version 2>/dev/null || echo docker-missing
预期输出: see command output
Install
note: Tsinghua mirror recommended in mainland China.
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple swe-rex==1.4.0
swerex-remote --help
预期输出: usage: swerex-remote [-h] [--host HOST] [--port PORT] --auth-token AUTH_TOKEN
Operations
Inspect CLI surface
note: Verified in this environment.
swerex-remote --help
预期输出: server parameter surface (--host/--port/--auth-token)
Verify library imports
note: Verified in this environment.
python3 -c "import swerex; print('swerex OK')"
预期输出: swerex OK
Start sandbox execution server
note: Requires Docker + auth token; sandbox run not tested in this environment.
swerex-remote --host 127.0.0.1 --port 8000 --auth-token <token>
预期输出: server listening (for agent clients to connect and execute code)
Python API integration
note: Official form; requires server started first; not tested in this environment (no Docker).
python3 - <<'PY'
import asyncio
from swerex import RemoteSandbox
async def main:
sandbox = RemoteSandbox(host="127.0.0.1", port=8000, auth_token="<token>")
print(await sandbox.run("echo hi"))
asyncio.run(main)
PY
预期输出: hi (requires server started first; not tested in this environment — no Docker)
Uninstall
note: Idempotent pip uninstall; sandbox containers cleaned up as needed.
pip uninstall -y swe-rex 2>/dev/null || true
command -v swerex-remote >/dev/null 2>&1 && echo '残留: swerex-remote 仍存在' || echo 'swe-rex removed: OK'
预期输出: see command output
Facts
writes: none (CLI/library) | runtime: Python >= 3.10, Docker for sandbox | notes: sandbox execution not tested in this environment (no Docker); no background process
Source: swe-rex · validated 2026-08-28 · v1.4.0~1.4.0