Research Preview
Get a personal OpenClaw instance running in a Vercel Sandbox with one command.
npx @vercel/vclaw create --scope your-team
This is the only fully supported install path. Use it unless you have a specific reason not to.
The Deploy button starts a project but stops short of a working OpenClaw. vclaw takes you end-to-end:
| Step | vclaw create |
Deploy button |
|---|---|---|
Uses or clones vercel-labs/vercel-openclaw |
yes | yes |
| Links a Vercel project in the scope you pick | yes | partial (browser flow) |
| Provisions Redis via the Marketplace integration | yes | yes |
Prompts for and sets ADMIN_SECRET |
yes | yes |
Can set CRON_SECRET for independent cron rotation |
yes, with --cron-secret |
no |
Enables Deployment Protection and wires VERCEL_AUTOMATION_BYPASS_SECRET |
yes (--deployment-protection) |
no |
| Runs a production deploy | yes | yes |
| Runs launch verification against the live URL | yes | no |
Works headlessly with VERCEL_TOKEN |
yes | no |
Result: after vclaw create finishes, channel webhooks can reach OpenClaw through protection when bypass is configured, and you have proof the sandbox can complete a real chat roundtrip. Cron auth rotates independently from your admin login only when you pass --cron-secret; otherwise the runtime falls back to ADMIN_SECRET. The Deploy button gets you a booted UI, nothing more.
- Node.js 20 or newer
git- The Vercel CLI:
npm i -g vercel - Authenticated: run
vercel login, or exportVERCEL_TOKENfor non-interactive runs
Check your environment before you start:
npx @vercel/vclaw doctornpx @vercel/vclaw create --scope your-teamFor the full onboarding path across the CLI, dashboard, sandbox runtime, and release contracts, read the Getting Started Guide. It is the main guide for maintainers and agents working across vclaw, vercel-openclaw, and the OpenClaw fork.
This walks through the full setup:
- Verifies local prerequisites.
- Picks a Vercel scope (prompts if you have more than one).
- Uses a managed workspace under
~/.vclawby default, or uses the directory passed with--dir. Pass--cloneto clone or updatevercel-labs/vercel-openclawinto that directory. - Creates and links a Vercel project (prompts for a unique name if
openclawis taken). - Provisions Redis via the Redis Cloud Marketplace integration.
- Optionally enables Deployment Protection (
ssoorpassword) and sets the automation bypass secret so webhooks still reach the app. - Prompts for
ADMIN_SECRET(masked, confirmed). This is the password you will type into the admin UI. - Pushes managed env vars:
ADMIN_SECRET,CRON_SECRET(if--cron-secretis set),VERCEL_AUTOMATION_BYPASS_SECRET(if protection is enabled). - Runs a production deploy.
- Runs launch verification against the new URL and reports
channelReadiness. - Optionally wires a Telegram bot with
--telegram, or Slack through the interactive--slackflow, non-interactive--slack-config-token, or--slack-bot-token --slack-signing-secretflows.
Choose a project name and use an existing checkout:
vclaw create --scope your-team --name my-openclaw --dir ~/dev/vercel-openclawClone or update into a chosen directory:
vclaw create --scope your-team --name my-openclaw --dir ~/dev/my-openclaw --cloneEnable SSO deployment protection (auto-configures webhook bypass):
vclaw create --scope your-team --deployment-protection ssoPrepare a project but skip the deploy step:
vclaw create --scope your-team --skip-deployWire up a Telegram bot in the same run:
vclaw create --scope your-team --telegram "123456:AA...BotFatherToken"After launch verification passes, vclaw calls PUT /api/channels/telegram on the new deployment. The app validates the token via Telegram's getMe, generates a webhook secret, registers the Vercel URL with Telegram, and syncs slash commands — no admin-panel clicks needed.
Wire up Slack in the same run:
vclaw create --scope your-team --slack--slack opens the interactive Slack setup menu. For non-interactive Slack setup, choose one flow:
# Create a new Slack app, then complete OAuth in the browser.
vclaw create --scope your-team \
--slack-config-token "$SLACK_CONFIG_TOKEN" \
--slack-app-name "My OpenClaw"# Connect an existing Slack app.
vclaw create --scope your-team \
--slack-bot-token "xoxb-..." \
--slack-signing-secret "abcd1234..."--slack-config-token creates a new app and opens the OAuth install flow. --slack-bot-token and --slack-signing-secret must be passed together for an existing app.
Slack setup requires a live deployment and is mutually exclusive with --skip-deploy.
Re-run launch verification against an existing deployment:
vclaw verify \
--url https://my-openclaw.vercel.app \
--admin-secret "$ADMIN_SECRET"For protected deployments, include the automation bypass secret:
vclaw verify \
--url https://my-openclaw.vercel.app \
--admin-secret "$ADMIN_SECRET" \
--protection-bypass "$VERCEL_AUTOMATION_BYPASS_SECRET"Full reference: github.com/vercel-labs/vclaw.
Alternative: Deploy button (not recommended)
Use this only if you cannot install Node locally. It provisions Redis and prompts for ADMIN_SECRET, but leaves Deployment Protection, CRON_SECRET, and launch verification for you to do by hand afterward.
After the deploy finishes, you still need to:
- Sign in with your
ADMIN_SECRET. - Run destructive launch verification from the admin panel before connecting any channel.
- Manually set
CRON_SECRETif you want cron auth separate from admin login. - Manually enable Deployment Protection and set
VERCEL_AUTOMATION_BYPASS_SECRETif you want protected previews that channels can still reach.
A Next.js app that wraps OpenClaw in a full control plane (auth, persistent sandboxes, channel integrations, egress firewall) and runs it inside a Vercel Sandbox.
After vclaw create finishes:
- Sign in. Open the printed deployment URL and enter your
ADMIN_SECRET. - Use OpenClaw. Visit
/gatewayor click Start in the admin panel. First boot takes about a minute while OpenClaw installs into the sandbox. Resumes after that take about 10 seconds (the sandbox auto-snapshots on stop and auto-resumes on get). - Verify.
vclawalready ran launch verification once. Re-run it from the admin panel any time you change config. Preflight is only a config-readiness check; it does not prove the sandbox can complete a real channel delivery. - Connect channels. Wire up Slack, Telegram, WhatsApp (experimental), or Discord (experimental) from the admin panel — or pre-wire Telegram and Slack during
vclaw createitself with--telegram/--slack --slack-signing-secret. For Slack OAuth install, setSLACK_CLIENT_ID,SLACK_CLIENT_SECRET, andSLACK_SIGNING_SECRET, or enter credentials manually. A deployment is channel-ready only after destructive launch verification passes andchannelReadiness.readyistrue.
- Full OpenClaw UI proxied at
/gatewaywith auth and WebSocket rewriting. - Persistent sandboxes. State is preserved on stop and restored on resume.
- Slack, Telegram, WhatsApp (experimental), and Discord (experimental) channels with durable delivery.
- Egress firewall. Learn which domains your agent talks to, then lock it down.
- Auto-wake. A cron watchdog wakes your sandbox when scheduled OpenClaw jobs are due.
| Technology | Role |
|---|---|
| Next.js | App framework |
| Vercel Sandbox | Runs the OpenClaw instance (persistent sandboxes, auto-snapshot on stop, auto-resume on get) |
| Vercel AI Gateway | OIDC-authenticated model access for the agent |
| Redis Cloud | Persistent state for metadata, snapshots, and channel config (any Redis-wire-protocol endpoint works) |
| Vercel Workflow | Durable channel message delivery (Slack, Telegram; WhatsApp and Discord experimental) |
| Vercel Queues | Launch verification probe delivery |
| Vercel Cron | Watchdog health checks and scheduled wake |
For the default path (VERCEL_AUTH_MODE=admin-secret), the only value you must provide up front is ADMIN_SECRET. Everything else auto-configures:
- Redis. Provisioned by
vclaw(or the Deploy button) via the Redis Cloud Marketplace integration, which setsREDIS_URL. - AI Gateway auth. Handled via Vercel OIDC on deployed environments.
- Cron secret. Falls back to
ADMIN_SECRETwhenCRON_SECRETis unset. SetCRON_SECRETseparately on deployed environments if you want cron auth to rotate independently from admin login.vclaw --cron-secretsets this for you. - Watchdog cron. Runs once daily by default so Hobby-plan deploys succeed. Pro plans can increase the schedule in
vercel.jsonup to every minute for more responsive auto-wake.
Switching to VERCEL_AUTH_MODE=sign-in-with-vercel also requires NEXT_PUBLIC_VERCEL_APP_CLIENT_ID, VERCEL_APP_CLIENT_SECRET, and SESSION_SECRET.
See docs/environment-variables.md for the full reference, including optional tuning (vCPU count, sleep timeout, version pinning) and alternative auth modes.
pnpm install
vercel link && vercel env pull # pulls OIDC credentials for AI Gateway
pnpm dev # http://localhost:3000To tweak the admin UI against real prod Redis/metadata without risking accidental mutations:
vercel env pull .env.local --environment=production
# then in .env.local:
# VERCEL_ENV=development # flips the Vercel-deployment gate so Redis connects
# LOCAL_READ_ONLY=1 # blocks every admin mutation route with 403 LOCAL_READ_ONLY
# unset VERCEL_AUTH_MODE # use admin-secret auth locally
pnpm devWith LOCAL_READ_ONLY=1, POST /api/admin/stop, /ensure, /reset, /snapshot, and channel config writes all return 403 { error: "LOCAL_READ_ONLY" } before touching the sandbox SDK. Reads (/api/status, /api/admin/preflight, /api/admin/logs) still work. Unset the variable when you actually want to test a mutation.
Channel delivery has several independent states: the app can be connected, the sandbox can be running, the native handler can accept a forward, and the user still might not see a reply. When Slack, Telegram, Discord, or WhatsApp is stuck, use the repo-local Codex agents and skills to split evidence gathering by channel instead of guessing from one readiness label.
Codex custom agent roles live in .codex/agents/*.toml; shared debugging playbooks live in .agents/skills/*/SKILL.md. Use the channel agents for parallel triage and the skills for repeatable evidence collection:
| Channel | Agent | Primary skill | Focus |
|---|---|---|---|
| Telegram | channel_telegram |
telegram-native-8787 |
Native port 8787, webhook secret flow, boot cleanup, user-visible replies |
| Slack | channel_slack |
slack-delivery |
OAuth vs delivery readiness, raw-body signature forwarding, /slack/events fast path |
| Discord | channel_discord |
discord-delivery |
Ed25519 verification, interaction deferral, token expiry, workflow forwarding |
channel_whatsapp |
whatsapp-delivery |
Meta verification, raw-body signatures, link-state projection, boot messages |
For any channel incident, start with $channel-debug-core. It requires deployment-state proof, the admin readiness surfaces, a runtime path diagram, a hypothesis table, and a channel handoff before proposing a fix. Before changing webhook routes or the shared workflow, use $channel-forward-parity to verify every terminal path logs, updates lastForward, classifies failures, and refreshes stale sandbox port URLs when needed.
Suggested workflow:
- Prove the deployed runtime matches the source you are reading: local
git rev-parse HEAD, remotegit ls-remote origin main, and liveGET /api/admin/sandbox-diag. - Collect
GET /api/admin/why-not-ready,GET /api/channels/summary,GET /api/admin/sandbox-diag, andGET /api/admin/logsbefore editing code. - If multiple channels are suspect, explicitly spawn the relevant channel agents and ask each to return
.agents/skills/channel-debug-core/references/handoff-template.md. - Keep
route-ready,native-accepted, anduser-visible-replyseparate in the report. A greenlastForwardis not proof that the user saw a message. - Save raw runtime evidence under
.agent-runs/channel-debug/<timestamp>/and do not commit it.
Channel delivery is only one slice of the wrapper. For cron, lifecycle, proxy, firewall, auth/store, bootstrap, launch verification, and admin UI work, use the matching repo-local Codex agent plus its skill so each investigation starts from the right evidence and file ownership.
| Area | Agent | Primary skill | Focus |
|---|---|---|---|
| Cron/watchdog | cron_watchdog |
cron-watchdog-debug |
Vercel Cron auth, watchdog reports, cron wake keys, token refresh, OpenClaw job evidence |
| Sandbox lifecycle | sandbox_lifecycle |
sandbox-lifecycle-debug |
create/resume/stop/snapshot/reset, stale-running reconciliation, locks, hot spares |
| Gateway/proxy | gateway_proxy |
gateway-proxy-debug |
/gateway, HTML injection, WebSocket rewrite, waiting page, gateway-token handoff |
| Firewall/AI Gateway | firewall_ai_gateway |
firewall-ai-gateway-debug |
network policy, OIDC token refresh, transform rules, egress allowlists |
| Auth/store | auth_store |
auth-store-debug |
admin-secret, Vercel auth, sessions, CSRF, Redis/memory store, keyspace |
| OpenClaw bootstrap | openclaw_bootstrap |
openclaw-bootstrap-debug |
bundle sidecars, config hashes, restore assets, plugin discovery, gateway restart |
| Launch verification | launch_verify |
launch-verify-debug |
preflight, queue ping, chat completions, wake-from-sleep, restorePrepared, remote smoke |
| Admin UI | admin_ui |
admin-ui-debug |
command shell, status panels, action helpers, operator copy, visual verification |
For cron incidents, start with $cron-watchdog-debug and keep these states separate: Vercel Cron invoked, watchdog authorized, cron wake due, sandbox woke, AI Gateway token refreshed, OpenClaw cron scheduler loaded jobs, and user-visible delivery happened. Save raw runtime evidence under .agent-runs/cron-debug/<timestamp>/ and do not commit it.
| Document | Contents |
|---|---|
| Getting Started Guide | Main handoff for the three-repo system, operational paths, vclaw create, release, and reliability contracts |
| Architecture | System overview and subsystem map |
| Sandbox Lifecycle and Restore | State transitions, persistent sandboxes, resume behavior |
| Preflight and Launch Verification | Deployment readiness and runtime verification |
| Channels and Webhooks | Channel setup (Slack, Telegram, WhatsApp, Discord), readiness, protection behavior |
| Environment Variables | Full env var reference |
| API Reference | Endpoint and payload reference |
| Deployment Protection | Bypass secret behavior and display-safe URLs |
| Architecture Tradeoffs | Why the codebase is shaped this way, alternatives explored |
| Contributing | Architecture, routes, testing, development workflows |