Ui componentsCommon settings

AI Assistant Settings

Customize the chat experience for the Inkeep widgets.

Settings for Inkeep's AI-powered chat features, including AI assistant's personality, workflows, tools, and UI customization.

Basic Configuration

// Basic chat configuration
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  aiAssistantName: 'Keepie',
  chatSubjectName: 'Inkeep',
  placeholder: 'Ask me anything about our API...',
  introMessage: '👋 Hi! I'm here to help you with technical questions...',
  isShareButtonVisible: true,
  isCopyChatButtonVisible: true
}
 
// Advanced configuration with personalization
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  aiAssistantName: 'Atlas Assistant',
  chatSubjectName: 'MongoDB Atlas',
  placeholder: 'How do I get started?',
  introMessage: `How can I help you today?`,
  aiAssistantAvatar: '/assets/assistant-light.png',
  userAvatar: userProfile.avatarUrl,
  exampleQuestions: [
    'How do I connect to my cluster?',
    'What are the instance sizes?',
    'How do I enable backups?'
  ],
  disclaimerSettings: {
    isEnabled: true,
    label: 'AI Assistant',
    tooltip: 'Responses are AI-generated and may require verification.'
  },
  toolbarButtonLabels: {
    clear: 'Start Over',
    share: 'Share Chat',
    getHelp: 'Get Help',
    stop: 'Stop',
    copyChat: 'Copy Chat'
  }
}

AI Assistant Settings

Configure the AI assistant's personality and appearance:

OptionTypeRequiredDescription
aiAssistantNamestringNoDisplay name for the AI assistant
chatSubjectNamestringNoTopic/product the assistant specializes in
placeholderstringNoInput field placeholder text
introMessagestringNoWelcome message (supports markdown)
aiAssistantAvatarstring | { light: string, dark: string }NoURL for AI assistant's avatar (40x40px recommended)
userAvatarstringNoURL for user's avatar image
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  aiAssistantName: "Atlas Assistant",
  chatSubjectName: "MongoDB Atlas",
  placeholder: "Ask me about MongoDB Atlas...",
  introMessage: `Welcome back ${userName}! How can I help you today?`,
  aiAssistantAvatar: {
    light: "/assets/assistant-light.png",
    dark: "/assets/assistant-dark.png",
  },
  userAvatar: userProfile.avatarUrl,
};

Example Questions

Configure suggested questions for users to quickly start conversations:

OptionTypeRequiredDescription
exampleQuestionsstring[]NoPre-defined questions for quick access
exampleQuestionsLabelstringNoCustom heading for example questions section
isFirstExampleQuestionHighlightedbooleanNoEmphasize the first question; useful for highlighting the most common question
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  exampleQuestions: [
    "How do I connect to my cluster?",
    "What are the instance sizes?",
    "How do I enable backups?",
  ],
  exampleQuestionsLabel: "Popular Questions",
  isFirstExampleQuestionHighlighted: true,
};

Chat Features

Control chat sharing and interaction options:

OptionTypeRequiredDescription
isShareButtonVisiblebooleanNoEnable chat sharing functionality
shareChatUrlBasePathstringNoBase URL for shared chats
isCopyChatButtonVisiblebooleanNoShow copy chat button
shouldOpenLinksInNewTabbooleanNoOpen links in new tab
isViewOnlybooleanNoPrevent sending new messages
chatIdstringNoLoad specific chat session
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  isShareButtonVisible: true,
  shareChatUrlBasePath: "/shared-chats",
  isCopyChatButtonVisible: true,
  shouldOpenLinksInNewTab: true,
};

Disclaimer Settings

Configure AI usage disclaimers:

OptionTypeRequiredDescription
disclaimerSettingsAIChatDisclaimerSettingsNoAI usage disclaimer configuration
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  disclaimerSettings: {
    isEnabled: true,
    label: "AI Assistant",
    tooltip: "Responses are AI-generated and may require verification.",
  },
};

Help Actions

You can display buttons or links that lead to your desired support channels at the bottom right of the chat experience:

These can be used to open a link, trigger a create ticket form, or transfer to live chat.

OptionTypeRequiredDescription
getHelpOptionsGetHelpOption[]NoConfiguration for the possible support channels and the actions that they trigger when clicked by a user.
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  getHelpOptions: [
    {
      icon: { builtIn: "FaEnvelope" },
      name: "Contact Us",
      isPinnedToToolbar: true,
      action: {
        type: "open_link",
        url: "mailto:support@example.com?subject=Support Request",
      },
    },
    {
      icon: { builtIn: "FaDiscord" },
      name: "Ask on Discord",
      action: {
        type: "open_link",
        url: "https://discord.gg/your-discord-invite",
      },
    },
    {
      icon: { builtIn: "FaDiscord" },
      name: "Create Support Ticket",
      action: {
        type: "open_form",
        formSettings: {
          // ... form settings
        },
      },
    },
  ],
};

See Actions for complete examples.

If you want to pin a certain getHelpOption to always display as a standalone button in the toolbar, set isPinnedToToolbar to true.

Tools

Configure custom tools for the AI assistant:

OptionTypeRequiredDescription
getToolsgetTools: (ctx: ToolContext) => ToolFunction<any>[]NoCustom tools for the AI assistant
onToolCall(toolCall: FunctionToolCallArgumentsDoneEvent, ctx: ToolContext) => void | unknown | Promise<unknown>NoCallback function triggered whenever the AI uses a tool.

See Tools for more details on tools

Tool Bar Button Labels

Customize the buttons displayed in the bottom right of the AI chat:

OptionTypeRequiredDescription
toolbarButtonLabelsAIChatToolbarButtonLabelsNoCustom button label text
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  toolbarButtonLabels: {
    clear: "Start Over",
    share: "Share Chat",
    getHelp: "Get Help",
    stop: "Stop",
    copyChat: "Copy Chat",
  },
};

Prompts

Provide additional context or instructions for the AI assistant. prompts apply to the entire chat session, not just the first message.

OptionTypeRequiredDescription
promptsstring[]NoSystem-level instructions that guide the AI's behavior and responses. Use these to define the assistant's personality, knowledge boundaries, and response style.

Add user context

Contextual prompts can be used to provide additional details about the user that might be helpful information for the AI assistant to consider while answering.

Often, this is used to dynamically provide information about the user that can be inferred by their account (if authenticated to your application) or based on the page they are currently viewing.

Examples

For providing context based on the user:

`The user is currently viewing documentation page ${url}.`
"The user is new to the platform." // (for user life cycle stages)

For providing context based on a product:

`The question is about ${product}.` // (for teams with multiple products)
"The user is using the cloud hosted version of the application." // (for teams with multiple versions or pricing tiers)

Add custom rules

Prompts can be used to customize or guide the behavior of the AI assistant using instructions in natural langauge.

By default, the AI assistanth has sensible defaults for staying on topic, brand-protection, faithfulness to the source content, and other guardrails.

However, prompts can be useful to further customizing tone, having the assistant ask more clarifying questions, adding topics it should refuse to answer, or otherwise customizing the exact experience to your scenario.

See Rules & Prompts for our recommendations and examples around how to prompt LLMs.

On this page