AgentTrace

A run as a waterfall. Spans nest under the step that started them, bars sit at their real start and length, parents fold away children. AI.

Open playground
Step09.4 sTook
support_agent9.4 s
plan912 tokens1.8 s
search_orders1.3 s
refund_agent5.1 s
check_policy640 tokens1.6 s
refund_payment3.5 s
reply388 tokens1.2 s

About

AgentTrace is a React component in the AI category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { AgentTrace } from "@ashutoshswamy/smoui" and set spans.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { AgentTrace } from "@ashutoshswamy/smoui";

<AgentTrace spans={[{ id: "r", name: "agent", kind: "agent", start: 0, end: 9400, children }]} />

Props 1

spans

name, kind (agent, llm, tool), start and end in ms, optional tokens, error and children.

TraceSpan[]