Skip to main content

Configuration Overview

The Navi widget accepts a configuration object with required and optional parameters. Here’s the complete structure:

Required Parameters

agentConfigId

  • Type: string
  • Description: Your Navi agent configuration ID from the dashboard
  • Example: "agent_abc123"

agentKey

  • Type: string
  • Description: Authentication key for SDK access (minimum 10 characters)
  • Example: "sk_live_abc123def456"
  • Note: This key only provides access to SDK endpoints, following the principle of least privilege

Feature Configuration

chatEnabled

  • Type: boolean
  • Default: true
  • Description: Enable or disable chat functionality

voiceEnabled

  • Type: boolean
  • Default: true
  • Description: Enable or disable voice functionality

autoStart

  • Type: boolean
  • Default: false
  • Description: Automatically start a voice conversation when the widget loads
  • Requirements: voiceEnabled must be true
  • Note: Starts voice mode after a 2-second delay once the agent config is loaded
  • See: Feature Configuration for more examples

enableMemoryContext

  • Type: boolean
  • Default: true
  • Description: Enable intelligent conversation continuity for onboarding agents
  • Note: See Feature Configuration for details

enableConversationRestore

  • Type: boolean
  • Default: false
  • Description: Enable conversation persistence across page refreshes for voice
  • Note: See Feature Configuration for details

User Identification & Usage

user_identifier

  • Type: string
  • Description: Unique identifier for the user
  • Note: Must be a string. Convert numeric IDs using String(userId)

company

  • Type: string
  • Description: Company name for user tracking, analytics, and filtering
  • Usage: Used for user segmentation and analytics in the dashboard
  • Example: "Acme Corporation", "Tech Startup Inc"

enableUsageChecking

  • Type: boolean
  • Default: true when user_identifier is provided
  • Description: Control usage limit checking before widget initialization
When enabled:
  • Checks user’s usage against configured monthly limits
  • Silently blocks widget if limits exceeded
  • Falls back to allowing access if check fails

Appearance & Customization

name

  • Type: string
  • Description: Custom name shown in the widget header
  • Example: "Shop Assistant", "Support Bot", "Tour Guide"

panelConfig

  • Type: object
  • Description: Configure the expanded panel appearance

position

  • Type: object
  • Description: Configure widget positioning on the page
Available alignments:
  • Top: "top-left", "top-center", "top-right"
  • Middle: "center-left", "center", "center-right"
  • Bottom: "bottom-left", "bottom-center", "bottom-right"

Customization Examples

Language Configuration

defaultLanguage

  • Type: object
  • Description: Configure default language for voice interactions

Supported Languages

The widget supports 32 languages via ElevenLabs:

Event Handlers

onReady

  • Type: function
  • Description: Called when the widget is ready for interaction

onError

  • Type: function(error)
  • Description: Called when an error occurs

onCallEnded

  • Type: function(summary)
  • Description: Called when a voice call or chat session ends

runTool

  • Type: function(toolName, args)
  • Description: Handle tool execution requests from the assistant

User Context API

Send contextual information to the assistant from anywhere in your application:

Context Best Practices

Complete Example

Here’s a full configuration example with all common options: