> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fibre.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Fibre gives every AI agent, user and task its own Linux machine in one API call. It sleeps with its memory when work stops and wakes exactly where it was, so you pay only for the seconds it works.

Every agent that writes code needs somewhere to run it. Your servers are the wrong place, and a fresh container
for every step forgets everything the agent just did.

**Fibre gives each agent, user or task its own Linux machine, in one API call.** It comes with a shell, Python,
Node, git and a browser, and it is isolated from your systems and from every other sandbox. When the work stops, the
sandbox **goes to sleep with its memory intact** and costs nothing for compute. The next call wakes it exactly where
it was: the same processes, the same variables, the same open browser tabs.

```bash title="CLI" run theme={null}
fibre run --rm --lifetime 10m -- python3 -c "print('hello from Fibre')"
```

```typescript title="TypeScript" run theme={null}
import { Sandbox } from "@fibre-dev/sdk";

const sbx = await Sandbox.create({ lifetime: 600 });
const { stdout } = await sbx.run(["python3", "-c", "print('hello from Fibre')"]);
console.log(stdout); // hello from Fibre
await sbx.delete();
```

```python title="Python" run theme={null}
from fibre import Sandbox

sbx = Sandbox.create(lifetime=600)
r = sbx.run(["python3", "-c", "print('hello from Fibre')"])
print(r.stdout)  # hello from Fibre
sbx.delete()
```

```bash title="curl" run theme={null}
SBX=$(curl -sS -X POST "$FIBRE_API_URL/v1/sandboxes" \
  -H "Authorization: Bearer $FIBRE_API_KEY" -H "Content-Type: application/json" \
  -d '{"lifetime_sec": 600}' | jq -r .id)

curl -sS -X POST "$FIBRE_API_URL/v1/sandboxes/$SBX/exec" \
  -H "Authorization: Bearer $FIBRE_API_KEY" -H "Content-Type: application/json" \
  -d '{"command": ["python3", "-c", "print(\"hello from Fibre\")"]}'

curl -sS -o /dev/null -X DELETE "$FIBRE_API_URL/v1/sandboxes/$SBX" -H "Authorization: Bearer $FIBRE_API_KEY"
```

> [accordion] Response
>
> ```json title="response" expected theme={null}
> {
>   "exit_code": 0,
>   "stdout": "hello from Fibre\n"
> }
> ```

That is a whole sandbox's life: start, run, delete. The [quickstart](https://docs.fibre.dev/get-started/quickstart.md) walks through it
with your own key in four steps.

## How a sandbox lives

```mermaid theme={null}
flowchart LR
  A["Create<br/>one API call"] --> B["Running<br/>commands, files, its URL"]
  B -- "nothing happening<br/>for a few minutes" --> C["Asleep<br/>memory saved, no compute cost"]
  C -- "the next call or visit" --> B
  B --> D["Deleted<br/>by you, or at a lifetime you set"]
  C --> D
```

1. **Create** a sandbox when a user signs up, a task starts or a conversation opens. The call returns once it is
   running.
2. **Work in it**: run commands and stream their output, move files in and out, serve an app at its own HTTPS
   address, drive its browser.
3. **Let it sleep.** When nothing has happened for a few minutes, it sleeps on its own. There is nothing to save
   or shut down.
4. **Come back any time.** The next call, or a visit to its URL, wakes it with everything where it was.
5. **Delete it** when the job is truly done. Until then it is kept, or give it a lifetime and it deletes itself.

## Why build on Fibre

> [card] [Memory survives sleep](https://docs.fibre.dev/sandboxes/sleep-and-wake.md)
>
> A dev server, a loaded dataset, an agent's session, a logged-in browser: all still there after a wake. **No cold
> starts to engineer around**, and no state to save and restore.

> [card] [Pay for awake seconds only](https://docs.fibre.dev/get-started/pricing.md)
>
> Billed per second while a sandbox works, nothing for compute while it sleeps. A sandbox per user, active 30
> minutes a day on 20 days a month, costs about **\$0.30**.

> [card] [Real machines, two kinds](https://docs.fibre.dev/sandboxes/runtimes.md)
>
> `standard` for code, tests and browsers; `vm`, a full virtual machine with its own kernel, for **Docker,
> Compose and systemd**. Same API, same price.

> [card] [Made for agents](https://docs.fibre.dev/get-started/api-keys.md)
>
> An [MCP server](https://docs.fibre.dev/build-with-ai/mcp-server.md) that gives your coding agent sandboxes, keys that work on **one
> sandbox only**, network allow lists for untrusted code, and signed webhooks.

## What developers build with it

> [card] [A code interpreter for your AI app](https://docs.fibre.dev/use-cases/run-code.md)
>
> A model writes Python; a sandbox per conversation runs it and returns the output and charts.

> [card] [A coding agent on your repo](https://docs.fibre.dev/use-cases/coding-agent.md)
>
> Claude Code or Codex fixes a bug in a machine of its own; you review the diff.

> [card] [A sandbox per user](https://docs.fibre.dev/use-cases/sandbox-per-user.md)
>
> A workspace for every user of your product, with no compute cost while they are away.

> [card] [Many agents in parallel](https://docs.fibre.dev/use-cases/parallel.md)
>
> One prepared environment, a copy per task, all running at once.

> [card] [Preview environments](https://docs.fibre.dev/use-cases/dev-server.md)
>
> A live link for every pull request, updating as the code changes.

> [card] [Browser automation](https://docs.fibre.dev/connect/browser.md)
>
> A real Chromium for Playwright, with a live view and logins that last.

See [all use cases](https://docs.fibre.dev/use-cases/overview.md), each a complete program you can run.

## Start here

> [card] [Quickstart](https://docs.fibre.dev/get-started/quickstart.md)
>
> Your first sandbox, step by step.

> [card] [Concepts](https://docs.fibre.dev/get-started/concepts.md)
>
> The words and states, in one page.

> [card] [From your coding agent](https://docs.fibre.dev/build-with-ai/coding-agents.md)
>
> Let Claude Code, Codex or Cursor write the code.

## At a glance

| | |
| - | - |
| Start | One API call; it answers when the sandbox is running |
| Billing | Per second, only while awake |
| Sleep | After 5 minutes with nothing happening; you choose shorter, longer or never |
| Lifetime | None unless you set one: kept until you delete it. Up to 10 years, changed or removed at any time |
| Sizes | `xsmall` 1 vCPU / 2 GB to `xlarge` 16 vCPU / 32 GB, from \$0.0075 an hour; `small` (2 vCPU / 4 GB) unless you choose. See [pricing and limits](https://docs.fibre.dev/get-started/pricing.md) |
| Default image | Linux with a shell, Python 3.11, Node 22, git and Chromium; or your own image |
| Clients | The [TypeScript](https://docs.fibre.dev/sdks/typescript.md) and [Python](https://docs.fibre.dev/sdks/python.md) SDKs, the [CLI](https://docs.fibre.dev/sdks/cli.md) and the [HTTP API](https://docs.fibre.dev/api-reference/introduction.md) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.