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

# nanoVM

> Run your code in fast, isolated microVM sandboxes behind a plain HTTP/JSON API and a Python SDK.

nanoVM runs your code in fast, isolated microVMs ("sandboxes") behind a plain
HTTP/JSON API and a Python SDK. Everything a first-day user needs is on this
page; everything else is one deliberate step deeper.

<Note>
  **Initial pilot:** access by invitation, at most 20 sandboxes per organization and
  4 vCPU / 8 GiB per sandbox. Read the [launch guide](/launch) for first-run
  instructions, cold-image expectations, recovery behavior, support, and pilot terms.
  The timings in these docs are historical development measurements, not service guarantees.
</Note>

## Start

Log in at `https://console.nanovm.dev.lithosai.cloud` (your first login creates
your organization), create an API key on the **API Keys** page (shown once,
starts with `lith_sk_`), then:

```bash theme={null}
python3 -m venv .venv && . .venv/bin/activate
python -m pip install "$(curl -fsS https://console.nanovm.dev.lithosai.cloud/sdk/LATEST)"
export NANOVM_API_URL=https://sk.nanovm.dev.lithosai.cloud NANOVM_TOKEN=lith_sk_...
```

The whole platform, in ten lines:

```python theme={null}
from lithosbox import LithosBox

nv = LithosBox()                                   # reads NANOVM_* env; ONE per process
sb = nv.sandboxes.create(image="python:3.12-slim") # or create() for the default sandbox
sb.run("pip install -q flask")                     # shell semantics, runs to completion
sb.files.write("/app/app.py", code)                # files in, files out
print(sb.run("python /app/app.py --check").stdout)
sb.run("flask --app /app/app run -p 8000", background=True)
print(sb.expose(8000).url)                         # public HTTPS URL
snap = sb.snapshot()                               # save point (memory + disk)
sb2 = nv.snapshots.restore(snap)                   # load it into a NEW sandbox
sb.delete(); sb2.delete()
```

Never `pip install nanovm`/`lithosbox` from PyPI — those names are not ours.
Keep one client per process: its connections are reused, which is most of the
difference between a 10 ms create and a 200 ms one. `with nv.sandboxes.create() as sb:`
deletes on exit (best effort — the downloadable first-run example shows explicit
delete-and-confirm). Complete first run with curl instead:
`curl -fsS https://console.nanovm.dev.lithosai.cloud/examples/first-sandbox.sh | bash`.

**Coding agents:** `python -m lithosbox skill install`, then tell the agent
"set up nanoVM" — details in [For coding agents](/coding-agents).

## Where to go next

<CardGroup cols={2}>
  <Card title="Run commands" icon="terminal" href="/guides/run-commands">
    Shell strings, argv form, sessions, and background work.
  </Card>

  <Card title="Save, restore, fork" icon="git-branch" href="/guides/save-restore">
    Checkpoint a sandbox and fork live copies for parallel work.
  </Card>

  <Card title="The twelve operations" icon="list" href="/reference/sdk">
    The complete SDK surface — one operation per job, arguments select behavior.
  </Card>

  <Card title="HTTP API" icon="code" href="/reference/http-api">
    Every route, the sandbox object, and every status code.
  </Card>
</CardGroup>

## Query these docs from your agent

These docs are agent-readable without any setup: append `.md` to any page URL
for its Markdown, fetch [/llms.txt](/llms.txt) for the index or
[/llms-full.txt](/llms-full.txt) for every page concatenated, install the
nanoVM skill with `npx skills add https://docs.nanovm.dev.lithosai.cloud`, or
connect the docs as an MCP server:

```bash theme={null}
claude mcp add --transport http nanovm-docs https://docs.nanovm.dev.lithosai.cloud/mcp
```

## Getting help

Report anything odd — a stuck sandbox, a confusing error, a slow create — with
the `vm_id` and the time; every request is traceable on our side. See the
[launch guide](/launch) for support channels and pilot terms.
