Commands
Running commands in sandbox
Section titled “Running commands in sandbox”You can run terminal commands inside the sandbox using the commands.run method.
The commands.run method returns a CommandResult object that contains the stdout, stderr, and exit code of the command.
from agentbox import Sandbox
sandbox = Sandbox(api_key="ab_xxxxxxxxxxxxxxxxxxxxxxxxx",
template="wemmodr8mb2uk3kn7exw",
timeout=120)
result = sandbox.commands.run('ls -l')
print(result)