Skip to main content

agentbox (Python client)

Standard library only, Python 3.9+. Install with pip install agentboxes (the import is agentbox), or from a clone with pip install -e sdk-python.

from agentbox import Agentbox, ExecTimeout

client = Agentbox("http://127.0.0.1:7788", api_key=None)
box = client.create(allow_hosts=["pypi.org"], ttl_seconds=300)
result = box.exec(["python", "-c", "print(2+2)"])        # ExecResult(exit_code, stdout, stderr, duration_ms, truncated)
box.write_file("main.py", "print('hello')")
print(box.read_file("main.py"))
for event in box.exec_stream(["python", "main.py"]):      # ("stdout" | "stderr", line) ... then ("exit", ExecResult)
    print(event)
box.upload_directory("./myrepo", "repo")
box.download_directory("repo", "./out")
box.extend()
box.destroy()

Errors: SandboxNotFound, PoolExhausted, ExecTimeout (with .result), and AgentboxError with status and code for everything else.

Metadata

Release files for agentboxes 0.2.0

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

Source distribution (sdist)

Source distribution for agentboxes 0.2.0
File Size Uploaded Provenance Actions
agentboxes-0.2.0.tar.gz 5.8 kB Without provenance Details for agentboxes-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentboxes 0.2.0
File Interpreter ABI Platform Actions
agentboxes-0.2.0-py3-none-any.whl Python 3 none any Details for agentboxes-0.2.0-py3-none-any.whl

Total release size: 10.5 kB

Release files / agentboxes-0.2.0.tar.gz

Download URL agentboxes-0.2.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f87dbf2e3144472ddfd6bd2c2c94be0e53f0df097bb8795854dced6656833c2d
BLAKE2b-256 checksum
How to use checksums
c8366988f09c641fcb7f89c312148ed881f8bf1ce222a95ddb5d5f9fdcd34676
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / agentboxes-0.2.0-py3-none-any.whl

Download URL agentboxes-0.2.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16ef5178c9e04523df1597caf8df530de3aca66e475c84ed409ec5c39810d1dc
BLAKE2b-256 checksum
How to use checksums
eda9f0f66cc5627bff2252757b2a307f3c54ccd05e6c83f408b64387aaf49ebb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for agentboxes 0.2.0

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.2.0 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