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

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.1
File Size Uploaded Provenance Actions
agentboxes-0.2.1.tar.gz 5.8 kB Without provenance Details for agentboxes-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 10.5 kB

Release files / agentboxes-0.2.1.tar.gz

Download URL agentboxes-0.2.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
30e1e435f233d9ebe7c406090daa2db266ec43f34ae72846d63daeef10834728
BLAKE2b-256 checksum
How to use checksums
b3d0fdfa78c80c31ec834a76b1d81893e470d0df3bcbc4c7f0127e77f5d86baa
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.1-py3-none-any.whl

Download URL agentboxes-0.2.1-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9506fc8b21c24c7f48e7e5957ab27b54d000a447c77e3a16ca096de0de3c251b
BLAKE2b-256 checksum
How to use checksums
5fb68ff02f98d0af144584f8e1512c7b520733c3fbf452843038a40b7ef55769
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.1

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