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
SandboxProviderandSandboxBackendinterfaces.
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.
- Start a microsandbox server in dev mode:
msb server start --dev
- Run the tests with the environment variable:
MICROSANDBOX_DEV_SERVER=http://127.0.0.1:5555 uv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9471f251597fc56b9b2bc5f41a478cd6b87db2641a1e91210978b4abeeb1600
|
|
| MD5 |
c4cbf448f470ef8be532bd700078896f
|
|
| BLAKE2b-256 |
8dd577562772b7bf868478e5e3badb4f66e60171c6b740be4cf9fd5ffa0c37e5
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deepagents_microsandbox-1.0.1.tar.gz -
Subject digest:
b9471f251597fc56b9b2bc5f41a478cd6b87db2641a1e91210978b4abeeb1600 - Sigstore transparency entry: 910944101
- Sigstore integration time:
-
Permalink:
shkarupa-alex/deepagents-microsandbox@0d266cda6e3f5f410b7a138d52d92f9cb7a781a0 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/shkarupa-alex
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@0d266cda6e3f5f410b7a138d52d92f9cb7a781a0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file deepagents_microsandbox-1.0.1-py3-none-any.whl.
File metadata
- Download URL: deepagents_microsandbox-1.0.1-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8173ce8dbdf290a0fb5bf83f204814b587470ba9b93fcdad8980ca85e46604b1
|
|
| MD5 |
5b7567a22fc03442b8ce462b541f7ad7
|
|
| BLAKE2b-256 |
e8e57fc618dfa08d60a954bf3b13cb9c765ecb37cd3ad8c2174171dcbff8b00b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deepagents_microsandbox-1.0.1-py3-none-any.whl -
Subject digest:
8173ce8dbdf290a0fb5bf83f204814b587470ba9b93fcdad8980ca85e46604b1 - Sigstore transparency entry: 910944134
- Sigstore integration time:
-
Permalink:
shkarupa-alex/deepagents-microsandbox@0d266cda6e3f5f410b7a138d52d92f9cb7a781a0 -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/shkarupa-alex
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@0d266cda6e3f5f410b7a138d52d92f9cb7a781a0 -
Trigger Event:
push
-
Statement type: