> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/en-us/advanced-basic/trace.md).

# Call Chain Usage Tutorial

## Feature Introduction

The call chain (Trace) is an observability tool based on [OpenTelemetry](https://opentelemetry.io/docs/languages/js/) It implements an observability tool. By automatically collecting, storing, and processing data on the client side, it visualizes the complete execution process behind a conversation, and is used to view the time taken, input/output, and token usage for each processing step (for example, model calls, knowledge base retrieval, MCP tool calls, or web search), providing a quantitative basis for locating issues and optimizing results.

Each new conversation request generates one trace record. A trace consists of multiple spans, and each span corresponds to one processing step in Cherry Studio, such as a model call, knowledge base retrieval, MCP tool call, or web search. The Trace window displays these spans in a tree structure, and you can expand them step by step to view details.

<figure><img src="/files/4538d2177238937bcc78181260c834a73f3dbaf5" alt=""><figcaption><p>Overall call chain effect</p></figcaption></figure>

## Enable Trace

Trace is hidden by default, and you need to enable Developer Mode first:

1. Open `Settings → General Settings`
2. find **Developer Mode**
3. Enable **Enable Developer Mode**

<figure><img src="/files/90d2e90635be626d96a1ec75ee39d816d5dcda8c" alt=""><figcaption><p>Enable Developer Mode in General Settings</p></figcaption></figure>

{% hint style="info" %}
After enabling it, previously generated sessions will not have Trace created retroactively; only subsequent new questions and answers will record the call chain.
{% endhint %}

Trace data is stored in the local app data directory. Usually no manual handling is needed. If you need to completely clear it, go to `Settings → Data Settings → Data Directory`and use **Clear Cache**, or open the data directory and delete the trace-related cache.

Common data directories:

* **macOS**:`~/Library/Application Support/CherryStudio`
* **Windows**:`%APPDATA%\CherryStudio`
* **Linux**:`~/.config/CherryStudio`

<figure><img src="/files/b6a31f14b5d19770e0f7dee19b5b76f5ac5015fe" alt=""><figcaption><p>Data directory and cache clearing entry</p></figcaption></figure>

## Scenario introduction

### Full-chain view

In the Cherry Studio dialog, click the call chain button to open the complete chain for this conversation. Whether the conversation called a model, web search, knowledge base, or MCP, the corresponding nodes can be viewed in the call chain window.

<figure><img src="/files/bb7b60215cc30f58f5dca413522b50ec2bce4b58" alt=""><figcaption><p>Call chain entry next to the conversation message</p></figcaption></figure>

<figure><img src="/files/2ff2194accaa4775f6a68a9dbdb6a38fb9426efe" alt=""><figcaption><p>Call chain tree view</p></figcaption></figure>

### View model calls

Click a model call node to view the latency, token usage, input, and output of that model request.

<figure><img src="/files/3048572835bce1d7d3341439d4aed1b7053aed16" alt=""><figcaption><p>Select a model call node</p></figcaption></figure>

<figure><img src="/files/98d5204f56a3a242fd4702b3ae5e4caa99e4c5bb" alt=""><figcaption><p>Model call input</p></figcaption></figure>

<figure><img src="/files/3e3a53eb9a17ba4a6b9a7598cb351ccaa835ce28" alt=""><figcaption><p>Model call output</p></figcaption></figure>

### View web search

Click a web search node to view the question in the search request, the returned results, and the context subsequently passed to the model.

<figure><img src="/files/6c6434d12f2a3368fc48996b9a9adde1c068765a" alt=""><figcaption><p>Select a web search node</p></figcaption></figure>

<figure><img src="/files/7df55ce5eab750be8e21388aff53f5ee062cfd45" alt=""><figcaption><p>Web search input</p></figcaption></figure>

<figure><img src="/files/08ea9527ca7202a39208b7a263b75ff05ed6a87e" alt=""><figcaption><p>Web search results</p></figcaption></figure>

### View knowledge base retrieval

Click a knowledge base node to view the retrieval question, the matched content, and the context returned by the knowledge base to the model.

<figure><img src="/files/2cb4fbe94a087e7b294046016aa4dab9de240a0e" alt=""><figcaption><p>Knowledge base node details</p></figcaption></figure>

### View MCP calls

Click an MCP node to view the MCP Server tool's input, return value, and latency, making it easier to troubleshoot whether the tool call behaved as expected.

<figure><img src="/files/8d809dc6e9482e2707d1582c12fd4a124bcc811b" alt=""><figcaption><p>MCP call details</p></figcaption></figure>

<figure><img src="/files/377cbb8e281d2a096655a376ccfe16ef117fbb92" alt=""><figcaption><p>MCP return results</p></figcaption></figure>

## Questions and suggestions

If the call chain data is displayed abnormally, or if you want to add more observability capabilities, refer to [Feedback and Suggestions](/docs/en-us/question-contact/suggestions.md) the official channels provided there. When giving feedback, it is recommended to include a Trace screenshot, the model used, whether Knowledge Base / MCP / Web Search is enabled, and the prompt that can reproduce the issue.

***

### 💡 Get help and submit feedback

If you encounter any questions, bugs, or have suggestions for feature improvements during configuration or use, please refer to [Feedback and Suggestions](/docs/en-us/question-contact/suggestions.md) the official channels provided there.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/en-us/advanced-basic/trace.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
