<!--
 ⚠️  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
-->

[playground](../../) / [Exports](../modules) / RealTimeLLMTracker

# Class: RealTimeLLMTracker

🧠 RealTimeLLMTracker - Detects and tracks actual LLM responses

Monitors Agent history to detect when LLM responses are generated
and creates corresponding blocks with actual response data.

Follows "actual data only" principle - only tracks real LLM responses.

## Table of contents

### Constructors

- [constructor](RealTimeLLMTracker#constructor)

### Methods

- [startTracking](RealTimeLLMTracker#starttracking)
- [stopTracking](RealTimeLLMTracker#stoptracking)
- [checkForNewResponses](RealTimeLLMTracker#checkfornewresponses)
- [reset](RealTimeLLMTracker#reset)
- [getStats](RealTimeLLMTracker#getstats)

## Constructors

### constructor

• **new RealTimeLLMTracker**(`blockCollector`): [`RealTimeLLMTracker`](RealTimeLLMTracker)

#### Parameters

| Name             | Type                                                   |
| :--------------- | :----------------------------------------------------- |
| `blockCollector` | [`PlaygroundBlockCollector`](PlaygroundBlockCollector) |

#### Returns

[`RealTimeLLMTracker`](RealTimeLLMTracker)

#### Defined in

[playground/src/lib/playground/llm-tracking/llm-tracker.ts:33](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/llm-tracking/llm-tracker.ts#L33)

## Methods

### startTracking

▸ **startTracking**(`getAgentHistory`, `checkIntervalMs?`): `void`

Start monitoring for LLM responses

#### Parameters

| Name              | Type                                                                                                                              | Default value |
| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------- | :------------ |
| `getAgentHistory` | () => \{ `role`: `string` ; `content`: `string` ; `timestamp?`: `Date` ; `metadata?`: `Record`\<`string`, `TUniversalValue`\> }[] | `undefined`   |
| `checkIntervalMs` | `number`                                                                                                                          | `1000`        |

#### Returns

`void`

#### Defined in

[playground/src/lib/playground/llm-tracking/llm-tracker.ts:40](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/llm-tracking/llm-tracker.ts#L40)

---

### stopTracking

▸ **stopTracking**(): `void`

Stop monitoring for LLM responses

#### Returns

`void`

#### Defined in

[playground/src/lib/playground/llm-tracking/llm-tracker.ts:57](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/llm-tracking/llm-tracker.ts#L57)

---

### checkForNewResponses

▸ **checkForNewResponses**(`history`): `void`

Manually check for new LLM responses

#### Parameters

| Name      | Type                                                                                                                        |
| :-------- | :-------------------------------------------------------------------------------------------------------------------------- |
| `history` | \{ `role`: `string` ; `content`: `string` ; `timestamp?`: `Date` ; `metadata?`: `Record`\<`string`, `TUniversalValue`\> }[] |

#### Returns

`void`

#### Defined in

[playground/src/lib/playground/llm-tracking/llm-tracker.ts:67](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/llm-tracking/llm-tracker.ts#L67)

---

### reset

▸ **reset**(): `void`

Reset tracking state

#### Returns

`void`

#### Defined in

[playground/src/lib/playground/llm-tracking/llm-tracker.ts:250](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/llm-tracking/llm-tracker.ts#L250)

---

### getStats

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

Get tracking statistics

#### Returns

`Object`

| Name                | Type      |
| :------------------ | :-------- |
| `trackedResponses`  | `number`  |
| `isTracking`        | `boolean` |
| `lastHistoryLength` | `number`  |

#### Defined in

[playground/src/lib/playground/llm-tracking/llm-tracker.ts:259](https://github.com/woojubb/robota/blob/4f4c8a3197e92ddd43d12dc9186b0771983054c9/packages/playground/src/lib/playground/llm-tracking/llm-tracker.ts#L259)
