Resource Limits • AI Agent SDK
ResourceLimits: Resource limits for sandbox execution.
ResourceLimits
Defined in the protocols module.
AI Agent
Resource limits for sandbox execution.
Attributes: memory_mb: Maximum memory in megabytes (0 = unlimited) cpu_percent: Maximum CPU percentage (0 = unlimited) timeout_seconds: Maximum execution time in seconds max_processes: Maximum number of processes max_open_files: Maximum number of open files network_enabled: Whether network access is allowed disk_write_mb: Maximum disk write in megabytes (0 = unlimited)
Properties
intNo description available.
intNo description available.
intNo description available.
intNo description available.
intNo description available.
boolNo description available.
intNo description available.
Methods
Create minimal resource limits for untrusted code.
standard()Create standard resource limits.
generous()Create generous resource limits for trusted code.
Internal & Generic Methods
- from_dict: Create from dictionary.
- to_dict: Convert to dictionary.
Source
View on GitHubpraisonaiagents/sandbox/protocols.py at line 38