Connect Python
let your agent do it
Connect a Python program to Hermitbox.
Paste it into your agent. It follows this page as Markdown: python.md
Create a sandbox, run a command, and delete it from Python with the Hermitbox SDK.
- Install
hermitboxin your application’s Python environment. - Set
HERMITBOX_API_URLandHERMITBOX_API_KEYin that process’s private environment. - Run this with the same Python interpreter.
from hermitbox import Hermitbox
# Connect with HERMITBOX_API_URL and HERMITBOX_API_KEY from the environment.
with Hermitbox() as hb:
# Use the install's default tier. A container also needs an image.
isolation = hb.project()['defaults']['isolation']
image = {'image': 'alpine:3.22'} if isolation == 'container' else {}
box = hb.sandbox(isolation=isolation, **image)
try:
# Run a command and stop if it failed.
result = box.run('echo hello')
if result.code != 0:
raise RuntimeError(result.stderr)
print(result.stdout) # hello
finally:
# Delete the sandbox, even when something failed.
box.delete()This names the reported default tier and adds an image only for containers. An unavailable named tier is refused. See tier limits and the sync and async SDK reference.
run it yourself
$curl -fsSL https://hbx.sh | shor ask your agent
Install Hermitbox and set it up for me
or add to your agent
Linux (x86_64 or aarch64), no root, no Docker. Agents can read every page: llms.txt · llms-full.txt
the floor · nothing below this line