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

# 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` | Whether session summaries were created in the last run |
| `last_n_runs` | `Optional[int]` | `None` | Number of recent runs to include in the summary. `None` means all runs |
| `conversation_limit` | `Optional[int]` | `None` | 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 summarize
* `run_metrics`: Optional `RunMetrics` collector. When provided, the summary model's token usage is accumulated under the `session_summary_model` key

**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], run_metrics: Optional[RunMetrics] = None) -> Optional[SessionSummary]`

Creates a summary of the session asynchronously.

**Parameters:**

* `session`: The agent or team session to summarize
* `run_metrics`: Optional `RunMetrics` collector. When provided, the summary model's token usage is accumulated under the `session_summary_model` key

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.