Skip to main content
Skybridge exports hooks and utilities from skybridge/web that work across multiple runtimes. See the compatibility matrix below for platform-specific availability.

State Management

Context Sync

data-llm

Sync widget UI state with the model for contextual responses

Utilities

createStore

Create a Zustand store that automatically syncs with widget state

User Interface

Actions

Advanced

Import

All hooks and utilities are exported from skybridge/web:
import {
  createStore,
  useCallTool,
  useDisplayMode,
  useFiles,
  useLayout,
  useSetOpenInAppUrl,
  useAppsSdkContext,
  useMcpAppContext,
  useOpenExternal,
  useRequestModal,
  useSendFollowUpMessage,
  useToolInfo,
  useUser,
  useWidgetState,
} from "skybridge/web";

Runtime Compatibility

Skybridge supports two runtime environments: Apps SDK (ChatGPT) and MCP Apps (open specification). Most hooks work in both, but some features are platform-specific.
Hook / FeatureApps SDKMCP AppsNotes
useToolInfo
useWidgetState⚠️MCP Apps: polyfilled; state doesn’t persist across widget renders
data-llm⚠️MCP Apps: polyfilled (same limitation as useWidgetState)
useCallTool
useSendFollowUpMessage
useOpenExternal
useLayout
useUser
useDisplayMode
useFilesApps SDK only
useSetOpenInAppUrlApps SDK only
useRequestModal⚠️MCP Apps: polyfilled; renders in iframe instead of host modal
useAppsSdkContextApps SDK only
useMcpAppContextMCP Apps only
Learn more about runtime differences in Write Once, Run Everywhere.