What is a sandbox?
A sandbox is a small, temporary computer in the cloud. It starts in a fraction of a second, you – or your AI agent – can do anything inside it, and when you are done it is thrown away. Nothing that happens inside can reach your laptop, your servers or other customers.
Why would I need one?
Modern AI models don't just answer questions – they write code and want to run it to get a real result: compute a number, analyse a spreadsheet, fix a bug and check that tests pass, read a web page. That code has to run somewhere.
Running it on your own machine
- A mistake (or a malicious prompt) can delete files or leak your passwords and API keys
- Leftovers from one task break the next one
- One computer, one task at a time
Running it in a sandbox
- Isolated in its own virtual machine, separated from the host and other sandboxes
- A clean, identical machine every time, ready in milliseconds
- Hundreds of sandboxes in parallel, you pay only for the seconds they run
What people build with it
Code interpreter in a chatbot
Users upload a spreadsheet, the assistant writes Python, runs it in a sandbox and answers with numbers and a chart.
Coding agents
An agent clones a repository, edits code, runs the tests and only proposes changes that pass.
Web research and automation
A real browser that reads pages, fills in forms and takes screenshots – controlled by your agent, not running on your PC.
Data processing
Convert files, crunch CSVs, generate reports or images – each job in its own fresh machine.
Running untrusted code
Evaluate student homework, code from users or from the internet with the network switched off.
Quick, throw-away environments
Try a package, reproduce a bug or run a build in a clean Linux box, then discard it.
How it works
- Template
- What is installed in the sandbox – for example Python with data libraries, Node.js or a browser. See all templates. Your agent can install anything else at runtime with
pip,npmorapt. - Timeout
- Every sandbox has a lifetime you choose when creating it (5 minutes by default in the Python SDK). When it runs out, the sandbox is destroyed. You can extend it at any time; the maximum depends on your plan.
- Files
- Each sandbox has its own disk. Upload input files, let the agent work, download the results – everything else disappears with the sandbox.
- Commands and processes
- Run a command and wait for its output, stream output live, or start a long-running program (a server, a Jupyter kernel) in the background.
- Pause and resume
- Pause freezes the sandbox with its memory and files; you don't pay while it is paused. Resume continues exactly where it stopped – useful between turns of a conversation.
- Network
- Full internet by default, or only selected domains, or no network at all – for your whole team or a single sandbox. Your private networks, our servers and e-mail ports are always blocked.
- Billing
- You pay per second of runtime for vCPU and memory, from prepaid credit. A paused or destroyed sandbox costs nothing.
Quickstart – your first sandbox in 5 minutes
-
Get an API key
Create a free account, then go to API keys and create a key. Treat it like a password.
-
Install the Python SDK
pip install https://sandbox.wbx.cz/download/wbxsandbox-sdk.tar.gz
Prefer another language? Use the REST API – it is plain HTTP and JSON. Using ChatGPT or Claude? Connect it over MCP without writing code.
-
Run code in a sandbox
import os os.environ["WBXSANDBOX_URL"] = "https://sandbox.wbx.cz" os.environ["WBXSANDBOX_API_KEY"] = "YOUR_API_KEY" from wbxsandbox import Sandbox with Sandbox.create(template="base") as sb: # a fresh computer, ready in milliseconds r = sb.run("python3 -c 'print(6 * 7)'") print(r.stdout) # 42 # leaving the block destroys the sandbox
Next: browse the templates, read the SDK guide or copy a ready-made example.
Security and isolation
- Every sandbox is a separate Firecracker virtual machine with its own Linux kernel – the same technology that runs serverless functions at large cloud providers.
- The VM process itself runs locked down (no privileges, its own filesystem view and network namespace), as a second line of defence.
- Firewall rules block traffic between sandboxes and to our servers, private networks and cloud metadata. Outgoing e-mail (SMTP) is blocked.
- Servers and data are located in the EU, operated by KXCOMM s.r.o., an internet service provider.
Frequently asked questions
Is a sandbox a server I can host my website on?
No. Sandboxes are short-lived workspaces – minutes to hours – for running tasks. Everything is deleted when the sandbox ends. For permanent hosting use a regular server.
What happens to my files when the sandbox ends?
They are destroyed together with the disk and memory. Download anything you want to keep before you kill the sandbox or before the timeout.
Can the code in a sandbox access my computer or my company network?
No. It runs on our servers in an isolated VM. It can reach the public internet (unless you turn that off), but never private networks.
How fast does it start?
Templates boot from a memory snapshot: the sandbox is typically ready in a few milliseconds on the server; over the internet the whole API call takes a fraction of a second.
Can I install my own software?
Yes – you have full root inside. Install packages with pip, npm or apt at runtime. For software you need every time, ask us about a custom template so it's already there when the sandbox starts.
How much does it cost?
You pay per second for vCPU and memory while a sandbox runs, from prepaid credit; plans include monthly credit and higher limits. See pricing.