AI Integration Quick Reference
AI Integration Quick Reference
- SwiftUI
- UIKit
Conversation Starter
When a user opens a chat with no messages yet, the list suggests opening lines powered by CometChat’s AI. A tap puts the line in the composer, ready to edit and send. See Conversation Starter to enable it for your app.Smart Replies
Smart Replies are AI-suggested answers to the last incoming text message. They appear above the composer a moment after the message arrives — 10 seconds by default — and a tap puts the reply in the composer. See Smart Replies to enable it for your app.
smartRepliesKeywords limits them to messages that contain one of your keywords, and
smartRepliesDelayDuration sets the delay in milliseconds.
Conversation Summary
The Conversation Summary condenses a long stretch of unread messages so a user can catch up quickly. The list shows it at the top when a chat opens with more unread messages than its threshold — 30 by default,unreadMessageThreshold. The list asks for it only when it opens at the first unread message
(startFromUnreadMessages, off by default), so on UIKit, where enableConversationSummary is on by default,
a list left at its defaults never calls the AI. If the summary is not enabled for your app, the panel shows its
error state instead.
See Conversation Summary to enable it for your app.
AI Agent Chats
A user whose role is@agentic is an AI agent, and a chat with one changes shape — with no code:
- the empty chat shows the agent’s greeting, introduction and suggested messages; a tap on a suggestion puts it in the composer;
- the agent’s reply streams in — a thinking indicator, then text as it arrives, then the finished reply rendered as markdown and cards;
- the header says “AI Assistant” under the agent’s name;
- there is no long-press menu, no swipe to reply and no reactions.

An agent's greeting

The composer in an agent chat
There is no AI action sheet in the composer. The UIKit composer’s AI button is hidden by default
(
hideAIButton), and a tap on it only calls your onAIClick; the SwiftUI composer never shows one.Next Steps
Message List
Every AI panel’s style and view slot
AI Agent Guide
Build a chat with an AI agent
Core Features
Chat features included out of the box
Extensions
Stickers, polls, collaborative tools and more