Skip to main content

Sandbox Console

A web console for observing and operating sandbox environments. Manage sandboxes, browse files, execute commands, and view operation history — all from a browser.

Built with FastAPI (backend) + React/TypeScript (frontend), packaged as a single Docker container, pip-installable, or runnable locally with one command.

Features

  • Sandbox Management — Create, list, pause, resume, delete sandboxes
  • File Explorer — Browse, read, edit (Monaco Editor), upload, download
  • Command Runner — Execute commands with real-time SSE streaming output
  • Terminal — Interactive shell via xterm.js + WebSocket
  • History Timeline — Unified operation history synced from sandbox
  • Connection Management — Register and test sandbox connections with encrypted credentials
  • Observability — Health checks, Prometheus metrics, structured logging

Quick Start

Install the package — the frontend is pre-built and bundled inside the wheel, so no Node.js required.

pip install sandbox-console

Start the server:

sandbox-console-server                      # Start on http://localhost:9090
sandbox-console-server --port 3000          # Custom port
sandbox-console-server --host 127.0.0.1     # Bind to localhost only

Open http://localhost:9090 in your browser. No environment variables required for local use — auth is disabled by default.

Note: The Console defaults to port 9090 to avoid conflicting with the OpenSandbox service which runs on port 8080.

Option B: Run from Source

Requires Python 3.11+ and Node.js 18+.

python start.py          # Production: build frontend + serve on http://localhost:9090
python start.py --dev    # Development: hot-reload frontend (:5173) + backend (:9090)

Or install in editable mode and use the CLI:

cd backend
pip install -e .
sandbox-console-server --dev    # Dev mode with hot-reload

Docker

Note: Docker build requires the agent-sandbox-backends SDK source as a sibling directory.

# Build (from parent directory containing both repos)
docker build -f sandbox-console/docker/Dockerfile -t sandbox-console .

# Run
docker run -d -p 9090:9090 -v sandbox-console-data:/data sandbox-console

Or with Docker Compose:

cd sandbox-console
docker compose up -d

Port Configuration

Ports can be configured via CLI flags, environment variables, or .env file (priority: CLI > env > .env > defaults).

Parameter CLI Flag Env Variable Default Mode
Backend port --port EXPLORER_PORT 9090 All
Backend host --host EXPLORER_HOST 0.0.0.0 All
Frontend port --frontend-port EXPLORER_FRONTEND_PORT 5173 Dev only
# Examples (pip install)
sandbox-console-server --port 3000                              # Custom port
sandbox-console-server --dev --port 3000 --frontend-port 3001   # Custom dev ports
EXPLORER_PORT=3000 sandbox-console-server                       # Via environment variable

# Examples (from source)
python start.py --port 3000                                  # Custom backend port
python start.py --dev --port 3000 --frontend-port 3001       # Custom dev ports
EXPLORER_PORT=3000 python start.py                           # Via environment variable

# .env file (project root or CWD, loaded automatically)
# EXPLORER_PORT=3000
# EXPLORER_HOST=0.0.0.0

For Docker, set EXPLORER_PORT and map the same port:

docker run -p 3000:3000 -e EXPLORER_PORT=3000 sandbox-console

Configuration

All configuration via environment variables (prefix EXPLORER_). See .env.example for details.

Variable Default Description
EXPLORER_ADMIN_TOKEN (empty) Admin bearer token (empty = auth disabled)
EXPLORER_MASTER_KEY all-zeros Fernet encryption key (64-char hex)
EXPLORER_DATABASE_URL sqlite+aiosqlite:///./data/explorer.db Database URL
EXPLORER_PORT 9090 Backend port (OpenSandbox service uses 8080)
EXPLORER_HOST 0.0.0.0 Backend bind address
EXPLORER_FRONTEND_PORT 5173 Frontend dev port (dev mode only)
EXPLORER_PUBLIC_URL http://localhost:9090 External URL
EXPLORER_CORS_ORIGINS (empty) Comma-separated CORS origins

API Overview

Endpoint Method Description
/healthz GET Health check
/readyz GET Readiness (DB check)
/api/v1/connections GET/POST List/create connections
/api/v1/connections/{id}/test POST Test connection
/api/v1/sandboxes GET/POST List / direct create sandboxes
/api/v1/connections/{id}/sandboxes POST Create sandbox via connection
/api/v1/connections/{id}/sandboxes/{sid}/files GET List files
/api/v1/connections/{id}/sandboxes/{sid}/file GET/PUT/DELETE File CRUD
/api/v1/connections/{id}/sandboxes/{sid}/commands POST Execute command
/api/v1/connections/{id}/sandboxes/{sid}/commands/{cid}/stream GET SSE stream
/api/v1/sandboxes/{cid}/{sid}/history GET Operation history
/api/v1/connections/{id}/sandboxes/{sid}/terminals POST Create terminal

Project Structure

sandbox-console/
├── start.py                # Unified startup script
├── backend/                # FastAPI backend
│   ├── hatch_build.py     # Build hook: compiles frontend into wheel
│   ├── app/
│   │   ├── cli.py         # CLI entry point (sandbox-console-server)
│   │   ├── main.py        # App factory
│   │   ├── static/        # Bundled frontend (built by hatch_build.py)
│   │   ├── core/          # Config, security, errors
│   │   ├── db/            # Engine, session, base
│   │   ├── models/        # ORM models
│   │   ├── schemas/       # Pydantic IO models
│   │   ├── adapters/      # Sandbox adapters (Fake, OpenSandbox)
│   │   ├── services/      # Business logic
│   │   ├── api/v1/        # REST routes
│   │   ├── realtime/      # WebSocket terminal
│   │   └── observability/ # Metrics, health
│   └── tests/             # Integration tests
├── frontend/              # React + TypeScript frontend
│   └── src/
│       ├── pages/          # Connections, Sandboxes, SandboxDetail
│       ├── features/       # Files, Commands, History, Terminal
│       ├── lib/            # API client, utils
│       └── stores/         # Zustand stores
├── docker/                # Dockerfile (multi-stage)
└── docker-compose.yml

Testing

cd backend
pip install -e ".[dev]"
pytest tests/ -v

License

Apache-2.0 — See LICENSE.

Metadata

Release files for sandbox-console 0.1.0

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

Source distribution (sdist)

Source distribution for sandbox-console 0.1.0
File Size Uploaded Provenance
sandbox_console-0.1.0.tar.gz 203.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sandbox-console 0.1.0
File Interpreter ABI Platform
sandbox_console-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 396.7 kB

Release files / sandbox_console-0.1.0.tar.gz

Download URL sandbox_console-0.1.0.tar.gz
Size 203.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f12072cb6710f0e76fdcf55fbc678a23e151bc3ceaa126c26113bebcebbff412
BLAKE2b-256 checksum
How to use checksums
8314225f2e32931f41f929062da55fb35c07cc5ab5ecbb57bc1f5abbec2f5f57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / sandbox_console-0.1.0-py3-none-any.whl

Download URL sandbox_console-0.1.0-py3-none-any.whl
Size 193.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0882b36382775f40d504a7178c6cbf8a633b37e82334594a924496be99ef93d4
BLAKE2b-256 checksum
How to use checksums
9a79e7d223e42afa7a4adce7f711da6026df94701f15a9a26820036125b417c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for sandbox-console 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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