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

# OpenClaw

> Run OpenClaw in a Superserve sandbox.

OpenClaw is an open-source personal AI assistant. Run it in a Superserve sandbox so its actions and shell commands stay isolated from your machine.

## Via the console

1. On the [Secrets page](https://console.superserve.ai/secrets?utm_source=docs\&utm_medium=link), create a secret for your model provider (e.g. **Anthropic**) and paste your API key — you only do this once, and the key never enters the sandbox.
2. Go to [console.superserve.ai](https://console.superserve.ai?utm_source=docs\&utm_medium=link) and click **Create sandbox**.
3. Pick the **`superserve/openclaw`** template (OpenClaw and `tmux` preinstalled).
4. Under **Advanced Options → Secrets**, bind that secret to your provider's key env var (e.g. `ANTHROPIC_API_KEY`).
5. Create the sandbox, open its **Terminal**, and run `openclaw onboard` to start the setup wizard.

## Via the SDK

```bash theme={"theme":{"light":"github-light","dark":"vitesse-dark"}}
npm install @superserve/sdk
export SUPERSERVE_API_KEY=ss_live_...
```

<CodeGroup>
  ```typescript TypeScript theme={"theme":{"light":"github-light","dark":"vitesse-dark"}}
  import { Sandbox, Secret } from "@superserve/sdk"

  // One-time: store your key as a secret. It never enters the sandbox.
  await Secret.create({
    name: "anthropic-key",
    value: "sk-ant-...",
    provider: "anthropic",
  })

  const sandbox = await Sandbox.create({
    name: "openclaw",
    fromTemplate: "superserve/openclaw",
    secrets: { ANTHROPIC_API_KEY: "anthropic-key" },
  })
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"vitesse-dark"}}
  from superserve import Sandbox, Secret

  # One-time: store your key as a secret. It never enters the sandbox.
  Secret.create(name="anthropic-key", value="sk-ant-...", provider="anthropic")

  sandbox = Sandbox.create(
      name="openclaw",
      from_template="superserve/openclaw",
      secrets={"ANTHROPIC_API_KEY": "anthropic-key"},
  )
  ```
</CodeGroup>

OpenClaw reads `ANTHROPIC_API_KEY` as usual, but its value is a [stand-in token](/secrets/overview) — the real key is attached only on requests to the provider, never exposed to the agent.

Open the sandbox in the [console](https://console.superserve.ai?utm_source=docs\&utm_medium=link), launch the terminal, and run `openclaw onboard` to start the setup wizard.

## Keep it running

Start OpenClaw inside `tmux` so it survives closing the terminal or browser tab:

```bash theme={"theme":{"light":"github-light","dark":"vitesse-dark"}}
tmux new -s openclaw
openclaw gateway run
```

Press `Ctrl+b` then `d` to detach. Reattach later with:

```bash theme={"theme":{"light":"github-light","dark":"vitesse-dark"}}
tmux attach -t openclaw
```

## Persist sessions

```typescript theme={"theme":{"light":"github-light","dark":"vitesse-dark"}}
await sandbox.pause()
await sandbox.resume()
```
