> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/en/build/agent-ops/evaluations/trace-timeline.md). Agents can also search and read this documentation through its [MCP server](https://docs.maiagent.ai/~gitbook/mcp).

# Conversation Details and Execution Timeline

Use the execution timeline, full conversation history, and usage panels on the AI Assistant Monitoring conversation details page to find out why a response was slow or incorrect and how many Credits a

Every Agent response has a record under “<mark style="color:blue;">AgentOps</mark>” → “<mark style="color:blue;">AI Assistant Monitoring</mark>” → “<mark style="color:blue;">Conversation Records</mark>”. Click “<mark style="color:blue;">Details</mark>” on the far right to open the **Conversation Details** page. This page breaks down every step from receiving a message to sending the answer, making it the main place to investigate slow responses, incorrect answers, and high costs.

| What you want to know                                                  | Where to look                                                                                              |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Where those seconds went and which step is the bottleneck              | [Execution Timeline](#trace-timeline)                                                                      |
| What the model actually saw (system prompt, memory, retrieval results) | LLM steps in the [Execution Timeline](#trace-timeline) and [Full Conversation History](#full-conversation) |
| Whether a tool was called and what it returned                         | Tool steps in the [Execution Timeline](#trace-timeline)                                                    |
| Token usage, Credits, and savings from prompt caching                  | [Usage and Performance Panels](#usage-panels)                                                              |
| Total input/output tokens for an entire conversation with a given ID   | [Check Token Usage for an Entire Conversation by ID](#tokens-by-conversation)                              |
| How to share this record with engineers or retain it for an audit      | [Export](#export)                                                                                          |

## Page Layout <a href="#page-layout" id="page-layout"></a>

The page header provides “<mark style="color:blue;">Previous Record</mark>” / “<mark style="color:blue;">Next Record</mark>” (following the order in the current list), “<mark style="color:blue;">Copy Link</mark>”, and “<mark style="color:blue;">Export</mark>”. Below these, the sections appear in this order:

1. <mark style="color:blue;">**Basic Information**</mark>: User input, output message, AI assistant, LLM, user, caller account (see [User and Caller Account](https://docs.maiagent.ai/maiagent-user-guide/en/build/agent-ops/evaluations.md#sender-and-caller-account)), source, response time, user feedback, and more. Scheduled execution records also include the schedule name and status.
2. <mark style="color:blue;">**Identifiers**</mark>: Record ID, conversation ID, conversation platform ID, AI assistant ID, user message ID, and bot message ID (plus a schedule ID for scheduled executions). Each can be copied to help match records when reporting issues.
3. <mark style="color:blue;">**Full Conversation History**</mark>: The complete context sent to the model and the model's response.
4. <mark style="color:blue;">**Execution Timeline**</mark>: Duration, tokens, and Credits for each step.
5. **Usage and Performance Panels**: Conversation token statistics, Credit consumption statistics, LLM call breakdown, processing time analysis, streaming performance metrics, and character usage statistics.
6. <mark style="color:blue;">**Quality Score Details**</mark>, <mark style="color:blue;">**References**</mark>, <mark style="color:blue;">**Error Messages**</mark>, and <mark style="color:blue;">**Add to FAQ**</mark>: See [AI Customer Service Quality Management](https://docs.maiagent.ai/maiagent-user-guide/en/serve/ai-quality-guide.md) and [Add Conversation Records to FAQ](https://docs.maiagent.ai/maiagent-user-guide/en/build/agent-ops/add-to-faq.md).

## Execution Timeline <a href="#trace-timeline" id="trace-timeline"></a>

Below the heading, a summary shows where the N seconds were spent. The legend on the right identifies three colors: <mark style="color:blue;">LLM</mark>, <mark style="color:blue;">Tool</mark>, and a red outline for the <mark style="color:blue;">Bottleneck</mark>. The timeline lists each step in chronological order, showing its <mark style="color:blue;">Duration</mark>, <mark style="color:blue;">Tokens</mark>, and <mark style="color:blue;">Credits</mark>. The longest step is outlined in red as the bottleneck and expanded by default. Click any step to “<mark style="color:blue;">Expand Details</mark>” or “<mark style="color:blue;">Collapse Details</mark>”.

### Step Types <a href="#step-types" id="step-types"></a>

| Step                                                          | Contents                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | What to check                                                                                                                                                         |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">Preprocessing (N Steps)</mark>      | Dispatch delay, service initialization, message loading, context loading, waiting for attachments, input processing, retrieval preparation, and similar stages are collapsed into one group. Expand it to see “<mark style="color:blue;">Preprocessing Stage Details</mark>”.                                                                                                                                                                                                                                                                                            | Long waits for attachments or dispatch delays point to preliminary operations rather than the model.                                                                  |
| <mark style="color:blue;">Retrieval</mark>                    | Knowledge base embedding and retrieval                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Slow retrieval usually relates to a large knowledge base or Reranker settings.                                                                                        |
| <mark style="color:blue;">Round N</mark> LLM                  | Each model call in Agent mode counts as one round. Shows the <mark style="color:blue;">Input</mark> source (user message / tool results / previous LLM round), <mark style="color:blue;">Decision</mark> (direct reply / call N tools / continue to LLM round N; unfinished calls show “Incomplete, no response generated”, see [Unfinished Model Calls](#unfinished-llm-calls)), send and receive times for the <mark style="color:blue;">LLM Request and Response</mark>, input/output tokens and their total for this round, and Credits (including cache discounts). | Too many rounds mean the Agent is calling tools repeatedly; a long single round points to a slow model.                                                               |
| <mark style="color:blue;">Tool Execution Details</mark>       | Tool name, <mark style="color:blue;">Status</mark> (success / failure / timeout), <mark style="color:blue;">Input</mark> parameters, <mark style="color:blue;">Output</mark> results, the <mark style="color:blue;">Request URL</mark> for API tools, and where the results are sent (LLM round N or the final response).                                                                                                                                                                                                                                                | Check here for tool failures, timeouts, or unexpected returned content.                                                                                               |
| <mark style="color:blue;">Hook Execution Logs</mark>          | The <mark style="color:blue;">Input Hooks</mark> / <mark style="color:blue;">Output Hooks</mark> applied to this message and their actions                                                                                                                                                                                                                                                                                                                                                                                                                               | If a response is masked or blocked, check which Hook did it. See [Hook Execution Logs](https://docs.maiagent.ai/maiagent-user-guide/en/build/hook/execution-logs.md). |
| <mark style="color:blue;">Guardrail Evaluation Results</mark> | The security guardrail's decision (`NONE` means allowed; `BLOCKED` means blocked)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Start here if a response was blocked.                                                                                                                                 |
| <mark style="color:blue;">Postprocessing Operations</mark>    | Final operations such as saving the response, scheduling evaluations, and updating usage                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Usually brief; longer durations indicate system load.                                                                                                                 |

### Unfinished Model Calls <a href="#unfinished-llm-calls" id="unfinished-llm-calls"></a>

When a model call does not finish normally, the timeline shows the round where it stopped instead of displaying it as successful:

* The LLM round summary shows “<mark style="color:blue;">Incomplete, no response generated</mark>”. Hover over the time bar, and the tooltip's <mark style="color:blue;">Decision</mark> shows the same text rather than “Direct reply”.
* Expand the round's details. The status text in the upper left shows how it ended:

| Status                                     | Meaning                                                                                                           | Text Color |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | ---------- |
| <mark style="color:blue;">Success</mark>   | The model responded normally                                                                                      | Green      |
| <mark style="color:blue;">Failure</mark>   | The call encountered an error                                                                                     | Red        |
| <mark style="color:blue;">Timeout</mark>   | The response exceeded the time limit and the call was cut off                                                     | Amber      |
| <mark style="color:blue;">Cancelled</mark> | Response generation was stopped, for example when a user clicked “<mark style="color:blue;">Stop Response</mark>” | Gray       |

> A customer service supervisor receives a report from a colleague: “The assistant stopped halfway through its answer.” She opens the conversation's details in “<mark style="color:blue;">AI Assistant Monitoring</mark>”. LLM round 1 on the timeline shows “Incomplete, no response generated”, and its expanded status is “Cancelled”. She now knows that generation was stopped rather than the model failing, so no assistant settings need to change.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-d4b67b46a33693a5d996887947a7203813facb35%2Fagentops-trace-cancelled-step.png?alt=media" alt="LLM round 1 in the execution timeline shows ‘Incomplete, no response generated’; both the tooltip and expanded details show the status as Cancelled"><figcaption><p>After generation is stopped, LLM round 1 is marked incomplete with the status “Cancelled”</p></figcaption></figure>

{% hint style="info" %}
Steps without a status, or with a status not listed above, appear in gray. Only explicitly successful steps appear in green.
{% endhint %}

### View What the Model Saw <a href="#payload-views" id="payload-views"></a>

Expand “<mark style="color:blue;">LLM Request and Response</mark>” in an LLM step to switch between three views of the content sent to the model:

* <mark style="color:blue;">Categorized</mark>: Splits the request into <mark style="color:blue;">System Prompt</mark>, <mark style="color:blue;">Conversation History</mark>, <mark style="color:blue;">Long-Term Memory</mark>, <mark style="color:blue;">Retrieval Results</mark>, <mark style="color:blue;">Tool Results</mark>, <mark style="color:blue;">Current User Message</mark>, <mark style="color:blue;">Available Tools</mark>, and <mark style="color:blue;">Other</mark>, with an item count for each category. Check here to confirm whether the correct knowledge base passages were retrieved or memory was included.
* <mark style="color:blue;">Formatted</mark>: Displays messages individually by role (system / user / assistant / tool).
* <mark style="color:blue;">Raw</mark>: Shows the original, unprocessed content.

Each block has a “<mark style="color:blue;">Copy</mark>” button in the upper right so you can share its contents with engineers.

{% hint style="info" %}
The timeline appears only when trace data was recorded for this response. Older records and some response modes show only basic information and usage panels.
{% endhint %}

## Full Conversation History <a href="#full-conversation" id="full-conversation"></a>

“<mark style="color:blue;">Full Conversation History</mark>” presents the entire model call as a conversation. Each message shows its role—<mark style="color:blue;">System</mark> / <mark style="color:blue;">User</mark> / <mark style="color:blue;">Assistant</mark> / <mark style="color:blue;">Tool</mark>—and a label indicating its purpose in this response:

| Label                                                 | Meaning                                                                                                                                                                 |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">System Prompt</mark>        | Role instructions and the system prompt assembled by the platform                                                                                                       |
| <mark style="color:blue;">Long-Term Memory</mark>     | Content brought in through persistent memory or cross-conversation retrieval; see [Agent Memory](https://docs.maiagent.ai/maiagent-user-guide/en/build/agent.md#memory) |
| <mark style="color:blue;">Conversation History</mark> | Earlier exchanges in the same conversation                                                                                                                              |
| <mark style="color:blue;">Current Round Input</mark>  | The message the user sent this time                                                                                                                                     |
| <mark style="color:blue;">Model Response</mark>       | The model's output this time                                                                                                                                            |

Long messages are truncated by default. Click “<mark style="color:blue;">Expand Full Text</mark>” to see everything or “<mark style="color:blue;">Collapse</mark>” to shorten it again. The full conversation history and execution timeline link to each other: click “<mark style="color:blue;">View Source</mark>” on the timeline to jump to the corresponding message, or “<mark style="color:blue;">Back to User Message</mark>” in the conversation history to return to the start of the timeline.

## Usage and Performance Panels <a href="#usage-panels" id="usage-panels"></a>

### Conversation Token Statistics <a href="#token-usage" id="token-usage"></a>

The <mark style="color:blue;">Token Usage</mark> for each part of this response: <mark style="color:blue;">Embedding</mark>, <mark style="color:blue;">Image Embedding</mark> (shown only when image search is used), <mark style="color:blue;">Reranking</mark>, <mark style="color:blue;">LLM Input</mark>, <mark style="color:blue;">LLM Output</mark>, <mark style="color:blue;">LLM Cache Creation</mark>, <mark style="color:blue;">LLM Cache Read</mark>, and <mark style="color:blue;">Total Tokens</mark>. Cache read tokens are prompt cache hits and are billed at a discounted rate.

### Check Token Usage for an Entire Conversation by ID <a href="#tokens-by-conversation" id="tokens-by-conversation"></a>

The conversation token statistics above cover **one response**. Each AI response in the same conversation (the same conversation ID) adds one record to <mark style="color:blue;">Text Conversation Records</mark>. To find the total input/output tokens for the conversation, sum the records with that conversation ID.

{% hint style="info" %}
The <mark style="color:blue;">Keyword</mark> filter in the <mark style="color:blue;">Text Conversation Records</mark> list matches the contents of user messages and AI responses. Entering a conversation ID will not find its records.
{% endhint %}

1. In <mark style="color:blue;">Text Conversation Records</mark>, use the time range, <mark style="color:blue;">AI Assistant</mark>, and other filters to narrow the results to a range that includes the conversation, then click <mark style="color:blue;">Export</mark>.
2. Download the Excel file from [Export Requests](https://docs.maiagent.ai/maiagent-user-guide/en/build/agent-ops/evaluations.md#export-requests). The file has source-specific worksheets such as <mark style="color:blue;">Admin Q\&A</mark>, <mark style="color:blue;">API Calls</mark>, and <mark style="color:blue;">Web Conversations</mark>. Each row represents one response.
3. In the worksheet for the conversation's source, filter the <mark style="color:blue;">Conversation ID</mark> column and sum <mark style="color:blue;">Conversation Token Statistics - Total LLM Input Tokens</mark> and <mark style="color:blue;">Conversation Token Statistics - Total LLM Output Tokens</mark>. Each row also has <mark style="color:blue;">Credit Consumption</mark> columns that you can sum as well.

{% hint style="warning" %} <mark style="color:blue;">Conversation Token Statistics - Total LLM Input Tokens</mark> excludes tokens for prompt cache creation and reads. With a cache hit, this column may contain only a single-digit value because most of the context sent to the model is counted as cached tokens. For the full LLM token count including caching, sum <mark style="color:blue;">Conversation Token Statistics - Total Tokens</mark> (the sum of LLM input, output, cache creation, and cache read tokens, excluding embedding and reranking). Cache costs appear under <mark style="color:blue;">Credit Consumption - LLM Cache Read</mark> and <mark style="color:blue;">Credit Consumption - LLM Cache Write</mark>. For the cache token breakdown of an individual response, see [Conversation Token Statistics](#token-usage) on its details page.
{% endhint %}

For example, an engineer integrating the API obtains a conversation ID from their own system logs and wants to know the input and output token counts for that conversation. In <mark style="color:blue;">Text Conversation Records</mark>, select the Agent and a time range covering the conversation, then export. Open the <mark style="color:blue;">API Calls</mark> worksheet in Excel, filter by that conversation ID, and sum the input and output token columns separately. To include prompt caching, sum <mark style="color:blue;">Conversation Token Statistics - Total Tokens</mark> instead (see the note above). To inspect an individual response, return to the list and open its “<mark style="color:blue;">Details</mark>”. The <mark style="color:blue;">Identifiers</mark> section has a copyable <mark style="color:blue;">Conversation ID</mark> to confirm that it belongs to the same conversation.

### Credit Consumption Statistics <a href="#credit-cost" id="credit-cost"></a>

The same stages are converted into <mark style="color:blue;">Credits</mark> and summed as <mark style="color:blue;">Total Credits</mark>. “<mark style="color:blue;">Saved Through Prompt Caching</mark>” below shows how many fewer Credits this response cost with the platform's automatic prompt caching than it would have without a cache hit. See [Credit Allowance](https://docs.maiagent.ai/maiagent-user-guide/en/others/credits.md) for billing rules.

### LLM Call Breakdown <a href="#llm-call-breakdown" id="llm-call-breakdown"></a>

Shows the <mark style="color:blue;">Sequence Number</mark>, <mark style="color:blue;">Duration</mark>, and tokens for each LLM call in Agent mode. The column totals approximately match the statistics above (rounding differences are allowed). If there are many rounds with high token counts, consider shortening the role instructions or limiting the [Maximum Iterations](https://docs.maiagent.ai/maiagent-user-guide/en/build/agent/custom-max-tokens.md).

### Processing Time Analysis <a href="#processing-time" id="processing-time"></a>

| Item                                                                                                         | Description                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">Attachment Processing</mark>                                                       | Time spent uploading and parsing conversation attachments                                                                   |
| <mark style="color:blue;">Embedding</mark> / <mark style="color:blue;">Reranking</mark>                      | The two stages of knowledge base retrieval                                                                                  |
| <mark style="color:blue;">AI Model Inference</mark>                                                          | The entire LLM reasoning and response generation process                                                                    |
| <mark style="color:blue;">System Overhead</mark>                                                             | Total response time minus the stages above: system initialization, request validation, Agent workflow preparation, and more |
| <mark style="color:blue;">Core Processing Time</mark> / <mark style="color:blue;">Total Response Time</mark> | The former sums the processing stages; the latter is the time the user actually waits                                       |

### Streaming Performance Metrics and System Performance Waterfall <a href="#streaming-metrics" id="streaming-metrics"></a>

| Metric                                                                                                           | Description                                                                                                                                                                                                  |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <mark style="color:blue;">First Token Time</mark>                                                                | Time from the start of LLM generation to the first token, reflecting model startup speed                                                                                                                     |
| <mark style="color:blue;">First Token From Request</mark>                                                        | Total delay from sending the request to receiving the first token, including preprocessing, retrieval, and embedding; this is how long users wait before text starts appearing                               |
| <mark style="color:blue;">Generation Speed</mark>                                                                | Average tokens generated per second (TPS) during streaming; higher values mean smoother output                                                                                                               |
| <mark style="color:blue;">Total Generation Time</mark> / <mark style="color:blue;">Total Generated Tokens</mark> | Generation time and token count for the complete response                                                                                                                                                    |
| <mark style="color:blue;">Performance Status</mark>                                                              | Overall rating of <mark style="color:blue;">Excellent</mark> / <mark style="color:blue;">Good</mark> / <mark style="color:blue;">Needs Optimization</mark> based on first-token latency and generation speed |

The “<mark style="color:blue;">System Performance Waterfall</mark>” draws the stages as horizontal bars in chronological order, with <mark style="color:blue;">Total Duration</mark> spanning the full length so you can spot the longest stage at a glance. For individual step details, go to the [Execution Timeline](#trace-timeline).

### Character Usage Statistics <a href="#words-usage" id="words-usage"></a>

<mark style="color:blue;">Input Characters</mark>, <mark style="color:blue;">Output Characters</mark>, and <mark style="color:blue;">Total Characters</mark> correspond to the conversation character counts in the Agent's Usage Analysis tab.

## Export <a href="#export" id="export"></a>

The “<mark style="color:blue;">Export</mark>” dropdown in the page header offers three formats. All download directly in the browser without going through export requests:

| Format                                               | Contents                                                                              | Use                                                                                                                                                                                                         |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">Export JSON</mark>         | The complete record, including basic information, identifiers, trace steps, and usage | Share with engineers to reproduce issues or import into your own analysis tools                                                                                                                             |
| <mark style="color:blue;">Export Markdown</mark>     | The same content organized as readable Markdown                                       | Paste into tickets or meeting notes                                                                                                                                                                         |
| <mark style="color:blue;">Export Credit Audit</mark> | An Excel file of Credit entries for each transaction in this response                 | Reconciliation and auditing. This export lists individual transactions and excludes derived values such as “Saved Through Prompt Caching”. The option is disabled when the record has no Credit audit data. |

{% hint style="info" %}
To export multiple conversation records at once, return to the “<mark style="color:blue;">Conversation Records</mark>” list, apply filters, and click “<mark style="color:blue;">Export</mark>”. [Export Requests](https://docs.maiagent.ai/maiagent-user-guide/en/build/agent-ops/evaluations.md#export-requests) generates the Excel file in the background.
{% endhint %}

## Troubleshooting Examples <a href="#troubleshooting-examples" id="troubleshooting-examples"></a>

* **A user complains that responses take a long time to start**: Check First Token From Request in the streaming performance metrics, then find the red-outlined bottleneck in the execution timeline. If it is “Waiting for Attachments” in preprocessing or “Retrieval”, the delay comes from preliminary operations rather than the model.
* **The Agent answers incorrectly even though the knowledge base has the information**: Expand the LLM step's Categorized view and check whether <mark style="color:blue;">Retrieval Results</mark> contains the correct passages. If not, use [Search Testing](https://docs.maiagent.ai/maiagent-user-guide/en/build/knowledge-base/test-search-result.md) to adjust the knowledge base. If the passages were retrieved but the answer is wrong, revise the role instructions.
* **Why did this question use so many Credits?**: Check the number of rounds and input tokens per round in the LLM call breakdown. Many rounds indicate repeated tool calls; review tool descriptions or limit the maximum iterations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/build/agent-ops/evaluations/trace-timeline.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
