Beta: The SDK is in beta and actively being improved. Check npm for latest version.
Installation
Core Components
<UpliftAIRoom>
The main wrapper component that establishes connection to the assistant.
Props
Hooks
useUpliftAIRoom()
Access room functionality and state.
Methods
addTool(config: ToolConfig): Promise<void>
Add a new tool to the assistant.
updateTool(config: ToolConfig): Promise<void>
Update an existing tool configuration.
removeTool(name: string): Promise<void>
Remove a tool by name.
upsertTools(configs: ToolConfig[]): Promise<void>
Replace all tools with new set.
updateInstruction(instruction: string): Promise<void>
Update assistant’s system instructions.
useVoiceAssistant()
Get voice assistant state.
useTracks()
Access audio/video tracks.
useConnectionState()
Monitor connection status.
UI Components
Audio Components
<AudioTrack>
Renders audio output for a track.
<BarVisualizer>
Animated audio visualization bars.
state: Voice assistant statetrackRef: Audio track referencebarCount: Number of bars (default: 7)className: CSS class name
Control Components
<TrackToggle>
Toggle microphone or camera.
<DisconnectButton>
End the session.
<ControlBar>
Full control bar with all controls.
Type Definitions
ToolConfig
ParameterConfig
ToolInvocationData
Complete Examples
Basic Voice Assistant
Assistant with Tools
Dynamic Tool Management
Error Handling
LiveKit Components
The SDK re-exports all LiveKit components for convenience:Performance Tips
- Memoize tool handlers to prevent recreating on each render
- Use React.memo for components that don’t need frequent updates
- Batch tool operations when adding/removing multiple tools
- Lazy load tool implementations for better initial load time
