Skip to main content
Integrate AI agents into your iOS app to provide intelligent conversational experiences with chat history, contextual responses, and seamless handoffs.
1:1 conversations only. AI Agents currently respond only in one-on-one conversations between an end user and the agent user. They do not respond to messages sent in groups, even if the agent user is added as a member or owner. Group support is on the roadmap — share your use case on feedback.cometchat.com.

Prerequisites

Before implementing AI agents, ensure you have:

Overview

The AI Agent integration provides:
  • Intelligent Responses - Context-aware AI conversations
  • Chat History - Browse and resume previous AI sessions
  • Streaming Responses - Real-time message streaming
  • Custom Styling - Match your app’s design
  • Suggested Messages - Quick-start prompts for users

Basic Implementation

Create a simple AI chat screen:

Production Implementation

Complete AI agent chat with history, navigation, and error handling:

Launching AI Agent Chat

Start an AI agent conversation from your app:

Styling

By default, all mobile UI Kits inherit font size from the operating system’s accessibility settings. However, on iOS, developers have the option to override this behavior and set custom font sizes programmatically using the textFont property on style objects or by configuring CometChatTypography globally.
Customize the AI chat bubble appearance:

Style Properties

Customization Options

Empty State View

Customize the view shown when there are no messages:

Streaming Speed

Adjust how fast AI responses stream:

Suggested Messages

Provide quick-start prompts for users:

AI Assistant Tools

Configure custom tools for the AI agent:

Chat History Component

The CometChatAIAssistanceChatHistory component displays previous AI conversations:

Implementation Flow

Components Reference

AI Features

Overview of all AI-powered features

AI Chat History

Browse and resume AI conversations

Message List

Display and customize chat messages