Restore Session State • AI Agent SDK

restore_session_state: Restore team session state for deterministic resume. Returns True if restored.

restore_session_state

Method

</div>

This is a method of the AgentTeam class in the agents module.

Restore team session state for deterministic resume. Returns True if restored.

Reads first from the durable `SessionStore keyed by session_id (no fuzzy search, no memory requirement). Falls back to the legacy shared_memory` semantic lookup only for sessions written before this durable path existed, preserving backward compatibility.

Signature

python
def restore_session_state(session_id: str) -> bool

Parameters

ParamField str

No description available.

Returns

ResponseField bool

The result of the operation.

Uses

  • get_default_session_store
  • store.session_exists
  • store.get_session
  • logging.warning
  • logger.debug
  • search_short_term

Source

View on GitHub

praisonaiagents/agents/agents.py at line 3408


Related Documentation