# ASP.NET Core Reasoning

When users interact with AI agents, much of the process remains hidden: the model works through a problem, but nothing appears until the response arrives.

The [Reasoning](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning) component reveals the model's internal thinking trace in real time through a collapsible disclosure block, confirming that work is underway and giving power users the transparency needed to trust the output.

## Configuration

Bind [`Content`](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning/content) to the model's thinking trace and send incremental token updates as the stream arrives. This lets users watch the model reason in real time.

Use [`Label`](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning/label) to describe the current activity and [`SecondaryLabel`](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning/secondarylabel) to display elapsed time after the model finishes. Changing between "Thinking" and "Thought" with elapsed time immediately shows whether work is still underway. Pair `Icon` or [`SvgIcon`](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning/svgicon) with your application's design language to make the header easy to recognize.

```Razor HtmlHelper
    @(Html.Kendo().Reasoning()
        .Name("reasoning")
        .Label("Thinking")
        .Expandable(true)
        .Expanded(true)
        .Content("Identifying the correct data source and validating filters.")
    )
```

```Razor TagHelper
    <kendo-reasoning name="reasoning"
        label="Thinking"
        expandable="true"
        expanded="true"
        content="Identifying the correct data source and validating filters.">
    </kendo-reasoning>
```

Set [`Completed`](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning/completed) to `true` when the stream ends so the header changes from its in-progress spinner to a completed state, indicating that the trace is finished and the answer is ready.

## Expanded State

The expanded state shows the complete reasoning trace, helping users follow the model's thought process step by step. After reviewing the reasoning, users can collapse the block to hide its details.

Leave [`Expandable`](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning/expandable) enabled so users who do not need the trace can collapse it without losing context. Use [`Expanded`](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning/expanded) to control whether the block opens while the model works, and respond to user-driven changes with the `Expand`, `Collapse`, or `Toggle` methods.

```Razor HtmlHelper
    @(Html.Kendo().Reasoning()
        .Name("reasoning")
        .Label("Thought")
        .SecondaryLabel("for 1.5s")
        .Completed(true)
        .Expandable(true)
        .Expanded(false)
        .Content("Identifying the correct data source and validating filters.")
    )
```

```Razor TagHelper
    <kendo-reasoning name="reasoning"
        label="Thought"
        secondary-label="for 1.5s"
        completed="true"
        expandable="true"
        expanded="false"
        content="Identifying the correct data source and validating filters.">
    </kendo-reasoning>
```

## See Also

* [Reasoning Demo for ASP.NET Core](https://demos.telerik.com/aspnet-core/llm_kit/reasoning)

* [LLM Kit Overview](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/conversational-ui/llm-kit/overview)

* [Server-Side API of the Reasoning HtmlHelper](https://www.telerik.com/aspnet-core-ui/documentation/api/reasoning)

* [Server-Side API of the Reasoning TagHelper](https://www.telerik.com/aspnet-core-ui/documentation/api/taghelpers/reasoning)

* [JavaScript API Reference of the Reasoning](https://www.telerik.com/aspnet-core-ui/documentation/api/ui/reasoning)
