Python SDK
Install Python SDK
Section titled “Install Python SDK”Install the AgentBox Python SDK in your environment.
Tip: Python >= 3.9.
pip install agentbox-python-sdk
Setup your AgentBox API key
Section titled “Setup your AgentBox API key”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_******
Execute code with AgentBox Job
Section titled “Execute code with AgentBox Job”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 /")