# onshore.sh

Firecracker miniVMs for AI agents, hosted in the EU, compatible with the E2B SDKs.

onshore.sh runs code you do not trust in **miniVMs**: small Firecracker virtual machines that
start from a template in seconds. Each miniVM has its own kernel, memory and disk. When
you kill it, its disk and memory are deleted.

It is built for AI agents. An agent can run commands, write files, start servers and run for
hours. You can pause it and resume it later with its files and processes as they were.

- **EU-hosted.** Except for the optional [Cloud devices](https://onshore.sh/docs/devices) and [app builds](https://onshore.sh/docs/app-builds), your
  workloads and their data are hosted and processed only in the EU, in Scaleway data centres, and
  there is no US cloud provider in the data path.
- **E2B-compatible.** The official E2B Python and JavaScript SDKs work unchanged. Set two
  environment variables and keep your code.
- **Closed by default.** A miniVM reaches no host on the internet until its template allows it.
  Egress credentials and AI-account keys are added to requests at egress and never enter the
  miniVM.

* [Quickstart](https://onshore.sh/docs/quickstart): Sign up, install `ons` and run your first miniVM in under five minutes.
* [Migrate from E2B](https://onshore.sh/docs/guides/migrate-from-e2b): Point the E2B SDKs at onshore.sh with two environment variables.
* [Templates](https://onshore.sh/docs/guides/templates): Describe your environment in `minisandbox.yaml` and build it once.
* [Agent runs](https://onshore.sh/docs/guides/agent-runs): Run Claude Code, Codex or OpenCode on a task in a miniVM. Preview.
* [Concepts](https://onshore.sh/docs/concepts): miniVMs, templates, organizations, egress, pause and resume, credits.
* [Pricing](https://onshore.sh/docs/account/pricing): Per-second prices in credits on allocated vCPU and memory, prepaid in euros.

## How you use it

### ons

```bash
ons create --template base
ons exec <minivm-id> -- python3 -c 'print(6 * 7)'
ons kill <minivm-id>
```

### Python (E2B SDK)

```python
from e2b import Sandbox

sbx = Sandbox.create()
print(sbx.commands.run("python3 -c 'print(6 * 7)'").stdout)
sbx.kill()
```

### JavaScript (E2B SDK)

```javascript
import { Sandbox } from "e2b";

const sbx = await Sandbox.create();
console.log((await sbx.commands.run("python3 -c 'print(6 * 7)'")).stdout);
await sbx.kill();
```

`<minivm-id>` is the id `ons create` prints. The SDK examples need `E2B_DOMAIN=onshore.sh` and
`E2B_API_KEY` set to your onshore.sh API key, see the [Quickstart](https://onshore.sh/docs/quickstart).

onshore.sh is operated by Minitap, Inc.

Markdown version: https://onshore.sh/docs/index.md
