Get State • AI Agent SDK

get_state: Get a specific state value

get_state

Method

</div>

This is a method of the Session class in the session module.

Get a specific state value

Signature

python
def get_state(key: str, default: Any) -> Any

Parameters

ParamField str

No description available.

ParamField Any

No description available.

Returns

ResponseField Any

The result of the operation.

Uses

  • restore_state

Used By

Source

View on GitHub

praisonaiagents/session.py at line 356