MimoBox — Local Sandbox Runtime for AI Agents
Project description
MimoBox Python SDK
PyO3 Python bindings for mimobox sandbox execution with context manager support.
Repository: https://github.com/showkw/mimobox
Architecture
mimobox-python is a thin Python wrapper over mimobox-sdk; Rust owns backend selection, isolation, lifecycle, streaming, snapshots, files, and HTTP proxying.
maturin develop -m crates/mimobox-python/Cargo.toml
Quick Example
from mimobox import Sandbox
with Sandbox(isolation="auto") as sandbox:
result = sandbox.execute("echo hello", timeout=5.0)
print(result.stdout)
Streaming output:
from mimobox import Sandbox
with Sandbox(isolation="os") as sandbox:
for event in sandbox.stream_execute("printf 'a\\nb\\n'"):
if event.stdout:
print(event.stdout.decode(), end="")
API
| API | Purpose |
|---|---|
execute, stream_execute |
Run commands normally or as events. |
read_file, write_file |
Transfer sandbox files as bytes. |
snapshot, from_snapshot, fork |
Capture, restore, or copy state. |
http_request |
Use the whitelisted host HTTP proxy. |
wait_ready, is_ready, close |
Manage lifecycle and readiness. |
| Isolation | Meaning |
|---|---|
auto |
Let mimobox choose the backend. |
os |
Use the OS sandbox backend. |
wasm |
Use the Wasm backend. |
microvm |
Use the microVM backend. |
Exceptions
SandboxError is the base exception; SandboxProcessError, SandboxHttpError, and SandboxLifecycleError derive from it.
License
MIT OR Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mimobox-0.1.0a0-cp313-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: mimobox-0.1.0a0-cp313-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 351.7 kB
- Tags: CPython 3.13+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac10dbab0b759e4d9ba9b8c1a70913e6104ddf3676f6fae475b9ccfd1b8b1fd0
|
|
| MD5 |
2b4270e7a641c12bc7b6f469de809783
|
|
| BLAKE2b-256 |
68fbdd31c82ce373cbbbcd1202c1eb025692cfc470f286d0265fac89d0e2a312
|
File details
Details for the file mimobox-0.1.0a0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mimobox-0.1.0a0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a2278dddcbb70bf2f82bf351044189f7aed2704cc3705ebba3604fe237d8245
|
|
| MD5 |
31e4d21d173f12847dbd9f5fe0d22864
|
|
| BLAKE2b-256 |
cafb2117314cb551b2827f346300e3a9e5a37955b8405f62e5972af49a0f593e
|