Skip to main content

vital-agentbox

Secure sandboxed code execution for AI agents. Runs Python and shell commands inside a Chromium + Pyodide (WASM) sandbox with two independent security boundaries — no host filesystem or network access from agent code.

Features

  • Dual-layer isolation — Chromium renderer sandbox + WASM linear memory
  • Virtual shell — tree-sitter-bash parser with 30+ builtins on in-memory FS
  • Python execution — Pyodide (CPython 3.11 compiled to WASM)
  • Git operations — isomorphic-git on Emscripten MemFS with S3/MinIO storage
  • AI-friendly editing — edit builtin with fuzzy + AST-aware matching
  • LangChain & Deep Agents — toolkit, tools, and sandbox backend integrations
  • Scalable — orchestrator + worker architecture with Redis routing

Box types

Type Description
MemBox Ephemeral in-memory sandbox (default)
GitBox MemBox + isomorphic-git + pluggable storage (S3/MinIO/local)
FileSystemBox Local dev only, backed by host directory

Install

# Lightweight client (for LangGraph / Deep Agent apps)
pip install vital-agentbox[client]

# Sandbox worker (runs Chromium + Pyodide)
pip install vital-agentbox[worker]
playwright install chromium

# Orchestrator (routes requests to workers, no Chromium)
pip install vital-agentbox[orchestrator]

# LangChain integration
pip install vital-agentbox[langchain]

Quick start

from agentbox.client import AgentBoxClient

client = AgentBoxClient("http://localhost:8090")

# Create a sandbox
sandbox = client.create_sandbox_sync(box_type="mem")

# Run Python
result = sandbox.execute_sync("print(2 + 2)")
print(result.stdout)  # "4\n"

# Run shell commands
result = sandbox.execute_sync('echo "hello" > /file.txt && cat /file.txt', language="shell")
print(result.stdout)  # "hello\n"

# AI-friendly file editing
result = sandbox.execute_sync(
    "edit /file.txt --old 'hello' --new 'world'",
    language="shell",
)

# Cleanup
sandbox.destroy_sync()

LangChain integration

from agentbox.langchain import AgentBoxToolkit

toolkit = AgentBoxToolkit(base_url="http://localhost:8090")
tools = toolkit.get_tools()
# → [CodeExecutionTool, ShellExecutionTool, FileWriteTool, FileReadTool]

Docker

# Full stack (orchestrator + 2 workers + MinIO)
docker compose up

# Single worker
docker run -p 8090:8000 --shm-size=2g agentbox-worker

Documentation

Full documentation is in the docs/ directory:

System requirements

  • Python ≥ 3.11
  • Chromium (via playwright install chromium) — worker only
  • Redis — orchestrator only
  • For PDF generation: pandoc + LaTeX

License

Apache 2.0

Metadata

Release files for vital-agentbox 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vital-agentbox 0.1.9
File Size Uploaded
vital_agentbox-0.1.9.tar.gz 175.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vital-agentbox 0.1.9
File Interpreter ABI Platform
vital_agentbox-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 401.1 kB

Release files / vital_agentbox-0.1.9.tar.gz

Download URL vital_agentbox-0.1.9.tar.gz
Size 175.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fe8193bb36cf8ab1bd27194ae780162ed82d702c039dff587cbb0bbdae4986c1
BLAKE2b-256 checksum
How to use checksums
197d02bb0b726e77a0afcc7f8fb848a49fe14bb925bffe9ad4011be08d83c963
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / vital_agentbox-0.1.9-py3-none-any.whl

Download URL vital_agentbox-0.1.9-py3-none-any.whl
Size 225.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6590b6176ca594590b5c317109294dd9b5e689625edacb9cdae860e527411f5
BLAKE2b-256 checksum
How to use checksums
5829c3fba1c10cf6e794661abe95e77b5f002106810d73054306e59d68805454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page