Skip to main content
FieldValue
Package@cometchat/chat-uikit-react-native
Key componentsCometChatMessageHeader, CometChatMessageList, CometChatMessageComposer, CometChatAIAssistantChatHistory
Required setupCometChatUIKit.init(UIKitSettings) then CometChatUIKit.login("UID")
PurposeEnable intelligent conversational AI capabilities with AI Agent integration
Sample appGitHub
RelatedMessage List · Message Composer · All Guides
Enable intelligent conversational AI capabilities in your React Native app using CometChat UIKit v5 with AI Agent integration:
  • AI Assistant Chat History
  • Chat History Management
  • Contextual Responses
  • Agent Detection
  • Seamless Handoffs
Transform your chat experience with AI-powered assistance that provides intelligent responses and offers seamless integration with your existing chat infrastructure.
1:1 and group conversations. AI Agents work in both one-on-one and group conversations. In a 1:1 chat, the end user talks directly with the agent user. In a group, the agent participates as a member — its messages (including cards) are rendered and attributed like any other member’s message.

Overview

Users can interact with AI agents through a dedicated chat interface that:
  • Provides intelligent responses based on conversation context.
  • Maintains chat history for continuity.
  • Seamlessly integrates with your existing user chat system.
The AI Agent chat interface provides a familiar messaging experience enhanced with AI capabilities, accessible through your main chat flow or as a standalone feature.

Prerequisites

  • React Native project with @cometchat/chat-uikit-react-native and @cometchat/chat-sdk-react-native installed.
  • Valid CometChat App ID, Region, and Auth Key configured via CometChatUIKit.init().
  • User logged in with CometChatUIKit.login().
  • AI Agent configured in your CometChat dashboard.

Components

Component / ClassRole
AIAssistantChatScreenMain screen for AI agent chat.
CometChatAIAssistantChatHistoryDisplays previous AI conversation history.
CometChatMessageListShows AI messages with threading support.
CometChatMessageComposerInput interface for AI conversations.
CometChatMessageHeaderHeader with AI agent info and controls.

Integration Steps

Step 1 - Screen Setup

Create the AI Assistant chat screen with proper navigation and component configuration.

Step 2 - Navigation Setup

Configure React Navigation to handle AI Assistant chat screens.

Step 3 - Theme Customization

Define custom themes for the message list and composer to differentiate AI agent chats.

Step 4 - AI Assistant Tools Configuration

Configure AI Assistant tools and suggested messages for an enhanced user experience.

Step 5 - Create AI Assistant Chat History Screen

Create a screen to host the CometChatAIAssistantChatHistory component and handle its interactions.

Step 6 - Launching AI Chat

Create navigation functions to launch AI Assistant chat from your main application.

Implementation Flow Summary

StepAction
1User selects AI agent from chat list
2AIAssistantChatScreen navigates and renders
3Parse route params and detect agent chat (Role of user must be “@agentic”)
4Initialize UI with AI-specific theming
5Configure chat history and navigation handlers
6Launch chat with AI agent

Customization Options

  • Custom AI Assistant Empty Chat View: Customize the empty state view using emptyChatGreetingView prop.
  • Streaming Speed: Adjust AI response streaming speed via streamingSpeed prop.
  • AI Assistant Suggested Messages: Create custom list of suggested messages using aiAssistantSuggestedMessages prop.
  • AI Assistant Tools: Set tools for the AI agent using aiAssistantTools prop.

Feature Matrix

FeatureImplementationUI Component
AI Chat InterfaceAIAssistantChatScreenFull chat screen
Chat HistoryCometChatAIAssistantChatHistoryChat history screen

React Native AI Sample

Explore this feature in the CometChat React Native Sample: GitHub → React Native Sample

React Native UI Kit

Learn more about React Native UI Kit components: GitHub → React Native UIKit

Next Steps

Message List

Display and manage messages in a conversation

Message Composer

Compose and send messages with rich input options

All Guides

Browse all feature and formatter guides

Components Overview

Explore all available components