Run coding agents in persistent cloud sandboxes. Bring your code, skills, and tools. Run agents in parallel, save your workspace, and resume your work.
curl -fsSL https://raw.githubusercontent.com/coreweave/cws-agent/main/install.sh | shThe installer works on macOS, Linux, and WSL. It installs uv and configures zsh and bash
for future sessions. Open a new terminal afterward. Install options.
For sandbox access and setup, see Get started with Serverless Sandboxes.
Set your W&B API key:
export WANDB_API_KEY='YOUR_WANDB_KEY'
cws-agent claudeThe command creates a sandbox, prints its generated name (for example,
claude-fa97da5d), and opens Claude Code. Type /login to sign in.
In the following commands, replace SANDBOX with that full name.
Use cws-agent AGENT [NAME] to choose claude, codex, devin, opencode, or
cursor. These are shortcuts for cws-agent launch [NAME] --agent AGENT.
Existing launch commands remain supported, with Claude Code as the default.
See all agents and worker backends.
To use an open source model hosted by W&B instead of the default proprietary models,
choose OpenCode with cws-agent opencode --wandb (OpenCode setup).
Agents use YOLO mode by default. --permission-mode native
uses the agent's own approval settings. Other credentials.
To start Codex using your existing local ChatGPT login, without remote device codes:
cws-agent codex --import-codex-authThis copies your local login into the sandbox before Codex opens. See Codex login import for existing sessions and credential storage details.
Create or reconnect to a sandbox terminal without starting a coding agent:
cws-agent shell dev1
cws-agent shell gpu1 --gpu any:1Exiting leaves the sandbox running. Stop it with cws-agent stop dev1 --no-snapshot.
See the shell guide for images, files, secrets, snapshots, and CoreWeave Kubernetes Service (CKS) volumes.
Launch offers to import local skills and MCP tools. Review or update them later:
cws-agent config preview SANDBOX
cws-agent config sync SANDBOXYou choose what gets copied. Supported configuration.
Upload your local project when creating a sandbox:
cws-agent claude project1 --add-dir .The command uploads the current directory to /workspace/project and saves a snapshot when
the upload completes. Keep this terminal open until the upload finishes. Use cws-agent sync project1 . for later changes. Upload options and recovery.
Choose a conversation across running and saved workspaces:
cws-agent resume
cws-agent resume project1
cws-agent claude --resume SESSION_IDUse arrows and Enter to choose. Resume uses live compute when available, or
restores the latest saved workspace before continuing the conversation.
SESSION_ID is the agent's own chat ID. Workspace names and sandbox IDs also
work with top-level resume. Workspaces and conversations.
Save the workspace so you can restore its files later:
cws-agent stop SANDBOX
cws-agent restore SANDBOX --connectstop snapshots your workspace and stops the sandbox. restore brings the files
back. Exiting the agent alone leaves compute running. Snapshot details.
Keep the agent and conversation in Devin Cloud, Claude Managed Agents, or the OpenAI Agents API while tools execute in your sandbox. After setting up the provider credentials, choose one:
cws-agent devin devinbox --outpost my-outpost
cws-agent anthropic claudebox --claude-env env_REPLACE_ME
cws-agent openai api1Send work through Devin Cloud or the Claude Managed Agents API. For OpenAI, use
cws-agent run api1 "your task" (API setup).
Sign in to project1 with /login, then exit Claude. Give each task its own
Git worktree and branch inside that sandbox:
cws-agent session start project1 fix-auth --prompt "Fix the login bug"
cws-agent session start project1 add-tests --prompt "Add parser tests"
cws-agent session attach project1 fix-auth
cws-agent session diff project1 add-testsBranches are named agent/fix-auth and agent/add-tests. Detach with Ctrl-b, d.
The agent keeps working.
Use Telegram to chat with your agent while your project uploads in the background:
cws-agent claude telegram1 --add-dir . --telegramThe upload survives closing its terminal. Keep your laptop awake and online. The Telegram bridge requires a running terminal.
Chat with Claude Code, OpenCode, or Cursor CLI from Discord. Start with a running,
signed-in sandbox, such as SANDBOX from Get started, and exit the agent to your local shell.
Create a Discord bot and install it in your server. The guide walks through the Developer Portal, bot permissions, token, and server ID. Then enter the bot token privately and start listening:
export DISCORD_BOT_TOKEN="$(uv run --no-project python -c 'import getpass; print(getpass.getpass("Discord bot token: "))')"
cws-agent discord --server 234567890123456789 --sandbox SANDBOXReplace the example server ID with the first number after /channels/ in a Discord
channel URL: https://discord.com/channels/SERVER_ID/CHANNEL_ID.
On mobile, tap your profile avatar → settings gear → Advanced and enable
Developer Mode. Open the server, tap its name, scroll down, and tap Copy Server ID.
In a public channel, select your bot
from the @ mention picker and send a message. It replies in a thread. Mention it
there for follow-ups. You get a receipt, typing indicator, and formatted replies.
The first message starts an agent conversation in the selected sandbox.
Keep this terminal running and its host awake and online. See Discord setup for DMs, shared thread history, and continuing the conversation in your terminal.
CLI guide · Terminal and clipboard · Contributing · Security
Copyright 2026 CoreWeave, Inc. Apache 2.0 · Third-party notices.