Registry / llm-agents / agent-sandbox

agent-sandbox

JSON →
library0.0.30pypypi✓ verified 80d ago

Python SDK for the All-in-One Sandbox API (>=1.7.0). Provides a sandboxed environment for executing code, running commands, and managing files. Current version: 0.0.30. Active development, weekly releases.

pip install agent-sandbox
INSTALL
IMPORT
SIG · AGENT-SANDBOX
A
agent-sandbox
llm-agentspythonv0.0.30
Install
28.8s avg
Import
Disk
491MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.30 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 461.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 28.8s · import 0.000s · 461MB
491MB installed
● package 491MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Action
from agent_sandbox import Action
from agent_sandbox import SandboxClient
ActionData
from agent_sandbox import ActionData
ActionResponse
from agent_sandbox import ActionResponse

Create a client using the API key from environment variable and execute Python code.

import os from agent_sandbox import SandboxClient client = SandboxClient(api_key=os.environ.get('SANDBOX_API_KEY', '')) result = client.code_exec(code='print("Hello, world!")') print(result.text)
Debug
Known issues
breakingThe client class was renamed from `Sandbox` to `SandboxClient` in v0.0.20. Old imports will fail.
fix
Use `from agent_sandbox import SandboxClient` instead of `from agent_sandbox import Sandbox`.
affects: >=0.0.20
deprecatedThe `execute` method is deprecated in favor of `code_exec`.
fix
Replace `client.execute(code='...')` with `client.code_exec(code='...')`.
affects: >=0.0.25
gotchaAPI key is required; passing an empty string leads to a 403 error. Always set the SANDBOX_API_KEY environment variable.
fix
Set the environment variable or pass `api_key` explicitly.
affects: all
Upgrade
Version history
0.0.30latest on PyPI · released Mar 24, 2026
Audit
Dependencies
httpxrequiredHTTP client for API calls
pydanticrequiredData validation and settings management
Agent activity
56 hits · last 30 days
node
44
Perplexity
1
OpenAI (training)
1
Resources
agent-sandbox — pip install agent-sandbox · libregistry