Skip to main content
This page explains the ideas behind Fibre, in the order you will meet them. Each idea gets a few sentences and a link to the page that covers it in depth. If you read only one page before you start building, make it this one.

Sandbox

A sandbox is an isolated Linux machine that you start with a single API call. It has its own processes, its own files, its own network and its own HTTPS address. Code running in one sandbox cannot see or touch your systems, or any other sandbox. You usually create one sandbox per unit of work: one per user of your app, one per agent task, or one per conversation. Each sandbox has an ID such as sbx-1a2b3c4d5e, which you use in every call that concerns it. More about sandboxes.

Size, runtime and image

When you create a sandbox, three choices decide what kind of machine it is. You can leave all three out and get sensible defaults.
  • Size is how much machine you get: xsmall, small (the default), medium, large or xlarge. Each size has a fixed amount of CPU, memory and disk, and its own price per hour. Sizes and prices.
  • Runtime is how the sandbox runs. standard suits almost everything: code, tools, tests and browsers. vm is a full virtual machine with its own Linux kernel, for software that needs one, such as Docker or systemd. Both cost the same. More about runtimes.
  • Image is the set of files the sandbox starts with. Fibre’s default image already has a shell, Python, Node, git and a browser. You can also use any public image, or build your own. More about images.

Running code: exec and commands

There are two ways to run something in a sandbox, and the difference matters:
  • An exec runs a command and waits for it to finish, then gives you its output. It is the simplest option, and it stops the command after 30 seconds. Use it for quick things.
  • A command runs in the background for as long as it needs. You can watch its output as it is written, send it input, stop it, or keep it running even while the sandbox sleeps. Use it for installs, test runs, servers and agents.
More about running commands.

Files

The files API lets you read, write, list and delete files in a sandbox directly, without going through a shell. It is how you put code and data in, and take results out. More about files.

Sleep and wake

This is what makes Fibre different from a regular server. When nothing has happened in a sandbox for a while (5 minutes, unless you choose another idle timeout), the sandbox goes to sleep. Its memory is saved together with everything else, and you stop paying for compute. The next time anything uses the sandbox (a command, a file call, or someone opening its address) it wakes up exactly where it was. Running programs carry on, data in memory is still there, and open browser tabs are still open. You do not need to write any code to save or restore state. More about sleep and wake.

Lifetime

Sleep is not deletion, and neither is time passing: a sandbox is kept until you delete it, asleep or awake. Fibre never deletes one on its own. If you want a sandbox to delete itself, give it a lifetime, from 60 seconds up to 10 years, counted from when you set it. You can change or remove the lifetime at any time. More about lifetime.

Snapshots

A snapshot is a sandbox saved together with its memory and its running programs. When you start a new sandbox from a snapshot, it begins exactly as the snapshot was: dependencies already installed, servers already running. Snapshots let you do slow setup work once instead of in every sandbox. More about snapshots.

Labels

Labels are key-value tags that you attach to a sandbox, such as user: 42 or task: fix-login. You can list sandboxes by label, so you never need to store sandbox IDs in your own database: you simply ask for “the sandboxes of user 42”. Finding sandboxes again.

Address

Every sandbox has its own HTTPS address, in its url field. If a program in the sandbox listens on the sandbox’s exposed port, anyone with the address can reach it in a browser. This is how you show a user the app an agent built, or share a preview. More about public URLs.

API keys and your organization

Your code signs in with an API key. A key can be limited: to certain kinds of action, to a single sandbox, or to a set lifetime. A key that only works on one sandbox is the safe way to let an agent inside that sandbox use Fibre. More about API keys. Your organization is your account. Sandboxes, keys, usage and billing all belong to it.

States

At any moment, a sandbox’s status is one of these: A sandbox that has been deleted, or whose lifetime has ended, no longer exists. Asking for it returns 404 sandbox_not_found.

Quick reference

See them on a real sandbox

Create a sandbox and look at its answer: you will find most of the ideas above as fields.
response
curl: delete it

Next

Quickstart

Put these ideas to work: start a sandbox and run code in it.

Pricing and limits

What each size costs, the plans, and every limit.