Sandboxes for your agents¶
Run code, control a desktop, or interact with a VR game. Create a sandbox with Python and scale to a pool across your own machines.
Sandweave runs Linux sandboxes without host sudo or KVM. Templates supply the software and controls; you choose the resources, setup scripts, and lifetime.
Run your first command¶
from sandweave import Sandbox
with Sandbox() as env:
result = env.run("python -c 'print(2 + 2)'")
print(result.stdout)
This prints 4. Sandweave prepares the coding template on first use, then
terminates the sandbox when the with block ends. The worker needs Linux
x86-64 and Python 3.11+. See installation for host requirements.
What do you want to run?¶
Code and evaluation →Run programs, read their output, and give each task an independent sandbox.
Desktop agents →Start GNOME, take screenshots, and send mouse and keyboard actions.
VR games →Read paired eye images, send controller inputs, and record both views.
Distributed workloads →Connect workers, keep sandboxes ready, and follow activity in the dashboard.
Three things to know¶
A template is a recipe. It defines installed software, startup services, and controls. Extend a built-in template or provide your own setup script.
A sandbox is a running environment. Run commands and interact with its files and controls. Save a cache when you want to reuse installed software.
A cluster connects workers. Weave assigns sandboxes to machines with available
resources. The same Sandbox(...) API works locally or with a cluster address.
Common tasks¶
| Task | Start here |
|---|---|
| Give a sandbox more CPU or memory | Resources |
| Turn off its internet access | Networking |
| Keep it running after Python exits | Lifetime and cleanup |
| Reuse installed packages | Caches and snapshots |
| Keep several sandboxes ready | Pools and evaluation |
| Find a Python method or CLI command | Python API · CLI |