> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Warm Session • AI Agent SDK

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

# WarmSession

> Defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) 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

**session\_id** `str`

No description available.

**last\_activity** `float`

No description available.

**in\_flight** `bool`

No description available.

**flushed** `bool`

No description available.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L4906)
>
> `praisonaiagents/gateway/protocols.py` at line 4906

***

## Related Documentation

> [card] [Session Management](https://praison.ai/docs/docs/concepts/session-management)

> [card] [Sessions Feature](https://praison.ai/docs/docs/features/sessions)

> [card] [Session Persistence](https://praison.ai/docs/docs/features/session-persistence)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.