Skip to main content
Before you run your first real workload, two questions come up: how big should the sandbox be, and what is already installed in it? This page answers both, and shows how to add anything that is missing.

Sizes

A sandbox’s size decides how much CPU, memory and disk it gets. Bigger sizes do heavy work faster, and cost more per hour while they are awake: You are billed per second while the sandbox is awake, and nothing for compute while it sleeps. Both runtimes cost the same. To choose a size, pass it when you create the sandbox, then check what you got:
response
Start small and grow if you need to. Since a sleeping sandbox costs nothing for compute, the size only matters for the work it does while awake. If you notice an agent’s builds running out of memory, create its next sandbox one size up.

An exact amount

If none of the sizes fits, you can ask for an exact amount instead: cpu_cores (from 0.25 to 16) and memory_mb (from 256 to 32768). The sandbox is then billed as the smallest size that covers both. For example, 3 cores and 6 GB is billed as medium.

What the default image has

If you do not choose an image, the sandbox starts from Fibre’s default image. It is Debian Linux, with the tools an agent usually reaches for first already installed: You can check the versions yourself with a single command:
response

Install what is missing

Inside the sandbox you are the root user and the network is open, so you can install anything you need, with the usual tools: pip for Python, npm for Node and apt-get for system packages. Installs often take longer than the 30 seconds an exec allows, so run them as background commands. In the SDKs, sbx.run() does that for you:
curl: wait for it
output
Install Python packages into a virtual environment. On the default image, the system’s Python refuses a plain pip install and reports an “externally managed environment”. Creating a virtual environment with python3 -m venv takes a second and avoids the problem, as the example above shows.
Installing the same things in every new sandbox wastes minutes each time. Do it once and save the result, either as a snapshot (new sandboxes start with everything installed and already running) or as your own image.

Bring your own image

You are not limited to the default image. Any image from a public registry, such as Docker Hub, can be the starting point for a sandbox. Name it in image, and add "ready": "process" (explained below):
curl: check, then clean up
response
  • The first sandbox from a new image takes a little longer, because Fibre has to download the image. Later sandboxes from the same image start quickly.
  • "ready": "process" tells Fibre the sandbox is ready as soon as it starts, and Fibre keeps it running so you can run commands in it. That is what you want for a general-purpose image such as python, node or ubuntu.
  • The browser features need Chromium, which the default image includes. A custom image without Chromium can still run code and commands, but not the browser.
Without "ready": "process", Fibre treats your image as a server: it runs the image’s own command and waits for it to answer on its port (exposed_port, 8000 unless you set it). A base image whose command exits at once, or never listens, fails to start. Use "ready": "process" for sandboxes you run commands in, and exposed_port for images that serve an app.

Pricing and limits

Plans, storage and a worked monthly cost.

Runtimes

When the workload needs Docker or a full VM.