> ## Documentation Index
> Fetch the complete documentation index at: https://phidatainc-studio-tools-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SessionSummaryManager

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                                                                        |
| ------------------------- | ----------------- | -------------------------------------------- | ---------------------------------------------------------------------------------- |
| `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`                                      | Whether session summaries were created in the last run                             |

## SessionSummaryManager Methods

### `create_session_summary(session: Union[AgentSession, TeamSession]) -> Optional[SessionSummary]`

Creates a summary of the session synchronously.

**Parameters:**

* `session`: The agent or team session to summarize

**Returns:**

* `Optional[SessionSummary]`: A SessionSummary object containing the summary text, topics, and timestamp, or None if generation fails

### `acreate_session_summary(session: Union[AgentSession, TeamSession]) -> Optional[SessionSummary]`

Creates a summary of the session asynchronously.

**Parameters:**

* `session`: The agent or team session to summarize

**Returns:**

* `Optional[SessionSummary]`: A SessionSummary object containing the summary text, topics, and timestamp, or None if generation fails

## 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                           |
