Skip to main content

Chat Agent

Chat agents allow users to interact with AI instances (or agents) by asking them questions related to the agents knowledge settings. If the agent has documents or uploads associated to it, the agent can produce content related to those items.

The section can be located from the main menu: Chat with agents

New Chat

By selecting New Chat, a modal appears for the user to provide details for the following:

  • Agent: This is a mandatory field which requires users to select a previosuly created agent. (See more details under the agents page.)
  • Chat name: This is an optional field of the name you would like to give to the chat and relates to the context of the questions asked to the agent. If not provided, ToothFairyAI will generate a title based on the first interaction with the agent.
  • Description: This is an optional field and as the field name suggests, should be a description of what the chat is about.
  • Language: This is set to auto-detect by default. The user can choose which language the Large Language Model (LLM for short), will provide responses in. Leaving this on Auto-Detect allows the chat to change the language based on the input. This field is only available if the multi-language feature is enabled for the selected agent.
  • Public chat: Allows the chat to be visible to other users that have been invited to the workspace or private to yourself. This can be changed from private to public after the chat has been created, however you are unable to go from public to private. Admins can see all chats, regardless of whether they are public or private.
  • Knowledge: Allows the agent to narrow down the data it uses to answer questions to a specific document. This is an optional field and can be left blank. If left blank, the agent will use all documents associated to it to answer questions. No documents coming from the web-pages are available for selection in this field

`Chat agents menu location.`

Dynamic customer and case data retrieval

ToothFairyAI chats are 100% dynamic and can be used to retrieve customer and case data based on the customer and case id provided by the user. This is done by connecting the agent to an API function and/or a DB function that is marked with scope as Customer retrieval and/or Case retrieval.

  • Customer id: When the agent is connected to an API function and/or a DB function that is marked with scope as Customer retrieval this field will be used by the agent to retrieve the customer's data. This field is optional and can be left blank. If left blank, the agent will not be able to retrieve customer data.
  • Case id: When the agent is connected to an API function and/or a DB function that is marked with scope as Case retrieval this field will be used by the agent to retrieve the case's data. This field is optional and can be left blank. If left blank, the agent will not be able to retrieve case data.

When instead the agent is connected to an API function and/or a DB function that is marked with scope as Customer authentication and/or Case authentication the agent will attempt to identify the customer and case id from the input provided by the user. This is not recommended for agents available externally to the platform, as it may lead to security issues.

Chat channels

Users can interact with the ToothFairyAI chat agents through the following channels:

  • Web: The chat agent is available through the web interface via the App and Web-widget (if enabled).
  • SMS: The agent can be connected to a phone number and users can interact with the agent via SMS.
  • WhatsApp: The agent can be connected to a phone number and users can interact with the agent via WhatsApp.
  • Email: The agent can be connected to an email address and users can interact with the agent via email.

When any of these channels are enabled, ToothFairyAI will allow the user to select which channel should be used by the agent to communicate with the user, the New Chat and Edit Chat window will display the following fields:

  • Select channel: This is the default option and allows the user to select which channel should be used by the agent to communicate with the user. If the user wants no communication via any 3rd party channel or wants to stop the messages via an existing channel, the user can select None and the agent will stop communicating with the user via that channel.
  • Select provider: Based on the channel selected the user can select which provider should be used by the agent to communicate with the user. For example, if the channel is SMS, the user can select a Twilio based channel.
  • Recipient phone number or email : Depending on the channel selected, the user can provide a phone number or an email address to which the agent should communicate with the user.

ToothFairyAI manages the state of the conversation always in the app itself, therefore all messages will be stored and generated both in the app and in the channel selected by the user. This allows the user to switch between channels without losing the context of the conversation.

info

The phone number and/or email the agent is sending messages from is configured under the Agent channels under the Settings/Agent configuration.

danger

It is up to the user to ensure that the phone number and/or email address provided is valid and that the user has consented to receive messages from the agent. It is also important to note that if multiple chats are created with the same phone number and/or email address, the messages will be sent to the same user and this can lead to unpredictable results.

Additionally, ToothFairyAI allows you to start a chat with a specific agent by clicking the chat icon next to the agent's name in the chats list on the left hand side.

More about Chat with agents

After creaing a new chat, the title, if provided, in the modal will apear within directory panel. The directory of where the chat is located is within the name of the agent selected in the modal. New chats associated with an agent will appear in its directory. ToothFairyAI loads only the last chats created. In case you want to retrieve older chats, you can use the Load more button to load more chats. Chats are grouped by date and agent types can be easily identified by the icon next to the agent name.

Global quick actions

The chat window allows the user to perform quick actions such as:

  • Upload docs: When clicked, the user is redirected to the Knowledge Hub to upload documents.
  • New chat: When clicked, the New Chat modal opens up to start a new chat.

Agents quick actions

Agents have quick actions that can be performed on them. The quick actions are:

  • Edit agent: When clicked, the user is redirected to the Agents page to edit the agent configuration.
  • Start chat: When clicked, the user is immediately presented with the chat window to start a conversation with the agent.

Filters

In the chat window, there is an option to filter topics for the agents. By default, all topics assigned to the agent are accessible; however, selecting specific topics ensures that the agent only retrieves knowledge from those selected topics.

When a question is posed to the agent, all the documentation within the assigned topics is used to generate an answer. Filtering the topic will reduce the referenced documentation and alter the agent's response. The filter cannot be changed while the agent is generating an answer.

Chats list

The chat list is automatically sorted by the most recent chat created. It is split into two sections:

  • From app: This section shows all the chats created from the ToothFairyAI application excluding the widget chats.
  • From widget: This section shows all the chats created from the any agent widgets associated with the workspace.

The user can quickly switch between the two sections by clicking on the From app or From widget buttons at the top of the chat list above the filter input.

danger

Widget chats are only available for Pro and Enterprise plans.

Chat window

The chat window is where the user can interact with the agent. The user can ask questions and the agent will respond streaming the answer in real-time. All ToothFairyAI agents can receive only up to 30000 characters in a single message in the chat window. Depending on the agent's settings, the agent will provide metadata about the answer. The metadata provides additional insights to the user about the answer.

Specifically, the metadata provides the following information:

  • References: The documents used to generate the answer.
  • Duration: The time it took for the agent to generate the answer.
  • Detected language: The language the agent used to generate the answer (if the multi-language feature is enabled for the agent)

In case in-depth information is required, the user can click on the Show details button to expand on the sources of information used by the agent to generate the answer.

In detail, the expanded view called Data sources and functions provides the following information:

  • Documentation: It shows the specific passages of the documents used by the agent to generate the answer. The passages show the title of the document and the confidence score of the agent in the answer.
  • API Functions: It shows the AI functions used by the agent to generate the answer. The functions show the name of the function and exact data retrieved from the function whether it is an API call.
  • DB Functions: It shows the AI functions used by the agent to generate the answer. The functions show the name of the function and exact data retrieved from the function whether it is a database query.
  • Chat Functions: If a chat function is used by the agent to generate the answer, it will show the name of the function and the exact command used by the agent.
  • HTML Functions: If an HTML function is used by the agent to generate the answer, it will show the name of the function and the exact html page used by the agent.

Finally, the user can click on the Clipboard button to copy any message to the clipboard.

Feedback management

The user can provide feedback to the agent by clicking on the Thumbs up or Thumbs down icons. The feedback is sent to the workspace administrators to improve the agent's performance. The user has the opportunity to provide additional feedback filling in the following fields:

  • Main feedback type
  • Sub feedback type
  • Free text to provide additional information
tip

Feedback type and sub-type are automatically populated based on the answer provided by the agent.

info

Feedback cannot be provided in public chats however, workspace users can manipulate and integrate the feedback in the chats from widget section.

Files upload

The user can upload images, audio and video and files to the chat window. When any of the available files are uploaded to the chat and the agent will provide a response based on the content uploaded.

The analysis of images, audio and video files is performed by the agent to extract relevant information prior to generating an answer with an explicit step to analyse the file.

The functionality is only available for Casual and Planner agents that have the upload feature enabled in the agent settings for each of the media types. The files upload feature is also available for Coder agents with code execution enabled.

Only one image, video and audio (e.g. maximum 1 image, 1 audio and 1 video) file can be uploaded at each turn.

The limitation does not apply to files instead that can be uploaded in bulk up to 5 files at each turn with a maximum size allowed of 4.5MB each - this applies to Casual , Coder and Planner agents.

Image types supported

  • PNG
  • JPG (Coming soon)
  • JPEG (Coming soon)

Audio types supported

  • WAV
  • MP4
  • MP3 (Coming soon)

Video types supported

  • MP4

File types supported

  • PDF
  • DOCX
  • DOC
  • TXT
  • CSV
  • XLSX
  • XLS
  • MD
  • HTML

Additional files for Coder agents

These files are only available for Coder agents with code upload enabled.
Programming LanguageFile Extension
Python.py
JavaScript.js
Java.java
C++.cpp
C.c
Go.go
C#.cs
PHP.php
Ruby.rb
Swift.swift
TypeScript.ts
Rust.rs
Kotlin.kt
Scala.scala
Objective-C.m
R.r
Perl.pl
Shell.sh
SQL.sql
Visual Basic.vb
Lua.lua
Dart.dart
Groovy.groovy
Julia.jl
Haskell.hs
Fortran.f90
Pascal.pas
Elm.elm
Clojure.clj