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.1.tar.gz (140.7 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.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deepagents_microsandbox-1.0.1.tar.gz
  • Upload date:
  • Size: 140.7 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.1.tar.gz
Algorithm Hash digest
SHA256 b9471f251597fc56b9b2bc5f41a478cd6b87db2641a1e91210978b4abeeb1600
MD5 c4cbf448f470ef8be532bd700078896f
BLAKE2b-256 8dd577562772b7bf868478e5e3badb4f66e60171c6b740be4cf9fd5ffa0c37e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for deepagents_microsandbox-1.0.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for deepagents_microsandbox-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8173ce8dbdf290a0fb5bf83f204814b587470ba9b93fcdad8980ca85e46604b1
MD5 5b7567a22fc03442b8ce462b541f7ad7
BLAKE2b-256 e8e57fc618dfa08d60a954bf3b13cb9c765ecb37cd3ad8c2174171dcbff8b00b

See more details on using hashes here.

Provenance

The following attestation bundles were made for deepagents_microsandbox-1.0.1-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