Support AGENTBOX_EGRESS_ALLOWLIST and per-request egress_allowlist.
Empty list keeps deny-all (Docker --network=none / Linux netns); a
non-empty list applies a soft Python/Node userspace filter and returns
the effective hosts on the run response.
Context:
- Docker sandbox backend needed docker-cli in the image and a same-path
TMPDIR bind-mount for nested docker run -v on Docker Desktop.
- Without a compose path, agentforge and ops users stayed on subprocess.
Test Plan:
- AGENTBOX_HOST_TMP=$PWD/.agentbox-work docker compose -f compose.yaml \
-f compose.docker-sandbox.yaml up --build -d agentbox
- curl /health shows backend=docker; POST /v1/run with network_isolated=true
Additional Notes:
- Default compose remains subprocess for simple CI/unit use.
Context:
- Subprocess + netns probes are not enough for production agent code execution.
- Ephemeral docker run --rm with --network=none and optional --memory is the
essential isolation path for agentbox-backed products like agentforge.
Test Plan:
- docker compose run --rm test
- ruff check src tests
- pytest tests/test_docker.py (mocks CLI; live skip without docker)
Additional Notes:
- Default remains subprocess for local/CI unit tests.
- Set AGENTBOX_SANDBOX_BACKEND=docker (plus Docker CLI/daemon) for production.
Context:
- When deny_egress is on, probe unshare/bwrap and wrap runs in a netns; report network_isolated.
- Falls back to credential scrub when privileges are missing.
Test Plan:
- docker compose run --rm test pytest tests/ -q
Additional Notes:
- Version 0.6.0.
Context:
- Point newcomers at pip/go install first; add PyPI badges where published.
- Align installfence module path with github.com/yashshah9/installfence for go install.
Test Plan:
- README install commands match published package / module names
- docker compose run --rm dev (installfence)
Additional Notes:
- pytest-llm-vcr PyPI create still rate-limited; badge will light up once published.
Context:
- Surface applied limits and OOM heuristic on run responses.
- Clamp memory via AGENTBOX_MAX_MEMORY_MB; expand API scenario suite.
Test Plan:
- docker compose run --rm test pytest tests/ -q
- docker compose up -d agentbox && curl /health + /v1/run scenarios
Additional Notes:
- Version 0.5.0. PyPI name is agentbox-sandbox.
Context:
- Timeout alone does not stop runaway memory allocations in agent-generated code.
- Docs understated that subprocess is not production isolation.
Test Plan:
- docker compose run --rm test
- tests/test_api.py::test_memory_limit_kills_huge_allocation
Additional Notes:
- limits.memory_mb uses resource.RLIMIT_AS via preexec_fn (Linux Docker).
- Adoption: badges, SECURITY.md, CONTRIBUTING, author/urls.
Context:
- tar.add on directories recursively re-included main.py/main.js that snapshot restore is supposed to skip.
- AgentboxClient.raise_for_status turned expected 408 timeouts into opaque httpx errors.
- Missing runtimes returned HTTP 200 with exit 127 instead of 400.
Test Plan:
- docker compose run --rm test
- tests/test_api.py::test_snapshot_restore_keeps_workspace_file
- tests/test_api.py::test_run_timeout_limit
Additional Notes:
- health CLI now prints the package version, matching the other five CLIs.
- TestClient is used as a context manager to avoid the Starlette lifespan warning path.
Context:
- Agent workflows need files written in one run to exist in the next without a gVisor backend.
- Tar the sandbox workspace (minus the entry script) and restore it when snapshot_id is sent.
Test Plan:
- docker compose run --rm test
- tests/test_api.py::test_snapshot_restore_keeps_workspace_file
- tests/test_api.py::test_unknown_snapshot_returns_400
Additional Notes:
- Snapshots live under AGENTBOX_SNAPSHOT_DIR (default /tmp/agentbox-snapshots). Isolation is still subprocess.
Context:
- Python-only subprocess runs were not enough for agent sandboxes.
- Execute JavaScript, honor per-request timeouts, and ship a fetch-based TS client.
Test Plan:
- docker compose build test && docker compose run --rm test
- POST /v1/run with language javascript and limits.timeout_seconds=1
Additional Notes:
- Isolation is still subprocess, not gVisor.