Workflows allow you to create app-specific flows that are specific to common scenarios your users may face. This often maps to specific tasks in your onboarding or user activation funnel.

Workflows support:

  • A custom initial message
  • Specifying clarifying questions or information the bot should ask for
  • Custom attachment types that can invoke forms, modals, or API calls within your front-end application to gather user-specific information


import { type Workflow } from "@inkeep/widgets";
import { type InkeepAIChatSettings } from "@inkeep/widgets";

const integrateWithMyAppWorkflow: Workflow = {
  id: "ikp_integrate_with_my_app",
  displayName: "Help me integrate with my app",
  goals: [
    "Identify the platform that the user is looking to add Inkeep on. Can be a website-based platform or docs platform, Slack/Discord bots, or via API",
    "Give instructions for how to add the bot to that platform."
  botPersona: "You are an expert solutions engineer",
  informationToCollect: [
      description: "Platform they are integrating Inkeep to",
      required: true,
  guidance: [
    "If not clear from the user's message, ask clarifying questions to understand the underlying platform (e.g. Docusaurus vs Slack vs ReadMe, etc.).", 
    "If the platform is not detailed in our quickstarts, then ask whether it's a React or JavaScript based platform so you can give the right guidance based on that.",
    "Happy to help. \n Where are you looking to add Inkeep?",

// of your settings
const aiChatSettings: InkeepAIChatSettings = {
  //... rest of aiChatSettings
  workflows: [integrateWithMyAppWorkflow]


idstringRequired. Id of the workflow.
displayNamestringRequired. Label of workflow in the UI.
goalsstring[]Required. Goals for the workflow, not visible to the user.
informationToCollectWorkflowInformationToCollect[]Required. Information to collect from the user. Learn more.
botPersonastringThe persona of the bot useful for defining the character, tone, and interaction style the bot will adopt when communicating with users.
contextstring[]Additional context about this workflow for the LLM, not visible to the user.
guidancestring[]Additional guidance for the LLM, not visible to the user.
initialReplyMessagestringRequired. The reply message from the bot after the user selects a workflow.
supportedInputsWorkflowModalSingleInput | WorkflowFunctionalMultiInput[]Configuration for the workflow inputs. Learn more.


descriptionstringRequired. Description of the information to be collected from the user in order to assist them through the workflow.
requiredbooleanRequired. Whether or not this information is required.



This input type will open a built-in modal with a form based on the configuration below to collect the user’s information.

idstringRequired. Id of the input.
displayNamestringRequired. Button label in the UI that opens the modal.
contentTypeWorkflowCodeContentType | WorkflowTextContentTypeRequired. Type of content user is inputting. Learn more.
workflowModalPropsWorkflowModalPropsAdditional modal configuration. Learn more.


This input type allows you to provide your own custom logic to pass information back to the chatbot as an attachment. This custom logic might be your own form, modal, or even via APIs that fetch information about a user from your own downstream services.

idstringRequired. Id of the input.
displayNamestringRequired. Button label in the UI that triggers the onInvoke function.
onInvoke(OnInvokeArgs) => void See below.Required. Function that runs when the button is clicked.


onInvoke is called with the following arguments:

workflowWorkflowThe workflow the user has selected.
selectedInputTypeWorkflowModalSingleInput | WorkflowFunctionalMultiInput[]The input type the user has selected.
callback(messageAttachments: MessageAttachment[]) => voidFunction to update the message attachments. This will override what is currently in state so append any new attachments to currentMessageAttachments to avoid removing an attachment. Learn more.
currentMessageAttachmentsMessageAttachment[]The message attachments that user attached. Learn more.


titleInputLabelstringLabel for the title input. Defaults to "Title".
modalHelpTextstringHelp text shown in the modal.
modalHelpElementReactElementHelp element shown in the modal.


contentInputLabelstringRequired. Label for the content input, also provided to the LLM when chat is submitted.
attachmentIconCustomIconIcon next to the title in the attachment item. Learn more.
languagestringCode language.


contentInputLabelstringRequired. Label for the content input, also provided to the LLM when chat is submitted.
attachmentIconCustomIconIcon next to the title in the attachment item. Learn more.


contentTypeWorkflowCodeContentType | WorkflowTextContentTypeRequired. Learn more.
titlestringRequired. Attachment title.
contentstringRequired. Attachment content.
idstringRequired. Attachment id.
contextstring[]Additional attachment context.