Skip to main content

Microsandbox backend for DeepAgents

Project description

deepagents-microsandbox

Microsandbox backend for the DeepAgents framework. This package enables DeepAgents to launch and control isolated sandbox environments using Microsandbox.

Key Features

  • Sandbox Provider: Manages the lifecycle of microsandbox instances (create, list, delete).
  • Sandbox Backend: Provides a standard interface for file operations and command execution within a sandbox.
  • DeepAgents Integration: Fully compatible with the DeepAgents SandboxProvider and SandboxBackend interfaces.

Installation

pip install deepagents-microsandbox

Usage

from deepagents_microsandbox import MicrosandboxProvider

# Initialize the provider connecting to a microsandbox server
provider = MicrosandboxProvider(server_url="http://localhost:5555")

# Create or get a sandbox
sandbox = provider.get_or_create(sandbox_id=None)

# Execute a command
result = sandbox.execute("echo 'Hello World'")
print(result.stdout)

# Clean up
provider.delete(sandbox_id=sandbox.id)

Development

This project uses uv for dependency management.

Prerequisites

  • uv installed.
  • Python 3.11 or higher.

Setup

Install dependencies:

uv sync

Testing

Tests are split into unit tests (mocked) and integration tests (requiring a real server).

Run Unit Tests (Mocked) These tests mock the HTTP interactions and do not require a running server.

uv run pytest

Run Integration Tests These tests verify behavior against a real microsandbox server.

  1. Start a microsandbox server in dev mode:
    msb server start --dev
    
  2. Run the tests with the environment variable:
    MICROSANDBOX_DEV_SERVER=http://127.0.0.1:5555 uv run pytest
    

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

deepagents_microsandbox-1.0.0.tar.gz (140.1 kB view details)

Uploaded Source

Built Distribution

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

deepagents_microsandbox-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file deepagents_microsandbox-1.0.0.tar.gz.

File metadata

  • Download URL: deepagents_microsandbox-1.0.0.tar.gz
  • Upload date:
  • Size: 140.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deepagents_microsandbox-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4b7547fb9334392c479a56ef343bc80b0f5dcafbccc43974d2487373000c5357
MD5 b9f4c8cc55f911d4e58eb3257ed6884c
BLAKE2b-256 e8fb34a07ac2c8592f996a72e1316d81ec3d608263ecda39d7ce48d0038278cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for deepagents_microsandbox-1.0.0.tar.gz:

Publisher: publish-to-pypi.yml on shkarupa-alex/deepagents-microsandbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deepagents_microsandbox-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deepagents_microsandbox-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac5f306e71a519f98660d7fd9b8c3c66ad65d61a6594ab117cddf700302adb2d
MD5 7d0a3ee8fdeaf5e893f5bcfb58a0ad69
BLAKE2b-256 7154f9d46ba26f057e19ee11b31ca60310f8c1c6d4d22549dcf29c6ee834d7c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for deepagents_microsandbox-1.0.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on shkarupa-alex/deepagents-microsandbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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