Install SDK
Add the Cyborg React SDK to your application.
Installation
bash
npm install @cyborg-sdk/reactBasic Usage
tsx
import { CyborgProvider } from '@cyborg-sdk/react'
function App() {
return (
<CyborgProvider config={{ publishableKey: 'cpk_live_xxx' }}>
{/* Your app components */}
</CyborgProvider>
)
}The chat interface will automatically render in the bottom-right corner of your application.
Configuration Options
tsx
<CyborgProvider
config={{
publishableKey: 'cpk_live_xxx',
uniqueIdentifier: 'user-123', // Enable conversation history
suggestedPrompts: ['How do I get started?', 'What features are available?'],
theme: {
primaryColor: '#6366f1'
}
}}
>
<YourApp />
</CyborgProvider>Next Steps
- CyborgProvider Configuration - Full configuration options
- useChat Hook - Programmatic chat control
- useCyborg Hook - Add context and tools
- Context-Aware Chat - Make chat understand your pages