SandD
Sandbox Daemon for Agent Command Execution
Rust-powered WebSocket server with Python API for remote command execution and interactive sessions.
Features
- Command Execution - Run shell commands on remote machines with timeout control
- Interactive Sessions - Full PTY sessions with bash for manual work
- File Transfer - Upload/download files between controller and workers
- Tunnel Mode (VPN) - Secure mesh networking with WireGuard encryption via Tailscale
- High Performance - Rust async runtime handles high-concurrency workloads
- Auto Reconnection - Workers reconnect automatically on network failures
- Cross-Platform - Linux, macOS, Windows support
Architecture
┌──────────────────────────────────────────┐
│ Python Agent Application │
│ ┌────────────────────────────────────┐ │
│ │ from sandd import Server │ │
│ │ │ │
│ │ server = Server("0.0.0.0", 8765) │ │
│ │ result = server.exec( │ │
│ │ "daemon-1", "ls -la" │ │
│ │ ) │ │
│ └────────────────────────────────────┘ │
│ ▲ │
│ │ Python bindings (PyO3) │
│ ▼ │
│ ┌────────────────────────────────────┐ │
│ │ Rust WebSocket Server (tokio) │ │
│ │ • Command routing │ │
│ │ • Session management │ │
│ └────────────────────────────────────┘ │
└──────────────────────────────────────────┘
▲
│ WebSocket
│ (ws:// in direct mode, encrypted via VPN in tunnel mode)
│
┌─────────┼─────────┐
│ │ │
┌───▼───┐ ┌───▼───┐ ┌───▼───┐
│Daemon │ │Daemon │ │Daemon │
│ #1 │ │ #2 │ │ #n │
└───────┘ └───────┘ └───────┘
Installation
Python Package (Controller)
Install from PyPI:
pip install sandd
Or build from source:
git clone https://github.com/InftyAI/SandD
cd SandD
make install
Daemon Binary (Worker)
Quick Install
# Direct mode (no tunnel)
curl -fsSL https://raw.githubusercontent.com/InftyAI/SandD/main/hack/scripts/install.sh | sudo bash
# Tunnel mode (with Tailscale)
curl -fsSL https://raw.githubusercontent.com/InftyAI/SandD/main/hack/scripts/install.sh | sudo bash -s -- --tunnel
This installs the latest release. To pin a specific version:
curl -fsSL https://raw.githubusercontent.com/InftyAI/SandD/main/hack/scripts/install.sh | sudo bash -s -- --version v0.1.0
Alternative Methods
Install from crates.io:
cargo install sandd
Build from source:
git clone https://github.com/InftyAI/SandD
cd SandD
make daemon-release
# Binary at: ./target/release/sandd
Build from the main branch:
cargo install --git https://github.com/InftyAI/SandD sandd
Quick Start
Direct Mode (Development)
Start controller:
from sandd import Server
server = Server() # Direct mode (default)
server.wait_for_daemon("worker-1", timeout=30)
result = server.exec("worker-1", "hostname")
print(result.stdout)
Start daemon:
# Direct mode
sandd --server-url ws://controller-ip:8765/ws --daemon-id worker-1
# Tunnel mode
sandd --server-url ws://10.200.0.1:8765/ws \
--daemon-id worker-1 \
--tunnel \
--tunnel-authkey YOUR_KEY \
--tunnel-server http://headscale:8080
Tunnel Mode (Production)
For secure multi-cloud deployments with mesh VPN (no TLS setup needed):
from sandd import Server, TunnelConfig
config = TunnelConfig(
authkey="YOUR_KEY",
server="http://headscale:8080",
)
server = Server(connect="tunnel", tunnel_config=config)
# ✓ Encrypted with WireGuard (no TLS needed)
# ✓ Works across NAT/firewalls
# ✓ No public IPs required
See Tunnel Mode Guide for setup instructions.
Documentation
- Quick Start Guide
- Architecture Details
- Protocol Specification
- Tunnel Mode Guide
- Development Guide
- Examples
Roadmap
- Audit Logging - Track all commands, sessions, and file transfers
- Metrics - Prometheus-compatible metrics for monitoring
- Resource Limits - CPU/memory/timeout controls per daemon
- Multi-tenancy - Isolated workspaces with access control
- Rate Limiting - Prevent abuse and resource exhaustion
- Command Allowlist - Restrict allowed commands per daemon
Contributing
We welcome any kind of contributions, feedback, and suggestions! See DEVELOP.md for development setup and guidelines.
License
Apache-2.0 — see LICENSE.
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 sandd-0.0.1-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: sandd-0.0.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8098fdee38d64d159818884f86f10979fe699b0ce88acc184e66ca621176a011
|
|
| MD5 |
b91f188b670e3c4220e253ea4ae167f5
|
|
| BLAKE2b-256 |
fc0a1423e80df741a2f72446123a4002ec0fc14674f3338e5c75822f1da6d5ab
|
File details
Details for the file sandd-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: sandd-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c49ff61819ec4b6ae21182f16facbadf117c59669e2da77e80154d6bdd443da
|
|
| MD5 |
9cd246f6feaaa99228a977d7ec368797
|
|
| BLAKE2b-256 |
c4d74c40cf3fe59544fb3fc458ff463b9c32892378ba8d9a3aa2e888b6b19d5a
|
File details
Details for the file sandd-0.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: sandd-0.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0c0c518e30aff282c020eac62ef757e574ba27a79425229577f1e89fc98aeb0
|
|
| MD5 |
18235dc6005b92b6f702201a6b1aa600
|
|
| BLAKE2b-256 |
df651f8b0f63e8f2bc79d23e8aba60644ee89cd9f8471ad19690a2d5edd9976c
|