upstash-box-py

Create and control sandboxed cloud containers with AI agents, shell, filesystem, and git using the upstash-box Python SDK.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires upstash-box, pydantic.

What problem does it solve? Running AI coding agents and untrusted commands locally risks your machine and requires complex environment setup. This Skill provides the knowledge to use the upstash-box Python SDK to spin up isolated cloud sandboxes with built-in AI agents, shell execution, filesystem access, and git integration. ## Core Features & Use Cases - Sandboxed Box Lifecycle: Create, pause, resume, snapshot, and delete cloud containers across node, python, golang, ruby, and rust runtimes, including short-lived EphemeralBox instances. - AI Agent Runs: Execute Claude Code, Codex, or Open Code agents with structured Pydantic output schemas, streaming, webhooks, and cost tracking. - Shell, Filesystem & Git: Run commands and code snippets, read/write/upload/download files, clone repos, commit, push, and open pull requests from inside the box. - Use Case: Orchestrate parallel code reviews by creating multiple AsyncBox instances with asyncio.gather, each running an agent that reviews a repository and returns typed findings. ## Quick Start Use the upstash-box Python SDK to create a sandboxed box with a Claude Code agent and run a security review of my repository.

Frequently Asked Questions about upstash-box-py

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

FAQPage Schema
How do I create a sandboxed cloud container in Python?

Install upstash-box with pip and call Box.create with a runtime such as node or python. Set the UPSTASH_BOX_API_KEY environment variable or pass api_key to the constructor, then use box.exec, box.files, and box.git to work inside the container.

How do I run an AI coding agent with structured output?

Call box.agent.run with a prompt and a response_schema set to a Pydantic BaseModel subclass. The run returns a typed result instance along with status and cost, and you can stream output with box.agent.stream or attach a webhook for fire-and-forget runs.

Does upstash-box support async Python and parallel boxes?

Yes, the SDK ships AsyncBox with an API identical to the sync Box, using await and async for. You can pass many AsyncBox.create or agent.run calls to asyncio.gather to run multiple boxes in parallel.

What is the difference between Box and EphemeralBox?

EphemeralBox is a lightweight, short-lived container with a TTL of up to 3 days that supports exec, files, cd, network policy, and snapshots. It does not support agents or git, so use the full Box when you need AI agent runs or repository operations.

Why is run.exit_code None for my agent run?

The exit_code field is only populated for exec command runs, not agent runs. Agent runs report their outcome through run.status, which can be completed, failed, cancelled, or detached.

Can I expose a server running inside the box to the internet?

Yes, call box.get_public_url with a port number to get a public preview URL. You can optionally enable bearer token or basic authentication, list all public URLs, and delete them when finished.