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

# Conversation History and Trace Details

> Replay each conversation and see what the Digital Worker did in every turn, how long it took and how many tokens it used

Every time a user chats with a Digital Worker, FPT AI EOS Console records the whole conversation. The **Insights** tab gives you two levels of detail:

* **History**: The list of conversations, replayed exactly as the user saw them.
* **Trace details**: A turn-by-turn breakdown - Which tools the Digital Worker called, whether a Guardrail stepped in, how long each step took and how many tokens it used.

> [!NOTE]
>
> Open Trace details when you need to answer questions like: Why was this answer wrong? Why did the user wait so long? How many tokens did this conversation use? Did the Guardrail block the right thing?

## Open conversation History

**1. Open the Digital Worker**

In Console, select **Digital workers** in the left menu and open the one you want, for example **Hỏi đáp NQ\_57**.

**2. Go to Insights**

Click the **Insights** tab at the top, then choose **History** in the left column.

**3. Pick a conversation**

Click a row in the table. The conversation panel opens on the right and shows every message in the order the user saw it.

![Conversation History](https://mintcdn.com/fpt-62e894b4/3vi0Hyj1ddtKI8oH/images/en_trace_history_v2.jpg?fit=max\&auto=format\&n=3vi0Hyj1ddtKI8oH\&q=85\&s=6aa2e467c057577b80dc5e98becc6b47)

### Columns in the History table

| Column | Meaning |
| - | - |
| **End time** | When the last message of the conversation was sent |
| **Conversation ID** | Unique identifier, used for search or when contacting support |
| **Channel** | Where the conversation happened: Workspace, Live Chat, API, Zalo... |
| **User** | Name and email of the person chatting |
| **Triggered by** | How the conversation started, for example a user chatting directly |
| Message count (last column) | Total number of messages in the conversation |

### Search and filter

* **Search box**: Search by content, sender name, conversation ID or message ID.
* **All channels**: Show conversations from one channel only.
* **All time**: Limit to a date range.

### Actions in the conversation panel

| Button | What it does |
| - | - |
| Link icon | **Copy conversation link** so a teammate can open this exact conversation |
| **View trace details** | Opens the Trace details page for the conversation |
| Copy icon next to the ID | Copies the conversation ID |
| **X** | Closes the panel |

## Open Trace details

In the conversation panel, click **View trace details**. The page has three columns:

| Column | Content |
| - | - |
| **Turns** (left) | Every question-and-answer turn, each with its latency and token count |
| **Turn details** (middle) | The user's input and every step the Digital Worker took to answer |
| **Stats of conversation** (right) | Time, latency and token totals for the whole conversation |

![Trace details page](https://mintcdn.com/fpt-62e894b4/3vi0Hyj1ddtKI8oH/images/en_trace_overview.jpg?fit=max\&auto=format\&n=3vi0Hyj1ddtKI8oH\&q=85\&s=04717e573f6dddefeeedffd17a265b6b)

Click **Back to History** at the top to return to the list. The copy icon next to the ID in the header copies the conversation ID.

## Turn list

A **turn** is one message from the user plus everything the Digital Worker did to answer it. Click a turn to jump to its details in the middle column.

Each turn card shows:

* The **turn number** and the start of the user's question.
* **Latency**: Time from receiving the question to finishing the answer, for example `27.4s`.
* **Tokens** used in the turn, for example `109.8K` (K = thousand, M = million).
* **Wrench icon**: The turn called a tool.
* **Shield icon**: A Guardrail blocked something in this turn.
* **Orange dot** and a red label (such as "Input guardrail blocked"): The turn has an **Issue** worth a closer look.

![Turn list](https://mintcdn.com/fpt-62e894b4/3vi0Hyj1ddtKI8oH/images/en_trace_turn_list.png?fit=max\&auto=format\&n=3vi0Hyj1ddtKI8oH\&q=85\&s=091c8f998f0bf85c5f3f0e968ebca73f)

Hover over a turn card to see that turn's own numbers: Start and end time, latency, time to first token and token breakdown.

![Stats for a single turn](https://mintcdn.com/fpt-62e894b4/3vi0Hyj1ddtKI8oH/images/en_trace_turn_tooltip.jpg?fit=max\&auto=format\&n=3vi0Hyj1ddtKI8oH\&q=85\&s=b0e8d906b05728eea0bb5eba86a46ede)

| Metric | Meaning |
| - | - |
| **Start**, **End** | When the Digital Worker received the question and when it finished answering |
| **Latency** | Time from Start to End - How long the user waited for this turn |
| **First token** | Time from receiving the question until the first word of the answer appeared |
| **Token breakdown** | Input, Cache read, Output, Reasoning and Total for this turn only. See Stats of conversation below for what each item means |

## Turn details

Each turn has two blocks:

* **Inputs**: What the user sent, labelled **Guardrail passed** when it broke no rule.
* **Outputs**: Every message the Digital Worker produced in the turn, in order. The top-right corner shows the **Number of messages**.

Each Digital Worker message (labelled **AGENT**) has an info line on the right, for example `deepseek-v4-flash · 6.0s · 21.5K tokens · Guardrail passed`:

| Item | Meaning |
| - | - |
| Model name | The model that produced this message |
| Time | How long the model took to produce the message |
| Tokens | Tokens used by this model call alone: Input plus Output |
| **Guardrail passed** | The message was checked by Guardrails and broke no rule |

A turn can contain several AGENT messages, because the Digital Worker may call the model more than once: Call a tool, read the result, then answer. Click the arrow next to **TURN** to collapse or expand the whole turn.

### Inspect a tool call

Tool calls appear under the message, for example `vbpl-knowledge__knowledge_search` - The Digital Worker searching the knowledge base through the `vbpl-knowledge` Connector. Click a row to expand it:

| Field | Meaning |
| - | - |
| **Connector** | The connection the tool belongs to |
| **Tool call id** | ID of this call, useful when matching logs |
| **Status** | Whether the call succeeded or failed |
| **Input** | Parameters the Digital Worker sent, such as the query and filters |
| **Output** | What the tool returned |
| Duration (right) | How long the call took, for example `1.6s` |

The Input and Output blocks can be shown as **JSON** (formatted) or **Raw**, and each has a copy button.

![Tool call details](https://mintcdn.com/fpt-62e894b4/3vi0Hyj1ddtKI8oH/images/en_trace_tool_call.jpg?fit=max\&auto=format\&n=3vi0Hyj1ddtKI8oH\&q=85\&s=4ffdac31669a39a14a34e56decdb92c3)

> [!TIP]
>
> Wrong answers often start at the lookup step. Open Input to see which query the Digital Worker searched with, then open Output to see what the knowledge base returned. If the results look right but the answer is still wrong, review the [Instructions](/en/instructions.md).

### When a Guardrail steps in

A turn where a Guardrail intervened is labelled **Issue**. In Outputs, the **Guardrail · input check** row shows its result (for example **Refused**). Click the row to see:

* **Rule**: The rule that fired, for example `__injection__`.
* **Screen**: The type of check, for example `injection` (a prompt trying to override the Digital Worker's instructions).
* **Action**: What the Guardrail did, for example **Refused**.

Example: A user tells the Digital Worker to ignore its instructions and make up figures. The Guardrail refuses, the message never reaches the model, and the user gets the safe reply shown in the AGENT message below it.

![Turn blocked by a Guardrail](https://mintcdn.com/fpt-62e894b4/3vi0Hyj1ddtKI8oH/images/en_trace_guardrail.png?fit=max\&auto=format\&n=3vi0Hyj1ddtKI8oH\&q=85\&s=f54f6b587a26567af2cac859f6c32718)

See how to set up rules in [Guardrails](/en/guardrails.md).

## Stats of conversation

The right column sums up the whole conversation.

![Stats of conversation](https://mintcdn.com/fpt-62e894b4/3vi0Hyj1ddtKI8oH/images/en_trace_stats.png?fit=max\&auto=format\&n=3vi0Hyj1ddtKI8oH\&q=85\&s=8fc202a47530cb8daa39f25c219fab4e)

| Group | Metric | Meaning |
| - | - | - |
| **Stats of conversation** | Turns | How many times the user asked and the Digital Worker answered |
| **Time** | First start, Last end | When the first turn started and the last turn ended |
| **Latency** | P50 | Typical wait: Half of all turns finished faster than this |
| | P99 | Worst-case wait: 99% of turns finished within this |
| | First token P50 | Typical wait before the user sees the first word appear |
| **Token breakdown** | Input | Tokens the Digital Worker reads before answering: Instructions, chat history, tool results |
| | Cache read | Input reused from cache, cheaper than reading it fresh |
| | Output | Tokens the Digital Worker writes: The answer and tool calls |
| | Reasoning | Tokens the model spends "thinking" before answering, if it supports this mode |
| | Guardrail checks | Tokens used to check questions and answers against Guardrails |
| | Total | Sum of the above |

> [!NOTE]
>
> **K** means thousand and **M** means million. The percentage in brackets is each item's share of total tokens.

### Understanding P50 and P99

Line up every turn from fastest to slowest:

* **P50** is the turn in the middle - What most users experience.
* **P99** is the turn near the very end - The longest waits.

Example: A P50 of 15 seconds and a P99 of 65 seconds means users usually wait about 15 seconds, but at worst more than a minute. The further apart the two numbers, the less predictable the response time.

### Use the stats to improve your Digital Worker

> **Input takes almost all tokens**
>
> The Digital Worker re-reads the whole chat history every turn, so long conversations get more expensive per turn. Consider shortening the [Instructions](/en/instructions.md) and limiting how much the knowledge base returns.

> **Cache read is zero**
>
> Content repeated across turns is billed at full price. Choosing a [model](/en/model.md) that supports caching can cut costs significantly.

> **P99 is many times P50**
>
> Open the slowest turns in the turn list to see whether the time goes into the model call or a tool.

> **Many turns with Issues**
>
> Check which Guardrail rule is firing. If it blocks valid questions, adjust the rule's description and examples in [Guardrails](/en/guardrails.md).

## Create, edit, delete

History and Trace details are read-only. Console records each conversation automatically, so you cannot create, edit or delete conversations here. To change how the Digital Worker answers, update its configuration in the **Build** tab and **Publish** again.

> [!NOTE]
>
> **Performance** in the Insights tab is under development and coming soon.


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