Most people connect a sandbox to their AI, ask it to run one script, and stop there. That's a bit like buying a laptop to use the calculator.
We've been using WBX Sandbox with Claude every day for a few weeks, for real work and for silly things like birthday invitations. These are the habits that made the biggest difference.
1. Ask for a program, not for the output
This is the big one. If you ask an AI to write 20 invitations, it types 20 invitations into the chat. Every one of them costs tokens, and number 17 tends to drift.
Ask it to write one program that makes the 20 invitations instead. The sandbox runs it, the output is consistent, and the chat only sees a short summary. We made 150 race certificates from a spreadsheet this way. The program was about 100 lines.
Prompt that works:
Use the sandbox. Write a script that generates the files, run it, and give me a ZIP. Don't paste the content into the chat.
2. Give the sandbox a name
An unnamed sandbox is good for one conversation. A named one comes back:
Create a sandbox called
invoicesand keep working there.
When it's idle it falls asleep and keeps its disk. Next week, in a new chat, the same name wakes the same machine with your files, installed packages and half-finished scripts. It's the closest thing to "my project folder" an AI chat has.
3. Long work goes to a job, not a command
A command that takes 20 minutes is fragile. Chats time out and connections drop. For anything longer than a few minutes, tell the AI to start a background job:
Run this as a job and wait for it.
The job keeps running even if the chat disconnects. The AI waits for it on the server side instead of asking "done yet?" every few seconds, which saves a surprising number of turns.
4. Fan out
Have 300 files to convert, 40 test configurations, or 12 language versions? Ask for a batch. Each item runs as its own job with a concurrency limit, a failure stays local to its job, and at the end you get one summary instead of 300 messages.
Process every CSV in the folder as a separate job, at most 10 at a time, then give me a table of what failed.
5. Put a price cap on it
An agent in a loop can keep spending. Give each job or batch a maximum cost, and the platform refuses anything that could go over it before it starts, not halfway through. The AI can also check the remaining budget itself. One line in the prompt:
Keep the whole batch under [your limit].
6. Pick the network you actually need
Not every task needs the internet.
- No network for sensitive data or code you don't trust.
- An allowlist when it only needs, say, PyPI and one API.
- Full internet for scraping, downloads and package installs.
- IPv6, if you want the sandbox to have its own public address.
It's one sentence to the AI: "create the sandbox without internet access".
7. Show it to a human
Anything that listens on a port can get an HTTPS link. The AI builds a small web page, a dashboard or an RSVP form, starts it, and sends you a link you can open on your phone. The link is protected by a token, so only people you share it with get in.
That's how our birthday demo ended: the AI made the invitations, a shopping list, and a page where parents could reply.
8. Use the right template and size
The default image is Debian with Python. There's also a template with a headless browser for screenshots, PDFs and scraping. Heavier work, like running a speech model, needs more memory, so ask for a bigger template or compute class. We generated the voice-over for our videos with an open-source TTS model in a sandbox with 2 GB of RAM.
9. Get the files out properly
Results don't have to come back as text in the chat. Jobs save result files, each with a SHA-256, and the AI can download them, zip them, or hand you a link. Logs are shortened to what matters: test results and errors with context, and the end of the log. The raw log is still there if it's really needed.
10. Ask what actually ran
Every job leaves a receipt: the command, the template, runtime, exit code, CPU and memory used, and hashes of the output files. It isn't a cryptographic proof, just a plain record. But when an AI says "the tests passed", you can check what it actually ran.
The short version: let the AI write programs instead of answers, give its machine a name, push long work into jobs, cap the cost, and ask for links and files instead of walls of text.
WBX Sandbox connects through MCP (https://sandbox.wbx.cz/mcp), and there's also a REST API, a Python SDK and a LangChain integration. If you've found other good habits, I'd like to hear them in the comments.
Top comments (0)