upstash-box-js

Create and orchestrate sandboxed cloud containers with AI agents, shell, filesystem, and git using the @upstash/box SDK.

2|1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/zester4/zilmate --skill upstash-box-js-zester4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upstash-box-js
Source: https://github.com/zester4/zilmate/tree/main/.agents/skills/upstash-box-js
Command: npx skills add https://github.com/zester4/zilmate --skill upstash-box-js-zester4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @upstash/box, zod.

What problem does it solve? Running AI coding agents and untrusted commands locally risks your machine and requires complex sandbox setup. This Skill provides the complete API reference for the @upstash/box TypeScript/JavaScript SDK, letting you spin up isolated cloud containers with built-in AI agents, shell execution, filesystem access, and git integration. ## Core Features & Use Cases - Sandboxed AI Agent Runs: Create boxes with Claude Code, Codex, or OpenCode agents, run prompts with structured Zod-schema outputs, streaming, webhooks, and cost tracking. - Full Container Control: Execute shell commands and code snippets, manage files (including binary/base64), clone repos, commit, push, and open pull requests via the git API. - Lifecycle Management: Snapshot and fork boxes, expose ports as public URLs with optional auth, attach MCP servers, and use short-lived EphemeralBox instances for quick tasks. - Use Case: Build a CI bot that forks a sandboxed box per pull request, runs an AI agent to review the code with a structured verdict schema, and posts results back to GitHub. ## Quick Start Ask the AI to create an Upstash Box with a Node runtime and Claude Code agent, then run a prompt that reviews a cloned repository for security issues and returns a structured verdict.

Frequently Asked Questions about upstash-box-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an AI agent in a sandboxed cloud container with TypeScript?

Install @upstash/box and call Box.create with an agent config specifying a harness like Agent.ClaudeCode and a model. Then use box.agent.run with a prompt, optionally adding a Zod responseSchema for typed structured output.

How do I get structured output from an Upstash Box agent run?

Pass a Zod schema as responseSchema in box.agent.run options. The run.result field is then typed from your schema, and you can also set timeout, maxRetries, and an onToolUse callback for observability.

What is the difference between Box and EphemeralBox in @upstash/box?

EphemeralBox is a lightweight, short-lived container with a maximum TTL of 3 days, supporting only exec, files, cd, and snapshots. Full Box instances add AI agents, git operations, fork, and public URLs.

Can Upstash Box clone private GitHub repositories and create pull requests?

Yes, provide a git.token in BoxConfig or link your GitHub account via the Upstash Console. Then use box.git.clone for private repos and box.git.createPR to open pull requests with title, body, and base branch.

Why is run.exitCode null for my Upstash Box agent run?

The exitCode field is only populated for shell exec commands, not agent runs. For agent runs, check run.status for states like completed or failed, and use run.logs() to inspect execution details.

How do I expose a port from an Upstash Box as a public URL?

Call box.getPublicURL with the port number to get a preview URL. You can optionally enable bearerToken or basicAuth for authentication, and manage URLs with listPublicURLs and deletePublicURL.