Ui componentsCommon settings

AI Chat

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
placeholderstring tNoInput 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

Configure help and support options, with the action they perform:

See Actions for more details on the actions

OptionTypeRequiredDescription
getHelpOptionsGetHelpOption[]NoAdditional help/support options
const aiChatSettings: InkeepAIChatSettings = {
  // ...
  getHelpOptions: [
    {
      icon: { builtIn: "FaEnvelope" },
      name: "Contact Support",
      isPinnedToToolbar: true,
      action: {
        type: "open_form",
        formSettings: {
          heading: "Contact Support",
          fields: [
            {
              name: "email",
              label: "Email",
              inputType: "email",
              isRequired: true,
            },
            {
              name: "issue",
              label: "Issue",
              inputType: "textarea",
              isRequired: true,
            },
          ],
        },
      },
    },
  ],
};

Tools

Configure custom tools for the AI assistant:

OptionTypeRequiredDescription
getToolsgetTools: (ctx: ToolContext) => ToolFunction<any>[]NoCustom tools for the AI assistant

See Tools for more details on tools

Custom Labels

Customize button and action labels:

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.

Contextual prompts

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)

Guidance prompts

Guidance prompts can be used to customize the behavior of the ai assistant response using natural language. You can think of guidance prompts as custom instructions for the large language model.

We've already optimized chat responses to have proper guardrails for staying on topic, tone, brand-protection, etc.

However, guidance prompts are useful when you want to go beyond the default behavior.

Checkout the Custom Guidance article for tips on how to use it.

On this page