Agent Observability
UI components

Agent Observability Provider

Context provider that every other component from this library expects. Install and mount it once, high in your tree — it creates the API client, resolves the current session, and shares the hooks that drive the rest of the UI. No visual output of its own.

Installation

pnpm dlx agent-observability-ui@latest add observability-provider
npx agent-observability-ui@latest add observability-provider
yarn dlx agent-observability-ui@latest add observability-provider
bunx --bun agent-observability-ui@latest add observability-provider

Usage

import { AgentObservabilityProvider } from '@/lib/observability-provider'
import { SessionDetailPage } from '@/components/session-detail-page'

// Wrap the subtree that needs session data. Pass a sessionId when
// rendering a single-session page; list pages can drop it.
export function App({ sessionId }: { sessionId: string }) {
  return (
    <AgentObservabilityProvider
      baseUrl="https://observability.example.com/api"
      sessionId={sessionId}
    >
      <SessionDetailPage />
    </AgentObservabilityProvider>
  )
}

Props

PropTypeDefaultDescription
baseUrlrequiredstringBase URL of your Agent Observability API. In Vite dev, pair this with a /api proxy; in production, point it at the deployed service.
sessionIdstringOptional session id the provider loads up-front. Downstream detail components (SessionHeader, SessionTimeline, TurnTranscriptSection, SessionEvents, SessionConfig, charts) read this through the context. Omit on list pages.
childrenrequiredReact.ReactNodeYour application tree.

On this page