Agent Container Resource Limits
Hardening the execution kernel by strictly limiting CPU and memory bandwidth for AI agents.
Steps
- Set `cpus` or `cpu_quota` to prevent an agent from monopolizing the host CPU.
- Define `memory` limits and `memory_reservation` to manage OOM (Out-of-Memory) risks.
- Disable or strictly limit `swap` usage to prevent performance degradation during loops.
- Configure `pids_limit` to prevent fork-bomb attacks from agent-generated code.
- Apply `oom_score_adj` to prioritize agent termination over critical system processes.