15 Commits
Author SHA1 Message Date
Yash Shah 6792fb37fc ci: add OIDC PyPI publish workflow
Trusted-publishing workflow on release/workflow_dispatch, plus docs/PUBLISH.md.
2026-09-19 01:04:42 +05:30
Yash Shah c20fa9a25a fix(v0.8.1): soft egress honesty, fetch hooks, localhost SSRF
Do not claim network_isolated for soft allowlists; patch Node fetch/http; require explicit localhost allowlisting; merge PYTHONPATH/NODE_OPTIONS.
2026-09-19 00:10:09 +05:30
Yash Shah d1c349e59f feat(v0.8): egress allowlists for sandboxed runs
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.
2026-09-18 21:06:01 +05:30
Yash Shah 98681e54a2 feat(docker): runtime-docker image and compose.docker-sandbox overlay
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.
2026-09-18 19:23:55 +05:30
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 f8a3d67740 docs(adopt): pip-first install + PyPI badge
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.
2026-09-14 15:44:46 +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 0cf92c22dc chore(pypi): publish as agentbox-sandbox
Context:
- PyPI name agentbox is taken by Team Dotagent.

Test Plan:
- python -m build && twine check dist/*
- docker compose up -d agentbox && curl /health

Additional Notes:
- Import path remains agentbox; install via pip install agentbox-sandbox.
2026-09-14 14:35:06 +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 562c078ac5 docs(plans): add v0.1 completion record and v0.2 roadmap
Document implemented foundation scope, acceptance criteria, and detailed
next-phase milestones following PRD + technical design standards.
2026-08-19 00:32:53 +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