Documentation Index
Fetch the complete documentation index at: https://docs.upsonic.ai/llms.txt
Use this file to discover all available pages before exploring further.
Constructor Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
session_id | str | (required) | Unique identifier for this chat session |
user_id | str | (required) | Unique identifier for the user |
agent | Agent | (required) | The Agent instance to handle conversations |
storage | Storage | None | Storage backend (defaults to InMemoryStorage) |
full_session_memory | bool | True | Store full conversation history |
summary_memory | bool | False | Enable conversation summarization |
user_analysis_memory | bool | False | Enable user profile analysis |
user_profile_schema | type | None | Custom Pydantic schema for user profiles |
dynamic_user_profile | bool | False | Auto-generate profile schema from conversations |
num_last_messages | int | None | Limit history to last N messages |
feed_tool_call_results | bool | False | Include tool calls in memory |
user_memory_mode | 'update' | 'replace' | 'update' | How to update user profiles |
debug | bool | False | Enable debug logging |
debug_level | int | 1 | Debug verbosity (1=standard, 2=detailed) |
max_concurrent_invocations | int | 1 | Maximum concurrent invoke calls |
retry_attempts | int | 3 | Number of retry attempts for failed calls |
retry_delay | float | 1.0 | Delay between retry attempts (seconds) |
Instance Properties
| Property | Type | Description |
|---|---|---|
state | SessionState | Current session state (IDLE, AWAITING_RESPONSE, STREAMING, ERROR) |
all_messages | List[ChatMessage] | All messages in the session |
usage | AggregatedUsage | Read-only view over every model call recorded for this session — tokens, cost, requests, tool calls, timing. See Metrics. |
start_time | float | Session start time (Unix timestamp) |
end_time | float | Session end time (None if active) |
duration | float | Wall-clock session duration in seconds |
last_activity | float | Time since last activity in seconds |
is_closed | bool | Whether the session is closed |

