<!--
 ⚠️  AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
 This file is automatically generated by scripts/docs-generator.js
 To make changes, edit the source TypeScript files or update the generator script
-->

[agents](../../) / [Exports](../modules) / ConversationHistory

# Class: ConversationHistory

Multi-session conversation history manager

Manages multiple conversation sessions identified by conversation IDs.
Provides session isolation and resource management.

## Table of contents

### Constructors

- [constructor](ConversationHistory#constructor)

### Methods

- [getConversationSession](ConversationHistory#getconversationsession)
- [hasConversation](ConversationHistory#hasconversation)
- [removeConversation](ConversationHistory#removeconversation)
- [clearAll](ConversationHistory#clearall)
- [getStats](ConversationHistory#getstats)

## Constructors

### constructor

• **new ConversationHistory**(`options?`): [`ConversationHistory`](ConversationHistory)

#### Parameters

| Name      | Type                         |
| :-------- | :--------------------------- |
| `options` | `ConversationHistoryOptions` |

#### Returns

[`ConversationHistory`](ConversationHistory)

#### Defined in

[packages/agents/src/managers/conversation-history-manager.ts:742](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/managers/conversation-history-manager.ts#L742)

## Methods

### getConversationSession

▸ **getConversationSession**(`conversationId`): [`ConversationSession`](ConversationSession)

Get or create a conversation session

#### Parameters

| Name             | Type     | Description                    |
| :--------------- | :------- | :----------------------------- |
| `conversationId` | `string` | Unique conversation identifier |

#### Returns

[`ConversationSession`](ConversationSession)

ConversationSession instance

#### Defined in

[packages/agents/src/managers/conversation-history-manager.ts:754](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/managers/conversation-history-manager.ts#L754)

---

### hasConversation

▸ **hasConversation**(`conversationId`): `boolean`

Check if a conversation exists

#### Parameters

| Name             | Type     | Description                      |
| :--------------- | :------- | :------------------------------- |
| `conversationId` | `string` | Conversation identifier to check |

#### Returns

`boolean`

True if conversation exists

#### Defined in

[packages/agents/src/managers/conversation-history-manager.ts:779](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/managers/conversation-history-manager.ts#L779)

---

### removeConversation

▸ **removeConversation**(`conversationId`): `boolean`

Remove a specific conversation

#### Parameters

| Name             | Type     | Description                       |
| :--------------- | :------- | :-------------------------------- |
| `conversationId` | `string` | Conversation identifier to remove |

#### Returns

`boolean`

True if conversation was removed, false if not found

#### Defined in

[packages/agents/src/managers/conversation-history-manager.ts:789](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/managers/conversation-history-manager.ts#L789)

---

### clearAll

▸ **clearAll**(): `void`

Clear all conversations

#### Returns

`void`

#### Defined in

[packages/agents/src/managers/conversation-history-manager.ts:800](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/managers/conversation-history-manager.ts#L800)

---

### getStats

▸ **getStats**(): `Object`

Get conversation statistics

#### Returns

`Object`

Statistics about managed conversations

| Name                 | Type       |
| :------------------- | :--------- |
| `totalConversations` | `number`   |
| `conversationIds`    | `string`[] |
| `totalMessages`      | `number`   |

#### Defined in

[packages/agents/src/managers/conversation-history-manager.ts:811](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/agents/src/managers/conversation-history-manager.ts#L811)
