OpenClaw
The OpenClaw sandbox — gateway, desktop, and full AI coding toolchain on agentstead.dev.
OpenClaw is the default AgentStead sandbox. It runs a full Kasm desktop alongside an OpenClaw gateway — a Node.js process that manages provider connections, model routing, and agent session state.
Port: 18789 | Token type: Gateway Token | Recommended for: most users
What starts on boot
When an OpenClaw agent comes online:
- Homebrew seeding — on first boot, Homebrew is copied from the image to your persistent
/data/homebrewvolume (~30 seconds). Subsequent boots are instant. - OpenClaw onboarding — runs once on first boot to initialise
~/.openclaw/config. - Chrome with CDP — Google Chrome starts with remote debugging on port
9222. This enables browser automation tools (Playwright, Puppeteer, CDP-based agents). - OpenClaw gateway — the daemon starts on port
18789, bound to loopback. AgentStead proxies it through your public URL.
LLM access
OpenClaw agents have two ways to access LLMs:
Managed endpoint (no API keys needed): AGENTSTEAD_PROXY_TOKEN is injected automatically and works with the managed LLM proxy. Use this from scripts, MCP servers, or any tool that accepts a custom OpenAI-compatible base URL.
OpenClaw's own model config: The OpenClaw desktop — Claude Code, OpenCode, Kilo Code — uses OpenClaw's own credential store. Set provider keys directly in OpenClaw:
openclaw config set models.providers.anthropic.apiKey <key>
openclaw config set models.providers.openai.apiKey <key>
openclaw config set models.providers.openrouter.apiKey <key>
# View what's configured
openclaw config list models.providersOr use the Control UI → Settings → Models.
BYOK via Env Vars: Any keys you add to the Env Vars tab are injected as environment variables at startup. Tools that read from the environment (Claude Code, Codex) pick them up automatically — add the key, restart.
| Variable | Used by |
|---|---|
ANTHROPIC_API_KEY | Claude Code, OpenCode (Anthropic) |
OPENAI_API_KEY | Codex, OpenCode (OpenAI) |
OPENROUTER_API_KEY | OpenCode (OpenRouter) |
GROQ_API_KEY | OpenCode (Groq) |
GOOGLE_API_KEY | OpenCode (Gemini) |
XAI_API_KEY | OpenCode (xAI) |
MISTRAL_API_KEY | OpenCode (Mistral) |
DEEPSEEK_API_KEY | OpenCode (DeepSeek) |
Getting started with Claude Code
Configure your Anthropic key in OpenClaw
Claude Code reads its API key from OpenClaw's config. Open a terminal and run:
openclaw config set models.providers.anthropic.apiKey <your-key>Or add ANTHROPIC_API_KEY to the Env Vars tab in the dashboard and restart the agent — it'll be picked up from the environment.
Get an Anthropic key at console.anthropic.com.
Open a terminal
Click Open Desktop and open a terminal (right-click desktop → Terminal, or launch from the taskbar).
Start Claude Code
cd ~/your-project # or clone one: git clone https://github.com/...
claudeVerify it works
claude --version
# Claude Code x.x.xGetting started with Codex
Add your OpenAI key
In Secrets, add OPENAI_API_KEY with your key from platform.openai.com.
Restart if needed
If the agent was already running when you added the key, restart it from the dashboard so the key is injected.
Run Codex
codex --version
# @openai/codex x.x.x
cd ~/your-project
codexGetting started with OpenCode
OpenCode supports multiple providers. Add any of the keys in the table above to Secrets, restart, and run:
opencode --version
opencodeOn first launch, OpenCode shows a TUI to pick your provider and model. Since keys are in the environment, it detects them automatically.
VS Code
VS Code is pre-installed (included in the Kasm base image). The Kilo Code extension is pre-baked and ready to use — open VS Code from the desktop and it's there.
# Open VS Code from terminal
code ~/your-projectKilo Code is an AI coding assistant that works with multiple providers. Configure it from the Kilo Code panel in the VS Code sidebar.
Neovim + LazyVim
Neovim with a LazyVim starter config is pre-installed. On first launch, LazyVim downloads its plugins (requires internet — your agent always has it):
nvim ~/your-project/file.ts
# LazyVim installs plugins on first open (~30 seconds)The config lives at ~/.config/nvim/ in your persistent workspace, so plugin installations survive restarts.
Homebrew
Homebrew is seeded to /data/homebrew on first boot and persists. Install any package you need:
brew install jless # JSON viewer
brew install gh # GitHub CLI (already installed via apt too)
brew install httpie # Friendly HTTP client
brew install deno # Deno runtimeInstalled packages are part of your persistent workspace and survive agent restarts.
Browser automation
Chrome runs with Chrome DevTools Protocol (CDP) on port 9222 — accessible from within the agent. Tools like Playwright and Puppeteer can connect to it directly:
# Playwright connects to the running Chrome instance
npx playwright install chromium # only needed onceThe CDP endpoint is http://localhost:9222. This is the same browser you see in the desktop's browser view.
Pre-installed tools
OpenClaw includes the full platform toolchain. Highlights:
Claude Code
claude — Anthropic's AI coding agent. Key auto-injected.
Codex
codex — OpenAI Codex CLI. Needs OPENAI_API_KEY.
OpenCode
opencode — multi-provider AI coding TUI.
VS Code + Kilo Code
Pre-installed with Kilo Code AI extension.
Neovim + LazyVim
nvim — LazyVim starter config pre-configured.
Homebrew
brew — persistent package manager on /data/homebrew.
See Pre-installed Tools for the full list.

