Overview
Add custom behavior to the Inkeep Assistant UI
Tools allow you to define custom functions that can be called by the AI assistant during chat interactions. These tools enable the AI to trigger actions in your application or the chat experience.
For example, you can use tools to escalate the conversation to a support channel or embed a sales call to action from within the experience.
Tools are available for the Enterprise tier. Please contact support@inkeep.com for details.
Overview
Tools are defined in the getTools
function of the AI chat settings.
Each tool has a type
, function
definition, and a renderMessageButtons
callback which determines which Message Buttons to display.
Message Buttons, if displayed, are shown in the bottom left of the assistant message and can trigger a variety of different actions when clicked by the user.
Action Type | Description | Use Case |
---|---|---|
open_link | Opens a URL in a new tab or current window | Link to documentation, external resources, or contact pages |
invoke_callback | Executes a JavaScript callback function | Trigger custom logic in your application, like showing a modal |
open_form | Displays a configurable form dialog | Collect user information for support tickets or contact requests |
Currently, tools are invoked after the AI assistant has responded with its main message.
You can define tool schemas using zod
and zod-to-json-schema
or directly with a JSON Object Schema.
onToolCall
The onToolCall
callback function is triggered whenever the AI uses a tool.
Common Tool Use Cases
Here are a few common use cases:
- Escalate to Support - Show a button that allows a user to escalate to support or hand off to other support channels.
- Detect Sales Intent - Identify when a user is expressing buying intent and have a sales call to action.
- Label Answers - Log question-answer data and annotations to your analytics system.
For common tool schema definitions, see Common Tools.