A
A Few Lines
Infinite Power
Start building with AgentBox - your sandbox for intelligent automation.
Python Sandbox Command Runner
Run shell commands safely inside an AgentBox Sandbox and handle stdout/stderr/exit code
# Install SDK
# pip install agentbox-python-sdk
from agentbox import Sandbox
def run_command(command: str) -> None:
"""
Run a command inside AgentBox Sandbox and print the results.
"""
sandbox = Sandbox(template="python_template_id")
try:
# Execute the command
result = sandbox.commands.run(command)
# Print stdout if available
if hasattr(result, "stdout"):
print("📄 STDOUT:")
print(result.stdout)
# Print stderr if available
if hasattr(result, "stderr") and result.stderr:
print("⚠️ STDERR:")
print(result.stderr)
# Print exit code
if hasattr(result, "exit_code"):
print(f"✅ Exit code: {result.exit_code}")
except Exception as e:
print(f"❌ Command execution failed: {e}")
if __name__ == "__main__":
# Print Hello World
run_command('echo "Hello World!"')
Built for Enterprise
Everything you need to deploy, manage, and scale AI agents in production environments.
Enterprise Security
Bank-grade security with isolated sandboxes for safe agent execution.
Lightning Fast
Sub-second agent initialization with optimized runtime performance.
Real-World Tools
Full access to development tools, APIs, and computing resources.
Global Scale
Deploy agents worldwide with automatic scaling and load balancing.
Privacy First
Your data never leaves your environment. Complete control and compliance.
Easy Integration
Simple APIs and SDKs for seamless integration with existing workflows.