Skip to main content

Python SDK for the All-in-One Sandbox API

Project description

Agent Sandbox Python SDK

A Python SDK for the All-in-One Sandbox API, providing access to sandbox, shell, file, jupyter, nodejs, and mcp services.

Installation

pip install agent-sandbox

Usage

from agent_sandbox import Sandbox

client = Sandbox(base_url="http://localhost:8091")

ctx = client.sandbox.get_sandbox_context()
print(ctx)

result = client.shell.exec_command(command="ls -la")
print(result)

Async Support

The SDK also provides async support through the AsyncSandbox class:

import asyncio
from agent_sandbox import AsyncSandbox

async def main():
    client = AsyncSandbox(base_url="http://localhost:8091")
    
    # Get sandbox context
    ctx = await client.sandbox.get_sandbox_context()
    print(ctx)

    result = await client.shell.exec_command(command="ls -la")
    print(result)

asyncio.run(main())

Features

  • Sandbox: Access sandbox environment information and installed packages
  • Shell: Execute shell commands with session management
  • File: Read, write, search, and manage files
  • Jupyter: Execute Python code in Jupyter kernels
  • Node.js: Execute JavaScript code in Node.js environment
  • MCP: Interact with Model Context Protocol servers

Requirements

  • Python 3.8+
  • httpx
  • pydantic
  • typing_extensions (for Python < 3.10)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_sandbox-0.0.5.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_sandbox-0.0.5-py2.py3-none-any.whl (100.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file agent_sandbox-0.0.5.tar.gz.

File metadata

  • Download URL: agent_sandbox-0.0.5.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for agent_sandbox-0.0.5.tar.gz
Algorithm Hash digest
SHA256 62c73d3755bdd36111e1cd255eb0e71bd31804ca107bd9f565f6c54180bf26ed
MD5 fe19e0c7f89993fbc5cb5b6193b79da3
BLAKE2b-256 34df6c9577e3af1dbcdbf06f761c175b1e0633698d758de1aec01b63a6b7da1b

See more details on using hashes here.

File details

Details for the file agent_sandbox-0.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: agent_sandbox-0.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 100.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.12

File hashes

Hashes for agent_sandbox-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8a18911041e7f3c8c29bdb383029465402057e22aff4922e0e15d5b7393e0fe5
MD5 49589cbe3cf4372955173a8f9b16c3c8
BLAKE2b-256 f8848e21417da6cd6c7a4f82bce5fcb9e996a693a698131c2435350e4d991048

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page