Skip to main content

Module session

Module session 

Source
Expand description

Session persistence.

Saves and restores conversation state across sessions. Each session gets a unique ID and is stored as a JSON file in the sessions directory (~/.config/agent-code/sessions/).

Structs§

SessionData
Serializable session state.
SessionSummary
Brief summary of a session for listing.

Functions§

list_sessions
List recent sessions, sorted by last update (most recent first).
load_session
Load a session from disk by ID.
new_session_id
Generate a new session ID.
save_session
Save the current session to disk.