Warm Session • AI Agent SDK

WarmSession: A warm per-session agent cache eligible for memory-pressure eviction.

WarmSession

Defined in the protocols module.

AI Agent

A warm per-session agent cache eligible for memory-pressure eviction.

A pure, import-free fact carried from the running gateway to :func:plan_pressure_evictions. Attributes:

  • `session_id`: the cache key to soft-evict.
  • `last_activity`: monotonic/epoch seconds of the session’s last turn;
  • the planner evicts the coldest (smallest `last_activity`) first.
  • `in_flight: True` while a turn is executing — never evicted (would
  • abort live work).
  • `flushed: True` when the transcript is durably persisted — only a
  • flushed cache is rebuildable, so an unflushed one is never evicted
  • (would lose data).

Properties

ResponseField str

No description available.

ResponseField float

No description available.

ResponseField bool

No description available.

ResponseField bool

No description available.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 4906


Related Documentation