Back to components

AI Interfaces

Tool Call Inspector

A live execution trace for agent tools, file operations, and long-running tasks.

agenttoolsobservability

Installation

Copy and paste the code into your project.

Accessibility notes

The ordered list preserves execution sequence, while every state and duration remains visible as text.

Agent activity

3 tool calls

live
  1. 1

    search_docs

    design system tokens

    128ms
  2. 2

    read_file

    components/card.tsx

    42ms
  3. …

    write_patch

    3 changes proposed

    running

Preview accent

TypeScript
const calls = [
  { tool: "search_docs", detail: "design system tokens", duration: "128ms", status: "done" },
  { tool: "read_file", detail: "components/card.tsx", duration: "42ms", status: "done" },
  { tool: "write_patch", detail: "3 changes proposed", duration: "running", status: "active" },
];

export function ToolCallInspector() {
  return (
    <section className="w-full max-w-md overflow-hidden rounded-xl border border-white/12 bg-[#0b0f14]/92 shadow-2xl">
      <header className="flex items-center justify-between border-b border-white/10 px-4 py-3">
        <div><p className="text-xs font-semibold uppercase tracking-[0.18em] text-[#40E0D0]">Agent activity</p><h3 className="mt-1 text-sm font-bold text-white">3 tool calls</h3></div>
        <span className="inline-flex items-center gap-2 rounded-full bg-[#40E0D0]/10 px-2.5 py-1 text-xs font-semibold text-[#d8fffb]"><span className="h-1.5 w-1.5 animate-pulse rounded-full bg-[#40E0D0]" /> live</span>
      </header>
      <ol className="divide-y divide-white/8">
        {calls.map((call, index) => (
          <li key={call.tool} className="grid grid-cols-[auto_1fr_auto] items-center gap-3 px-4 py-3">
            <span className={call.status === "active" ? "grid h-7 w-7 place-items-center rounded-md bg-[#a78bfa]/16 text-xs font-bold text-[#c4b5fd]" : "grid h-7 w-7 place-items-center rounded-md bg-[#40E0D0]/12 text-xs font-bold text-[#d8fffb]"}>{call.status === "active" ? "…" : index + 1}</span>
            <div className="min-w-0"><p className="truncate font-mono text-xs font-semibold text-slate-100">{call.tool}</p><p className="mt-1 truncate text-xs text-slate-500">{call.detail}</p></div>
            <span className="text-[0.65rem] font-semibold tabular-nums text-slate-500">{call.duration}</span>
          </li>
        ))}
      </ol>
    </section>
  );
}
Usage
<ToolCallInspector />

Related components

Tool health

Runtime dependencies

Last 15m
ToolSuccessP95
Search
Healthy
99.8%410ms
CRM
Healthy
98.7%620ms
Billing
Watch
94.1%1.4s

AI Interfaces

Tool Health Matrix

Intermediate

A runtime dependency matrix showing tool success rate, P95 latency, and degraded states for agent operations.

toolshealthobservability
View component

Latency waterfall

Tool execution path

1.42s total
  1. Search420ms
  2. Database710ms
  3. Formatter290ms

Database lookup owns 50% of the critical path.

AI Interfaces

Tool Latency Waterfall

Advanced

A critical-path timeline showing overlapping tool calls, blocking work, and total response latency.

toolslatencyobservability
View component

Agent activity

Research assistant

Live
  1. 1

    Searched knowledge base

    12 sources

  2. 2

    Compared candidate answers

    3 drafts

  3. 3

    Prepared final response

    Ready

AI Interfaces

Agent Activity Feed

Beginner

A compact live timeline for narrating agent progress, intermediate work, and completion state.

agentactivitytimeline
View component