ASAgentStead Docs
Runtimes

OpenClaw

The OpenClaw runtime — gateway, desktop, and full AI coding toolchain on agentstead.dev.

OpenClaw is the default AgentStead runtime. It runs a full Kasm desktop alongside an OpenClaw gateway — a Node.js process that manages provider connections, API key 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:

  1. Homebrew seeding — on first boot, Homebrew is copied from the image to your persistent /data/homebrew volume (~30 seconds). Subsequent boots are instant.
  2. OpenClaw onboarding — runs once on first boot to initialise ~/.openclaw/ config.
  3. Chrome with CDP — Google Chrome starts with remote debugging on port 9222. This enables browser automation tools (Playwright, Puppeteer, CDP-based agents).
  4. OpenClaw gateway — the daemon starts on port 18789, bound to loopback. AgentStead proxies it through your public URL.

API key injection

Every API key you add to Secrets in the dashboard is automatically injected into the OpenClaw gateway config on startup. You don't need to manually configure each tool — set the secret and restart.

Keys that are auto-injected:

Secret nameUsed by
ANTHROPIC_API_KEYClaude Code, OpenCode (Anthropic)
OPENAI_API_KEYCodex, OpenCode (OpenAI)
OPENROUTER_API_KEYOpenCode (OpenRouter)
GROQ_API_KEYOpenCode (Groq)
GOOGLE_API_KEYOpenCode (Gemini)
XAI_API_KEYOpenCode (xAI)
MISTRAL_API_KEYOpenCode (Mistral)
DEEPSEEK_API_KEYOpenCode (DeepSeek)

Getting started with Claude Code

Add your Anthropic key

In the dashboard, open your agent → Secrets → add ANTHROPIC_API_KEY with your key from console.anthropic.com.

If you added the key before deploying, it's already injected. No restart needed on first deploy.

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/...
claude

Because ANTHROPIC_API_KEY is injected automatically, Claude Code picks it up from the environment. No claude auth login needed.

Verify it works

claude --version
# Claude Code x.x.x

echo $ANTHROPIC_API_KEY
# sk-ant-... (your key)

Getting 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
codex

Getting started with OpenCode

OpenCode supports multiple providers. Add any of the keys in the table above to Secrets, restart, and run:

opencode --version
opencode

On 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-project

Kilo 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 runtime

Installed 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 once

The 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.