8 Commits
Author SHA1 Message Date
Yash Shah a9d1c6554b feat(v0.7): Docker sandbox backend for real isolation
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.
2026-09-14 23:49:33 +05:30
Yash Shah 1c3c07df1d feat(v0.6): Linux network namespace deny-egress
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.
2026-09-14 16:23:35 +05:30
Yash Shah 5658447185 feat(v0.5): limits_applied, oom_killed, max memory clamp
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.
2026-09-14 15:25:01 +05:30
Yash Shah a21089184b feat(v0.4): enforce per-run memory_mb via RLIMIT_AS
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.
2026-09-14 14:00:42 +05:30
Yash Shah f0045a3a5f fix(api): snapshot files only and surface HTTP errors in the SDK
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.
2026-08-19 11:57:34 +05:30
Yash Shah 67495fc374 feat(v0.3): add workspace snapshot and restore
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.
2026-08-19 01:07:54 +05:30
Yash Shah 3ef07d2fe9 feat(v0.2): add Node runtime, per-run timeouts, and TypeScript client
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.
2026-08-19 01:07:54 +05:30
Yash Shah 20ebd1a69d feat(init): add agentbox v0.1 foundation
Self-hosted agent code execution API with FastAPI, subprocess sandbox,
Python SDK client, Docker Compose service, and unit tests.
2026-08-19 00:32:53 +05:30