# `PtcRunner.Kino.TraceTree`
[🔗](https://github.com/andreasronge/ptc_runner/blob/main/lib/ptc_runner/kino/trace_tree.ex#L2)

Interactive trace tree widget for Livebook.

Renders a hierarchical view of SubAgent execution from a `Step` struct,
showing agent names, durations, token counts, and expandable turn details.

## Usage

    {result, step} = SubAgent.run(planner, llm: my_llm, context: ctx, debug: true)
    PtcRunner.Kino.TraceTree.new(step)

The widget works with the in-memory Step struct. For multi-agent hierarchies,
pass a list of related steps:

    PtcRunner.Kino.TraceTree.new([parent_step, child1_step, child2_step])

Requires the `kino` dependency.

# `new`

```elixir
@spec new(PtcRunner.Step.t() | [PtcRunner.Step.t()]) :: Kino.JS.t()
```

Creates a new TraceTree widget from a Step or list of Steps.

## Examples

    PtcRunner.Kino.TraceTree.new(step)
    PtcRunner.Kino.TraceTree.new([parent_step, child_step1, child_step2])

---

*Consult [api-reference.md](api-reference.md) for complete listing*
