Memory Pressure Protocol • AI Agent SDK

MemoryPressureProtocol: Protocol for reading the memory budget and pressure of a gateway host.

MemoryPressureProtocol

Defined in the protocols module.

AI Agent

Protocol for reading the memory budget and pressure of a gateway host.

Pure contract the gateway implements over its own process: report the container’s memory limit (from the cgroup v1/v2 memory limit) and the current anonymous (non-reclaimable) RSS, so the eviction budget tracks the

real container ceiling rather than a hard-coded number. Both return `None/0` gracefully when the platform can’t report them, so the planner degrades to a no-op instead of crashing the gateway it protects.

Methods

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 4929


Related Documentation