SessionSummaryManager
Attributes and methods of SessionSummaryManager, which generates session summaries with optional topic extraction.
The SessionSummaryManager is responsible for generating and managing session summaries. It uses a model to analyze conversations and create concise summaries with optional topic extraction.
SessionSummaryManager Attributes
| Parameter | Type | Default | Description |
|---|---|---|---|
id | Optional[str] | None | Unique identifier for this manager. Auto-generated if not provided |
name | Optional[str] | None | Human-readable name for this manager |
owner_id | Optional[str] | None | ID of the agent or team that owns this manager (set when registered in the OS) |
owner_type | Optional[str] | None | Type of the owner: "agent" or "team" (set when registered in the OS) |
model | Optional[Model] | None | Model used for session summary generation |
session_summary_prompt | Optional[str] | None | Custom prompt for session summary generation. If not provided, uses default prompt |
summary_request_message | str | "Provide the summary of the conversation." | User message prompt for requesting the summary |
summaries_updated | bool | False | Set to True after a successful summary; remains true on later calls unless explicitly reset |
last_n_runs | Optional[int] | None | Positive number of recent runs to include in the summary. None means all runs |
conversation_limit | Optional[int] | None | Positive maximum number of messages to include in the summary conversation. None means no limit |
SessionSummaryManager Methods
create_session_summary(session: Union[AgentSession, TeamSession], run_metrics: Optional[RunMetrics] = None) -> Optional[SessionSummary]
Creates a summary of the session synchronously.
Parameters:
session: The agent or team session to summarizerun_metrics: OptionalRunMetricscollector. When provided, the summary model's token usage is accumulated under thesession_summary_modelkey
Returns:
Optional[SessionSummary]: A SessionSummary object containing the summary text, topics, and timestamp, orNonewhen there is no usable summary result. Provider exceptions propagate to the caller
acreate_session_summary(session: Union[AgentSession, TeamSession], run_metrics: Optional[RunMetrics] = None) -> Optional[SessionSummary]
Creates a summary of the session asynchronously.
Parameters:
session: The agent or team session to summarizerun_metrics: OptionalRunMetricscollector. When provided, the summary model's token usage is accumulated under thesession_summary_modelkey
Returns:
Optional[SessionSummary]: A SessionSummary object containing the summary text, topics, and timestamp, orNonewhen there is no usable summary result. Provider exceptions propagate to the caller
SessionSummary Object
The SessionSummary object returned by the summary manager contains:
| Attribute | Type | Description |
|---|---|---|
summary | str | Concise summary of the session focusing on important information |
topics | Optional[List[str]] | List of topics discussed in the session |
updated_at | Optional[datetime] | Timestamp when the summary was created |