Cloud computers for AI agents
Upstash Box is a persistent cloud computer with coding agents built in. Run Claude Code, Codex or OpenCode in an isolated box, give it a browser and a repository, and get results back through an API. The workspace stays between tasks, you pay only for the CPU your agent actually uses, and your own coding agent can work in a box through the Upstash MCP server.
Why Upstash Box
Everything an agent needs to finish real work, without building the infrastructure around it yourself.
Agents built in
Claude Code, Codex, OpenCode or Cursor run inside the box. Send a prompt and get the result back with its cost, as text, a stream, or typed output.
Persistent workspace
The repository, installed dependencies and files stay between tasks. A user comes back tomorrow and picks up where they left off.
Pay for active CPU
Agents spend most of their time waiting on the model. Box bills only the CPU your code uses, memory is free, and an idle box pauses.
Headless browser
Chromium in the same box: open the app the agent built, take screenshots, act on the page and extract typed data, with live view and recordings.
Git to pull request
Clone, branch, commit, push and open a pull request from the SDK, so a finished task arrives as a PR instead of a diff in a container.
Schedules and always-on
Run a command or an agent prompt on a cron schedule inside the box, or keep a box on all the time for a flat monthly price.
Isolated by default
Each box has its own filesystem, processes and network, with no access to private networks. Allowlist outbound traffic and keep API keys off the box.
Snapshots and fan-out
Snapshot a ready environment once, then start new boxes from it for each user, task, or parallel attempt.
Give your agent a computer
Build with the @upstash/box SDK for TypeScript and Python, the Box CLI, or the Upstash MCP server.
import { Box, Agent } from "@upstash/box"
const box = await Box.create({
runtime: "node",
agent: {
harness: Agent.ClaudeCode,
model: "anthropic/claude-opus-5-5",
apiKey: process.env.ANTHROPIC_API_KEY,
},
})
const run = await box.agent.run({
prompt: "Set up a Next.js project with Tailwind",
})
console.log(run.result)Use Box from your coding agent
Connect Claude Code, Codex, Cursor or OpenCode to the Upstash MCP server and your agent can create boxes, run commands, open pull requests, publish preview URLs and drive a browser, all on a remote machine instead of your laptop.
Run in your terminal, then type /mcp and choose Authenticate
claude mcp add --scope user --transport http upstash https://mcp.upstash.com/mcpServer URL: https://mcp.upstash.com/mcp. Sign in with OAuth on the first tool call, or pass an API key for CI. MCP setup guide
What can you build with Box?
Agent workloads teams run on Box today, with a guide for each.
Background coding agents
Hand off a task, close the laptop, and review a pull request later. The agent clones, fixes, tests and opens the PR in its own box.
Parallel coding agents
One box per task, all started from the same snapshot, so agents never share a checkout or break each other's builds.
Per-user agent workspaces
Give every user of your product their own box that keeps their project between sessions and pauses when they leave.
Personal agents, always on
Host OpenClaw or Hermes on a keep-alive box that stays reachable from Telegram, WhatsApp or Slack while your laptop is off.
Scheduled browser testing
A box with a browser and a cron schedule wakes up, runs Playwright against your app, saves the results and pauses again.
Remote work from your coding agent
Connect Claude Code, Cursor or Codex to the Upstash MCP server and the agent builds, tests and opens pull requests on a box instead of your laptop.
What is an AI agent sandbox?
A computer the agent can use, without access to yours.
An AI agent sandbox is an isolated environment where an agent runs the code it writes. Coding agents like Claude Code and Codex install packages, run builds and execute commands with real permissions. On a laptop or a shared server, one wrong command or one malicious package can reach your files, your credentials and your network. In a sandbox, the worst it can break is a disposable machine.
Most sandboxes stop there: they give you an isolated machine and leave the rest to you. You install the agent, stream and parse its output, keep its files between sessions, run git, add a browser, and track what each run costs. That integration work is where the time goes.
Upstash Box ships it. Each box is an isolated container with the coding agent already inside, a workspace that persists, git with pull requests, a headless browser and cron schedules, all driven from the SDK. Boxes pause when idle and bill active CPU only, so an agent that spends most of its time waiting on the model costs little to keep around.
Frequently asked questions
Run your first agent in minutes
Start on the free tier with 10 concurrent boxes, 5 CPU hours a month and $1 of model usage. No credit card required.