Skip to content

Python SDK

Install the AgentBox Python SDK in your environment.

Tip: Python >= 3.9.

pip install agentbox-python-sdk

Sign up on AgentBox Manage your API keys at AgentBox API Keys Create a new API key, then set it as an environment variable in your shell:

export AGENTBOX_DOMAIN=agentbox.cloud
export AGENTBOX_API_KEY=ab_******

Tip: The default domain is agentbox.cloud

from agentbox import Sandbox

sbx = Sandbox(api_key="ab_xxx_xxx_xxx",
             template="tpl_xxx_xxx_xxx",
             timeout=120)
sbx.commands.run(cmd="ls /")