Skip to main content
Since AI Agent is connected to a QuickBlox user, you can interact with it just like you would with a regular user. You have the option to create private or group dialogs with the AI Agent.
AI Agent is not available in Public Dialogs.

Create a private dialog with AI Agent

The easiest way to interact with the AI Agent is to create a private (1-to-1) dialog — the AI Agent will answer any message you send.

iOS

To create a private (1-to-1) dialog, you need to set the dialog type field to private and provide the ID of the opponent you want to create a chat with.

Android

To create a private (1-to-1) dialog, you need to set the dialog type to QBDialogType.PRIVATE and provide the ID of the opponent you want to create a chat with.

JavaScript

To create a private (1-to-1) dialog, you need to set the dialog type to 3 and provide the ID of the opponent you want to create a chat with.

ReactNative

To create a private (1-to-1) dialog, you need to set the type to QB.chat.DIALOG_TYPE.CHAT and provide the ID of the opponent you want to create a chat with.

Flutter

To create a private (1-to-1) dialog, you need to set the type to QBChatDialogTypes.CHAT and provide the ID of the opponent you want to create a chat with.

Create a group dialog with AI Agent

Your users can also interact with the AI Agent in group dialogs.

iOS

To create a group dialog for a predefined number of occupants, you need to set the dialog type field to group and provide the IDs of the opponents you want to create a chat with.

Android

To create a group dialog for a predefined number of occupants, you need to set the dialog type to QBDialogType.GROUP and provide the IDs of the opponents you want to create a chat with.

JavaScript

To create a group dialog for a predefined number of occupants, you need to set the dialog type to 2 and provide the IDs of the opponents you want to create a chat with.

ReactNative

To create a group dialog for a predefined number of occupants, you need to set the dialog type to QB.chat.DIALOG_TYPE.GROUP_CHAT and provide the IDs of the opponents you want to create a chat with.

Flutter

To create a group dialog for a predefined number of occupants, you need to set the dialog type to QBChatDialogTypes.GROUP_CHAT and provide the IDs of the opponents you want to create a chat with.

Send message to AI Agent in a group dialog with command

To be able to interact with an AI Agent in a group dialog the following conditions must be met:
  • Enable AI Agent for group dialogs on the dashboard.
  • Define the command for the AI Agent on the dashboard.
  • The AI Agent must be added to the group dialog and be present in the occupant_ids.
  • Your message must begin with a command.
For example, if you defined your AI Agent command as “SuperHelpfulAssistant”, your message may look like: /SuperHelpfulAssistant Help me with something

Send message to AI Agent in a group dialog with mentions

To be able to interact with an AI Agent in a group dialog via mentions, the following conditions must be met:
  • Enable AI Agent for group dialogs on the dashboard.
  • The AI Agent must be added to the group dialog and be present in the occupant_ids.
  • The message must contain the AI Agent’s user ID in the mentioned_user_ids custom field.
If you want to mention several users, you must enumerate them joined by a comma (,).Example:“34,45,55”

iOS

Android

JavaScript

ReactNative

Flutter