Skip to main content

praisonai-sandbox

Isolated agent code execution for PraisonAI — Docker, subprocess, E2B, Modal, Novita, Sandlock, and SSH backends.

Install

pip install praisonai-sandbox[docker]

Usage

from praisonai_sandbox import DockerSandbox
from praisonaiagents.sandbox import SandboxConfig

config = SandboxConfig.docker("python:3.12-slim")
sandbox = DockerSandbox(image=config.image, config=config)

Or via the agents manager:

from praisonaiagents.sandbox import SandboxManager, SandboxConfig

manager = SandboxManager(SandboxConfig.subprocess())
result = await manager.run_code("print('hello')")

Tenki compute lifecycle

Install praisonai-sandbox[tenki] to use TenkiCompute with Tenki SDK 1.4.0 or newer. With ComputeConfig(auto_shutdown=True), the provider terminates the sandbox after idle_timeout_s without an active command, package installation, or file transfer. Activity restarts the idle countdown; status checks do not.

Idle cleanup runs while the Python process is alive and does not track background processes after their launching command returns. Always call shutdown() in a finally block (or use the framework's managed cleanup). Tenki's server-side maximum lifetime is a separate safeguard and is not an idle timeout.

Timed-out commands return exit code 124 and preserve any partial output.

Console script

praisonai-sandbox --help

Backward-compatible imports via the umbrella package:

from praisonai.sandbox import SubprocessSandbox  # shim → praisonai_sandbox

Validating your install

Note: The e2e-validation/ bundle and tests/ ship with the source repository, not the published wheel. Run these commands from a checkout of this repo (src/praisonai-sandbox/), not from a pip installed environment.

Run the single-command end-to-end smoke suite (no API keys needed for the subprocess path; Docker is optional and skipped when unavailable):

python e2e-validation/run_e2e.py

Or use the pytest live probes:

python -m pytest tests/test_live_sandbox.py -v

See e2e-validation/ for the manual guide.

Metadata

Release files for praisonai-sandbox 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for praisonai-sandbox 0.1.14
File Size Uploaded Provenance Actions
praisonai_sandbox-0.1.14.tar.gz 86.0 kB Without provenance Details for praisonai_sandbox-0.1.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for praisonai-sandbox 0.1.14
File Interpreter ABI Platform Actions
praisonai_sandbox-0.1.14-py3-none-any.whl Python 3 none any Details for praisonai_sandbox-0.1.14-py3-none-any.whl

Total release size: 164.3 kB

Release files / praisonai_sandbox-0.1.14.tar.gz

Download URL praisonai_sandbox-0.1.14.tar.gz
Size 86.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e42d96d73fd858c6173327181fbd5ccb09df5a5e9a7fc2ba3cf27ff7ef018537
BLAKE2b-256 checksum
How to use checksums
8961ba275d1b8473f2a95e811de6fb96e41f45436723bc7fbc2f6ecfcfbf4156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / praisonai_sandbox-0.1.14-py3-none-any.whl

Download URL praisonai_sandbox-0.1.14-py3-none-any.whl
Size 78.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dadf1d4cd489f32955d2cd51347509766040bfb9305c1876c7570207725e191
BLAKE2b-256 checksum
How to use checksums
c217b8f4c1b5fb2806eb67d105f03b5fb9a31f6d9c6b4c6a0cd76dc9dfb386ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for praisonai-sandbox 0.1.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.14 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page