Enable intelligent conversational AI capabilities in your React Native app using CometChat UIKit v5 with AI Agent integration:Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-release-ios-chat-uikit-v5-1-2.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- AI Assistant Chat History
- Chat History Management
- Contextual Responses
- Agent Detection
- Seamless Handoffs
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.

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 / Class | Role |
|---|---|
AIAssistantChatScreen | Main screen for AI agent chat. |
CometChatAIAssistantChatHistory | Displays previous AI conversation history. |
CometChatMessageList | Shows AI messages with threading support. |
CometChatMessageComposer | Input interface for AI conversations. |
CometChatMessageHeader | Header 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 enhanced user experience.Step 5 - Create AI Assistant Chat History Screen
Create a screen to hostCometChatAIAssistantChatHistory 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
| Step | Action |
|---|---|
| 1 | User selects AI agent from chat list |
| 2 | AIAssistantChatScreen navigates and renders |
| 3 | Parse route params and detect agent chat (Role of user must be “@agentic”) |
| 4 | Initialize UI with AI-specific theming |
| 5 | Configure chat history and navigation handlers |
| 6 | Launch chat with AI agent |
Customization Options
- Custom AI Assistant Empty Chat View: Customize the empty state view using
emptyChatGreetingViewprop. - Streaming Speed: Adjust AI response streaming speed via
streamingSpeedprop. - AI Assistant Suggested Messages: Create custom list of suggested messages using
aiAssistantSuggestedMessagesprop. - AI Assistant Tools: Set tools for the AI agent using
aiAssistantToolsprop.
Feature Matrix
| Feature | Implementation | UI Component |
|---|---|---|
| AI Chat Interface | AIAssistantChatScreen | Full chat screen |
| Chat History | CometChatAIAssistantChatHistory | Chat 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