> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Streaming Tracker • AI Agents Framework

> StreamingTracker: Track streaming operations (LLM responses).

# StreamingTracker

> Defined in the [**profiler**](../modules/profiler) module.

<Badge color="purple">AI Agents Framework</Badge>

Track streaming operations (LLM responses).

Extends the core SDK's `StreamingTracker` (single owner of the TTFT
start/first\_token/chunk/end logic) with wrapper-only `total_tokens`
support and records to the wrapper's context-aware `Profiler`.

## Constructor

<ParamField query="name" type="str" required={true}>
  No description available.
</ParamField>

## Methods

<CardGroup cols={2}>
  <Card title="end()" icon="function" href="../functions/StreamingTracker-end">
    End tracking and record to the wrapper Profiler.
  </Card>
</CardGroup>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
tracker = StreamingTracker("chat")
    tracker.start()
    tracker.first_token()  # Mark TTFT
    for chunk in stream:
        tracker.chunk()
    tracker.end(total_tokens=100)
```

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/profiler.py#L211">
  `praisonai/profiler.py` at line 211
</Card>
