{"id":23203,"library":"agent-sandbox","title":"Agent Sandbox SDK","description":"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.","status":"active","version":"0.0.30","language":"python","source_language":"en","source_url":"https://github.com/agent-infra/sandbox-sdk","tags":["sandbox","code-execution","api-client"],"install":[{"cmd":"pip install agent-sandbox","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client for API calls","package":"httpx","optional":false},{"reason":"Data validation and settings management","package":"pydantic","optional":false}],"imports":[{"note":"Official import path","symbol":"SandboxClient","correct":"from agent_sandbox import SandboxClient"},{"note":"Sandbox was renamed to SandboxClient in v0.0.20+","wrong":"from agent_sandbox import Sandbox","symbol":"Sandbox","correct":"from agent_sandbox import SandboxClient"}],"quickstart":{"code":"import os\nfrom agent_sandbox import SandboxClient\n\nclient = SandboxClient(api_key=os.environ.get('SANDBOX_API_KEY', ''))\nresult = client.code_exec(code='print(\"Hello, world!\")')\nprint(result.text)","lang":"python","description":"Create a client using the API key from environment variable and execute Python code."},"warnings":[{"fix":"Use `from agent_sandbox import SandboxClient` instead of `from agent_sandbox import Sandbox`.","message":"The client class was renamed from `Sandbox` to `SandboxClient` in v0.0.20. Old imports will fail.","severity":"breaking","affected_versions":">=0.0.20"},{"fix":"Replace `client.execute(code='...')` with `client.code_exec(code='...')`.","message":"The `execute` method is deprecated in favor of `code_exec`.","severity":"deprecated","affected_versions":">=0.0.25"},{"fix":"Set the environment variable or pass `api_key` explicitly.","message":"API key is required; passing an empty string leads to a 403 error. Always set the SANDBOX_API_KEY environment variable.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from agent_sandbox import SandboxClient`.","cause":"The class was renamed to SandboxClient.","error":"ImportError: cannot import name 'Sandbox' from 'agent_sandbox'"},{"fix":"Set the SANDBOX_API_KEY environment variable or pass a valid `api_key` to SandboxClient.","cause":"Missing or invalid API key.","error":"httpx.HTTPStatusError: 403 Forbidden"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}