/assistant-ui:observabilityfrom assistant-ui
Instruments assistant-ui AI SDK backend routes with Langfuse, LangSmith, or Helicone, and renders independent trace data with @assistant-ui/react-o11y SpanResource and SpanPrimitive APIs.
Ships in assistant-ui. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Always consult assistant-ui.com/llms.txt for the latest API.
Observability has two separate layers. Langfuse, LangSmith, and Helicone instrument backend model calls. @assistant-ui/react-o11y renders span data already collected by your application. It does not send traces to a provider or derive spans from the assistant runtime.
wrapAISDK, metadata, and serverless flushing for LangSmith.SpanResource, every exported span primitive part, span contracts, timeline attributes, and the styled TraceWaterfall option.Use one provider based on the data model you need.
experimental_telemetry is enabled. Use it for a hierarchical trace across an agent turn, tool calls, and model calls.wrapAISDK(ai). Use it when traces, evaluations, and prompt management belong with LangChain or LangGraph tooling.Langfuse and Helicone can run together because one consumes OpenTelemetry spans while the other proxies provider traffic. LangSmith is its own wrapper path, so use its wrapped AI SDK functions instead of the originals.
SpanData[] feed with react-o11y only when the product needs an in app trace view.Keep provider credentials and instrumentation on the server. Every example uses openai("gpt-5.6-luna"), awaits convertToModelMessages(messages), and returns the AI SDK UI message response. The integration pages do not use an assistant-ui route helper. If a route needs one, import it from @assistant-ui/ai-sdk; @assistant-ui/react-ai-sdk re-exports the same API for older installs.
Resolve trace attributes from real auth and thread state. Do not put a provider key, Langfuse user ID, LangSmith metadata, or Helicone header in a client component.
SpanResource({ spans }) accepts the complete raw SpanData[] list, normalizes parent relationships, sorts visible spans by start time, and owns collapse state. Mount it at an isolated provider root:
const config = AuiConfig({ span: SpanResource({ spans }) });
<AuiProvider extends={null} config={config}>
<SpanPrimitive.Children components={{ Span: SpanRow }} />
</AuiProvider>;
The SpanRow component is automatically scoped to one visible span. Use SpanPrimitive.Timeline and SpanPrimitive.TimelineBar when rows must share a time axis. Use the copied TraceWaterfall element when a styled flat message and tool waterfall better fits the data you have.
Traces disappear on Vercel, Lambda, or another serverless runtime
await langfuseSpanProcessor.forceFlush() before the function exits, or a deployment specific waitUntil path.await client.awaitPendingTraceBatches() before the function exits.Langfuse has no spans
experimental_telemetry: { isEnabled: true } on each traced streamText or generateText call.LangfuseSpanProcessor only in the Node runtime. OpenTelemetry does not run in the edge runtime.LangSmith does not trace the route
wrapAISDK(ai), not the originals from ai.LANGSMITH_TRACING=true in the runtime environment.Helicone traffic still goes directly to OpenAI
baseURL must be https://oai.helicone.ai/v1 and the request must carry Helicone-Auth as well as the provider authorization header.A react-o11y view renders no rows
SpanResource with AuiConfig({ span: SpanResource({ spans }) }) and render beneath <AuiProvider extends={null} config={config}>.SpanData[] list. SpanPrimitive.Children reads the current span scope and does not fetch traces.A documented span component is missing
SpanPrimitive.ChildByIndex is not re-exported by the current source. Use the exported SpanByIndexProvider with a row component when explicit index scoping is necessary.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
17 skills in this plugin
/assistant-uiOverview and router for assistant-ui, the React library for building AI chat interfaces from composable primitives and a styled elements catalog. Use for high-level, cross-cutting, or architecture questions: choosing packages, picking a runtime, or understanding the layers (elements, primitives, the aui client with AuiConfig and AuiProvider, the runtime, adapters) and the message model. Covers `@assistant-ui/react` 0.15.x, `@assistant-ui/ai-sdk` for AI SDK v7 (`useChatRuntime`), `@assistant-ui/core`, `@assistant-ui/store`, `assistant-stream`, `assistant-cloud`, the LangGraph, LangChain, Google ADK, A2A, AG-UI, Eve, OpenCode, and Pi adapters, the `@assistant-ui/react-native` and `@assistant-ui/react-ink` bindings, and the `useAui`, `useAuiState`, and `useAuiEvent` hooks. For a specific area route to a focused sibling instead: setup, elements, primitives, runtime, tools, generative-ui, streaming, cloud, thread-list, copilots, markdown, react-mcp, observability, react-native, ink, or update./cloudAdds AssistantCloud backed persistence, authorization, and telemetry to assistant-ui apps. Use when wiring cross-session thread and message history, multi-device chat, message feedback, file uploads, or auth: passing `cloud` to `useChatRuntime` from `@assistant-ui/ai-sdk`, `AISDKThreads({ cloud })` for `AuiConfig` hosts, or `cloud` on `useLangGraphRuntime`. Covers constructing `AssistantCloud` with `authToken` (JWT), `apiKey` plus `userId`/`workspaceId` (server-side only), or `anonymous`; Clerk, Auth0, Supabase, and Firebase integrations and a backend token endpoint; the `cloud.threads`, `cloud.files`, `cloud.runs`, and `cloud.telemetry` client surface; and a custom `ThreadHistoryAdapter` on `CloudMessagePersistence`. Route here for threads that do not persist, 401s against the cloud API, or feedback buttons that do not save. For the `<ThreadList />` sidebar UI use thread-list; for the general adapter contracts use runtime.npx claudepluginhub assistant-ui/skills --plugin assistant-uiOther plugins' skills for the same job