Execute File • AI Agent SDK
execute_file: Execute a file in the sandbox.
execute_file
Async
Method
</div>
This is a method of the SandboxProtocol class in the protocols module.
Execute a file in the sandbox.
Signature
async def execute_file(file_path: str, args: Optional[List[str]], limits: Optional[ResourceLimits], env: Optional[Dict[str, str]]) -> SandboxResultParameters
ParamField
strPath to file to execute
ParamField
OptionalCommand line arguments
ParamField
Optional[ResourceLimits]Resource limits for execution
ParamField
OptionalEnvironment variables
Returns
ResponseField
SandboxResultExecution result
Source
View on GitHubpraisonaiagents/sandbox/protocols.py at line 256