Skip to main content

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

cgroup_limit_mb()

Return the container memory limit in MiB, or None if unknown.

anon_rss_mb()

Return current anonymous (non-reclaimable) RSS in MiB.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 3503

Memory Concept

Memory Overview

Memory Configuration

Session Resume