> ## Documentation Index
> Fetch the complete documentation index at: https://checkfu.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed a Session view

> Render Checkfu Session events without exposing an API key to the browser.

`@checkfu/ui` renders Session events and emits interaction intents. Your trusted backend owns the Checkfu API key and exposes two narrow forwarding routes: one paginated event-list route and one resumable event-stream route. Never expose a generic credentialed proxy.

The package is **not published to npm** — there is no registry install to run for `@checkfu/ui`. During private alpha you build against it from a Checkfu source checkout, or from a package copy supplied through an explicitly authorized alpha arrangement. This page documents the integration contract the kit will ship against if the owner authorizes distribution; it will name an install command only in the change that makes one resolve.

```tsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { useSessionEvents, workspaceProxyTransport } from "@checkfu/ui/sdk"

const transport = workspaceProxyTransport({
  sessionId,
  routePrefix: "/api/checkfu",
})

const state = useSessionEvents({
  sessionKey: sessionId,
  transport,
})
```

The proxy authenticates your application user, verifies that user may observe the requested Session, attaches the server-held Checkfu key, and forwards only the exact Session event list or stream request. The browser never receives a Checkfu credential.

`useSessionEvents` owns reconnect, cursor resume, deduplication, bounded gap recovery, and live preview replacement. Components consume `state.events`; composer actions remain ordinary intents that your application sends through its own authorized backend route.
