agentscope.session¶
The session module in agentscope.
- class SessionBase[source]¶
Bases:
object
The base class for session in agentscope.
- __init__(session_id)[source]¶
Initialize the session base class
- Parameters:
session_id (str)
- Return type:
None
- session_id: str¶
The session id
- abstract async save_session_state(**state_modules_mapping)[source]¶
Save the session state
- Parameters:
state_modules_mapping (StateModule)
- Return type:
None
- class JSONSession[source]¶
Bases:
SessionBase
The JSON session class.
- __init__(session_id, save_dir)[source]¶
Initialize the JSON session class.
- Parameters:
session_id (str) – The session id.
save_dir (str) – The directory to save the session state.
- Return type:
None
- property save_path: str¶
The path to save the session state.