Embeddable chat widget for your website - Powered by Findem
agentId and apiKey with your actual
credentials.
window.FindemWidgetConfig = {
// Required
agentId: 'your-agent-id',
// Authentication (choose one)
apiKey: 'your-api-key', // For internal use
bearerToken: 'your-bearer-token', // For public API (widget partners)
// Optional: Notification URL for webhook callbacks
notificationUrl: 'https://yourapp.com/webhook',
// Optional: Agent parameters for session creation
agentParams: {
job_description: 'Senior Software Engineer',
// Add any custom fields
},
// Optional: Session metadata
sessionMetadata: {
source: 'career_page',
userId: 'user-123',
// Add any custom fields
},
// Optional: Message metadata (for each message sent)
metadata: {
source: 'demo_website',
userId: 'demo-user-123'
},
// Optional: UI Configuration
uiConfig: {
width: 400,
height: 600,
zIndex: 9999,
// Panel position (for floating mode)
panelPosition: {
bottom: 80,
right: 24
},
// Toggle button position
assistButtonPosition: {
bottom: 24,
right: 24
},
// Customization
enableResize: true,
showHeader: true, // Show/hide header (default: true)
disableSlideAnimation: false, // Disable slide animation (default: false)
chatButtonColor: '#6366f1', // Custom button color
emptyStateTitle: 'Start a conversation', // Welcome title
emptyStateSubtitle: 'Ask me anything!', // Welcome subtitle
inputPlaceholder: 'Type your message...', // Input placeholder
initialPrompts: [ // Initial prompt suggestions
'Find senior software engineers',
'Show me product managers',
'Search for data scientists'
]
},
// Optional: Display settings
displayMode: 'floating', // 'floating' or 'inline'
sessionId: 'existing-session-id', // Resume existing session
// Optional: Callbacks
onReady: () => console.log('Widget ready!'),
onOpen: () => console.log('Widget opened'),
onClose: () => console.log('Widget closed'),
onError: (error) => console.error('Widget error:', error),
onSessionChange: (sessionId) => {
// Called when a new session is created
console.log('Session created:', sessionId);
// Use this to: track analytics, store session ID, etc.
},
onMessage: (type, data) => console.log('Message:', type, data),
// Optional: Debug mode
debug: true
};
Add this code to your website:
<!-- Step 1: Configure the widget -->
<script>
window.FindemWidgetConfig = {
agentId: 'YOUR_AGENT_ID',
apiKey: 'YOUR_API_KEY'
};
</script>
<!-- Step 2: Load the embed script -->
<script src="https://chat-widget.findem.ai/embed.js"></script>
npm install and npm run dev before testing.