# Call Chain Usage Tutorial

## Feature Introduction

The call chain (also known as a “trace”) gives users insight into conversations, helping them understand the specific performance of the model, knowledge base, MCP, web search, and more during the conversation process. It is a [OpenTelemetry](https://opentelemetry.io/docs/languages/js/) implemented observability tool that achieves visualization through end-side data collection, storage, and processing, providing quantitative evaluation basis for problem diagnosis and effect optimization.

Each conversation corresponds to one trace record. A trace consists of multiple spans, and each span corresponds to one program processing logic in Cherry Studio, such as model session calls, MCP calls, knowledge base calls, and web search calls. Traces are displayed in a tree structure, with spans as tree nodes. The main data includes duration and token usage. Of course, in the span details, you can also view its specific input and output.

<figure><img src="/files/4538d2177238937bcc78181260c834a73f3dbaf5" alt=""><figcaption></figcaption></figure>

## Enable Trace

By default, after Cherry Studio is installed, Trace is hidden. You need to enable it in "Settings" - "General Settings" - "Developer Mode", as shown below:

<figure><img src="/files/61d528c8b28b3864b9483c4a66de42ba22d75d5c" alt=""><figcaption></figcaption></figure>

And no Trace records will be generated for previous conversations; Trace records will only be generated after new questions and answers occur. The generated records are stored locally. If you need to completely clear Trace, you can do so via "Settings" - "Data Settings" - "Data Directory" - "Clear Cache", or by manually deleting the files under \~/.cherrystudio/trace, as shown below:

<figure><img src="/files/baa2d0d21fd77095fb499f049acd390ac51cee86" alt=""><figcaption></figcaption></figure>

## Scenario Introduction

### View the full chain

In the Cherry Studio dialog, click Call Chain to view the full-chain data of the call chain. Whether a model, web search, knowledge base, or MCP is called during the conversation, you can view the full-chain call data in the call chain window.

<figure><img src="/files/3f3d97443e38efcb2ffcb9532d9b9a641dad3a15" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/e57301338411ee5d1f8cff3895305908357c31f4" alt=""><figcaption></figcaption></figure>

### View the model in the chain

If you want to view the details of the model in the call chain, you can click the model call node to view its input and output details.

<figure><img src="/files/58bd9a754cb71b75118f251208cdde26b8f1e966" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/cc826f21d539f68e691c933be18c0961c9373101" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/c5b38c633b3faf543940c8ae7223fac772597b21" alt=""><figcaption></figcaption></figure>

### View web search in the chain

If you want to view the details of web search in the call chain, you can click the web search call node to view its input and output details. In the details, you can see the question used to call web search and the results it returned.

<figure><img src="/files/c8bca6da7018bce58642ae1aa328003390e869fe" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/48ec10f124c4ed4ca4091c1046d0fee481c89a59" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/9bd9291c814022d33700db4ecf36bc964da3858e" alt=""><figcaption></figcaption></figure>

### View the knowledge base in the chain

If you want to view the details of the knowledge base in the call chain, you can click the knowledge base call node to view its input and output details. In the details, you can see the question used to query the knowledge base and the answer it returned.

<figure><img src="/files/2c2609aaec673d8e0cd8492aa2c28ebcc11b9354" alt=""><figcaption></figcaption></figure>

### View MCP calls in the chain

If you want to view the details of MCP in the call chain, you can click the MCP call node to view its input and output details. In the details, you can see the input parameters of the called MCP Server tool and the tool's return value.

<figure><img src="/files/8b38cdb7a754efd0a6be50354d78043a6490647b" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/bff9b837229f6c5f5ff64dd32bb404173481aab8" alt=""><figcaption></figcaption></figure>

## Questions and suggestions

The current feature is provided by Alibaba Cloud [EDAS](https://www.aliyun.com/product/edas) team. If you have any questions or suggestions, please join the DingTalk group (group number: 21958624) to have in-depth communication with the developers.

\\


---

# Agent Instructions: 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:

```
GET https://docs.cherry-ai.com/docs/en-us/advanced-basic/trace.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
