await initSidenet({
// Identity (required)
orgId: string, // Organization ID
userId: string, // Your Unique End-user User identifier
copilotId: string, // Copilot identifier
apiKey: string, // API key for backend requests
// Layout
position: 'left' | 'right', // Sidebar position (default: 'right')
width: string, // Panel width, e.g. '400px', '45vw' (default: '45vw')
height: string, // Panel height (modal default: '600px', sidebar: auto)
layout: 'sidebar' | 'modal' | 'drawer', // Layout mode (default: 'sidebar'). drawer = overlay panel that closes on outside-click/Escape
offset: { // Positioning offsets
top?: string,
bottom?: string,
left?: string,
right?: string,
},
zIndex: string | number, // Stacking order of the container (default: unset)
// Behavior
defaultOpen: boolean, // Start open or closed (default: false)
keyboardShortcut: string, // Key for Cmd/Ctrl shortcut, e.g. 'b'
contentElement: string, // CSS selector for content to push aside, e.g. '#app'
debug: boolean, // Enable verbose console logs (default: false)
// Agent & Threading
agentVersionId: string, // Use specific agent (skips agent selection)
showAgentDropdown: boolean, // Force-show/hide agent dropdown
// undefined (default) → auto: show if multiple
// subagents AND no agentVersionId provided
groupName: string, // Group name for chat requests
lastThread: boolean, // Auto-select most recent thread on init
threadId: string, // Pin to specific thread
read_only: boolean, // Hide composer (requires threadId)
use_routing: boolean, // Enable backend message routing (default: true)
// Context & Messages
context: string[], // Context strings sent with requests
firstMessage: string, // Auto-send on first open
// Runtime Auth
runtimeAuth: [{
providerName: string,
credentials: Record<string, any>,
}],
// Theming
theme: 'light' | 'dark', // Color scheme (default: 'light')
customCSS: string, // Raw CSS injected into Shadow DOM
customStyles: Record<string, Record<string, string>>, // Structured CSS rules
// UI chrome
showClose: boolean, // Show a close/collapse button in the header (default: false)
closeOnOutsideClick: 'auto' | 'always' | 'never', // Outside-click / Escape dismissal (default: 'auto')
// Greeting / placeholder / suggestions / theme tokens (overrides backend sdk_ui)
// Layers on top of the DB config — only the fields you pass are overridden.
sdkUi: Partial<SidebarSDKConfig>,
// Callbacks
onOpen: (detail) => void,
onClose: (detail) => void,
onResize: (detail) => void,
onReady: (detail) => void,
});