upstash-box-py
upstash-box-py is a Python SDK for creating and managing sandboxed cloud containers that run AI agents alongside shell execution, filesystem operations, and git integration. Spin up isolated environments with your choice of runtime, deploy agents with structured output schemas, and orchestrate parallel boxes for complex workflows. The SDK supports both sync and async patterns, snapshots for state checkpointing, and ephemeral containers for short-lived tasks.
upstash-box-py lets you build AI agents in sandboxed Python containers with shell, filesystem, and git access.
AI-generated summary based on this skill's SKILL.md
Install
upstash/skills/upstash-box-py · repository language: JavaScript
git clone https://github.com/upstash/skills
cp -r skills/skills/upstash-box-py ~/.claude/skills/upstash-box-pynpx skillfed install upstash/skills/upstash-box-pyFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is upstash-box-py and how do I use it with Python?
upstash-box-py is a Python SDK for creating and managing sandboxed cloud containers that run AI agents alongside shell execution, filesystem operations, and git integration. You can spin up isolated environments with your choice of runtime, deploy agents with structured output schemas, and orchestrate parallel boxes for complex workflows. The SDK supports both sync and async patterns, snapshots for state checkpointing, and ephemeral containers for short-lived tasks.
Can upstash-box-py execute code and commands in isolated cloud environments?
Yes, upstash-box-py enables you to execute code and commands in isolated cloud environments. The SDK provides sandboxed Python containers with shell and git capabilities, allowing you to run arbitrary commands, manage the filesystem, and perform git operations—all within a secure, ephemeral container that's isolated from your local system.
How do I manage box lifecycle, snapshots, and parallel container orchestration?
upstash-box-py provides full lifecycle management for your sandboxed containers. You can create boxes, take snapshots to checkpoint state, restore from snapshots, and orchestrate multiple parallel containers for complex workflows. The SDK handles the underlying container orchestration, letting you focus on your agent logic and task execution.
Does upstash-box-py support streaming agent runs and structured output?
Yes, upstash-box-py supports streaming agent runs and structured output from LLM tasks. You can define output schemas using Pydantic and get results in a structured format, making it easy to parse and integrate agent responses into your applications.
What Python SDK features does upstash-box-py offer for AI agents?
upstash-box-py is a Python SDK for AI agents in sandboxed containers with shell execution, filesystem access, and git integration. It supports both sync and async patterns, ephemeral box creation for short-lived tasks, snapshot and restore capabilities for state management, and public URL exposure with authentication for containerized services.
Is upstash-box-py open source and what license does it use?
Yes, upstash-box-py is open source and released under the MIT license, allowing you to freely use, modify, and distribute the SDK in your projects.
SKILL.md
rendered from the published skill — quoted content, verbatim
upstash-box Python SDK
Sandboxed cloud containers with built-in AI agents, shell, filesystem, and git.
Install & Setup
pip install upstash-box
Set UPSTASH_BOX_API_KEY env var or pass api_key to constructors.
The SDK ships both a synchronous Box (used in the examples below) and an
asynchronous AsyncBox (box = await AsyncBox.create(...), await box.agent.run(...)).
The async surface is identical with await and async for.
Box Lifecycle
```python import os from upstash_box import Box, Agent, ClaudeCode, BoxApiKey
Create with agent + git + env vars
box = Box.create( runtime="node", # "node" | "python" | "golang" | "ruby" | "rust" agent={ "harness": Agent.CLAUDE_CODE, # Agent.CODEX | Agent.OPEN_CODE "model": ClaudeCode.SONNET_4_5, # or a plain string "anthropic/claude-sonnet-4-5" # api_key options: #
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
skills/upstash-box-py/SKILL.md