Skip to main content

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

int
No description available.
int
No description available.
int
No description available.
int
No description available.
int
No description available.
bool
No description available.
int
No description available.

Methods

minimal()

Create minimal resource limits for untrusted code.

standard()

Create standard resource limits.

generous()

Create generous resource limits for trusted code.
  • from_dict: Create from dictionary.
  • to_dict: Convert to dictionary.

Source

View on GitHub

praisonaiagents/sandbox/protocols.py at line 38