Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion ai-chatbots/custom-agents.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, custom agents are unique users capable of autonomously sending and

Users can interact with agents through private one-on-one conversations or within group chats. When an agent receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom agent** lets you bring your own backend and AI logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the agent
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (agent's reply)
CometChat->>User: Delivers the agent's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the agent are completely in your hands. A

### Responding as an agent

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your agent's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the agent's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Bots" icon="robot" href="/ai-chatbots/custom-bots">
Configure a custom bot the same way as a custom agent.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the agent's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the agent.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
41 changes: 40 additions & 1 deletion ai-chatbots/custom-bots.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, Custom bots are unique users capable of autonomously sending and r

Users can interact with bots through private one-on-one conversations or within group chats. When a bot receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom bot** lets you bring your own backend and logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the bot
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (bot's reply)
CometChat->>User: Delivers the bot's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the bot are completely in your hands. All

### Responding as a bot

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the bot's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Agents" icon="robot" href="/ai-chatbots/custom-agents">
Configure a custom agent the same way as a custom bot.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the bot's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the bot.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
43 changes: 31 additions & 12 deletions articles/docker.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,22 +3,32 @@ title: "Docker"
description: "Docker — CometChat documentation."
---

It is suggested to be familiar with the various kinds of roles for the on-premise deployment.
This guide describes how to deploy CometChat on-premise as a **Docker Swarm** cluster. The deployment spans several machines, each running a specific role (master, storage, calling, websocket, worker nodes, and extensions). Before you begin, it is suggested to be familiar with these roles.

<Note>
On-premise deployment relies on artifacts and an On-Premise Token provided directly by CometChat (the bootstrap scripts and the `cometchatpro-onprem-dockerswarm` folder referenced below). If you do not have these yet, contact CometChat to start the on-premise process.
</Note>

## Prerequisites

- Machines provisioned to meet the hardware requirements in the table below, with network connectivity between them.
- Docker with Docker Compose installed on every machine (see step 3).
- The on-premise package and On-Premise Token shared by CometChat (see steps 4 and 5).

## 1. Hardware required for Docker Swarm

Below is the list of hardware required that you will need to provision.
Below is the list of machines you will need to provision. Each row is a **role** in the Swarm cluster; the *Requires Public IP* and *Open Public Ports* columns indicate which machines must be reachable from the internet.

| Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | VM | Open Public Ports |
| ----------- | ----------- | --------------- | ------------------ | --- | ----------------------------------------- |
| master | 8 core | 32GB | 250GB| Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB| No | |
| storage2 | 8 core | 32GB | 250GB| No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |
| Role / Machine | Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | Open Public Ports |
| -------------- | ----------- | ----------- | --------------- | ------------------ | ----------------------------------------- |
| master | 8 core | 32GB | 250GB | Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB | No | |
| storage2 | 8 core | 32GB | 250GB | No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |

## 2. Once the hardware and public IP's are ready

Expand DownExpand Up@@ -89,3 +99,12 @@ cd cometchatpro-onprem-dockerswarm-1.0.0
#on extensions
._extensions_bootstrap.sh
```

<Note>
Run the bootstrap script that matches each machine's role, using the exact script names included in the on-premise package shared by CometChat. If a script name in the package differs from what is shown here, follow the package. Once every machine is bootstrapped, return to the **master** node to complete the final bootstrap step with CometChat.
</Note>

## Related

- [Properties and Constraints](/articles/properties-and-constraints)
- [Rate Limits](/articles/rate-limits)
27 changes: 26 additions & 1 deletion chat-builder/android/builder-customisations.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,13 @@ The Android UI Kit Builder uses two main files for customization:
| `BuilderSettingsHelper.kt` | Utility class that applies settings to UI components | Component-level customizations |

<Info>
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin. For changes that should survive a rebuild, edit `cometchat-builder-settings.json` (feature toggles) or `themes.xml` (styling) instead.
</Info>

<Note>
The two files above cover Builder-level customization. Because the Builder sits on top of the standard [CometChat Android UI Kit](/ui-kit/android/getting-started), you can go further using the UI Kit's own customization layers — **Message Templates**, **View Slots**, and **DataSource decorators**. See [Beyond Builder Settings](#beyond-builder-settings-deeper-ui-kit-customization) below.
</Note>

---

## Using BuilderSettingsHelper
Expand DownExpand Up@@ -379,6 +383,27 @@ You can customize individual component styles by overriding their style attribut

---

## Beyond Builder Settings: Deeper UI Kit Customization

`BuilderSettingsHelper` and `themes.xml` cover feature toggles and broad styling. When you need to change the *structure* or *behavior* of a component — not just whether a feature is on — use the standard UI Kit customization layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.

| Layer | Use it when you want to… | Reference |
| ----- | ------------------------ | --------- |
| **Message Templates** | Change a message bubble's structure, content/header/reply views, or bubble interactions | [Message Template](/ui-kit/android/message-template) |
| **View Slots** | Replace a specific region of a list item — avatar, title, subtitle, trailing section, or the entire row | [View Slots](/ui-kit/android/customization-view-slots) |
| **DataSource & ChatConfigurator** | Globally override how messages render, which options appear on bubbles, and which attachment actions appear in the composer | [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) |
| **Style classes & attributes** | Override individual component style attributes beyond the brand color and font themes | [Component Styling](/ui-kit/android/component-styling) |

<Tip>
Read the [Customization Overview](/ui-kit/android/customization-overview) first. It explains the View + ViewModel + Adapter architecture that all of these layers build on.
</Tip>

<Note>
These layers belong to the underlying UI Kit, not the Builder plugin. Apply them in the same Activity/Fragment where you call `BuilderSettingsHelper`, after the component is inflated. Call order generally does not matter for visibility flags, but if a template or slot and a Builder setting target the same region, the more specific UI Kit customization wins. Verify the exact precedence for your case against the linked reference pages.
</Note>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions chat-builder/android/builder-dir-structure.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -178,6 +178,10 @@ Drawable resources including icons, shapes, and backgrounds.
Prefer using `CometChatBuilderSettings.kt` for feature toggles and `themes.xml` for styling. For extensive changes, extend existing components instead of modifying core files directly.
</Note>

<Note>
`CometChatBuilderSettings.kt` is regenerated from `cometchat-builder-settings.json` on every Gradle build, so edits there are not preserved across rebuilds. Keep feature changes in the JSON and visual changes in `themes.xml`. For structural changes to components (custom bubbles, list-item regions, global message overrides), use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers rather than editing generated files.
</Note>

---

## Next Steps
Expand Down
18 changes: 17 additions & 1 deletion chat-builder/android/builder-settings.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,13 @@ description: "Configure Android UI Kit Builder settings for messaging, AI helper
The `CometChatBuilderSettings` object controls everything the Android UI Kit Builder renders—messaging, AI helpers, calls, layout, theming, and more. This object is auto-generated by the UI Kit Builder Settings Gradle plugin from your `cometchat-builder-settings.json` configuration file.

<Info>
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup.
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup, and [Customizations](/chat-builder/android/builder-customisations) for how the generated constants are applied to components via `BuilderSettingsHelper`.
</Info>

<Note>
These settings control feature toggles, layout, and broad styling. For structural or behavioral customization beyond what the JSON exposes — custom bubbles, list-item regions, or global message overrides — use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.
</Note>

## Top-level Structure

The generated `CometChatBuilderSettings` object in Kotlin follows this structure:
Expand DownExpand Up@@ -401,4 +405,16 @@ Some features require additional configuration in the [CometChat Dashboard](http
>
Modify component props, styling, and behavior for deeper customization.
</Card>
<Card
title="Theming"
href="/ui-kit/android/theme-introduction"
>
Go beyond brand color and font with full colors, typography, and style attributes.
</Card>
<Card
title="Customization Overview"
href="/ui-kit/android/customization-overview"
>
Learn the UI Kit architecture and all deeper customization entry points.
</Card>
</CardGroup>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion ai-chatbots/custom-agents.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, custom agents are unique users capable of autonomously sending and

Users can interact with agents through private one-on-one conversations or within group chats. When an agent receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom agent** lets you bring your own backend and AI logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the agent
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (agent's reply)
CometChat->>User: Delivers the agent's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the agent are completely in your hands. A

### Responding as an agent

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your agent's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the agent's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Bots" icon="robot" href="/ai-chatbots/custom-bots">
Configure a custom bot the same way as a custom agent.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the agent's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the agent.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
41 changes: 40 additions & 1 deletion ai-chatbots/custom-bots.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, Custom bots are unique users capable of autonomously sending and r

Users can interact with bots through private one-on-one conversations or within group chats. When a bot receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom bot** lets you bring your own backend and logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the bot
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (bot's reply)
CometChat->>User: Delivers the bot's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the bot are completely in your hands. All

### Responding as a bot

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the bot's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Agents" icon="robot" href="/ai-chatbots/custom-agents">
Configure a custom agent the same way as a custom bot.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the bot's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the bot.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
43 changes: 31 additions & 12 deletions articles/docker.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,22 +3,32 @@ title: "Docker"
description: "Docker — CometChat documentation."
---

It is suggested to be familiar with the various kinds of roles for the on-premise deployment.
This guide describes how to deploy CometChat on-premise as a **Docker Swarm** cluster. The deployment spans several machines, each running a specific role (master, storage, calling, websocket, worker nodes, and extensions). Before you begin, it is suggested to be familiar with these roles.

<Note>
On-premise deployment relies on artifacts and an On-Premise Token provided directly by CometChat (the bootstrap scripts and the `cometchatpro-onprem-dockerswarm` folder referenced below). If you do not have these yet, contact CometChat to start the on-premise process.
</Note>

## Prerequisites

- Machines provisioned to meet the hardware requirements in the table below, with network connectivity between them.
- Docker with Docker Compose installed on every machine (see step 3).
- The on-premise package and On-Premise Token shared by CometChat (see steps 4 and 5).

## 1. Hardware required for Docker Swarm

Below is the list of hardware required that you will need to provision.
Below is the list of machines you will need to provision. Each row is a **role** in the Swarm cluster; the *Requires Public IP* and *Open Public Ports* columns indicate which machines must be reachable from the internet.

| Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | VM | Open Public Ports |
| ----------- | ----------- | --------------- | ------------------ | --- | ----------------------------------------- |
| master | 8 core | 32GB | 250GB| Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB| No | |
| storage2 | 8 core | 32GB | 250GB| No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |
| Role / Machine | Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | Open Public Ports |
| -------------- | ----------- | ----------- | --------------- | ------------------ | ----------------------------------------- |
| master | 8 core | 32GB | 250GB | Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB | No | |
| storage2 | 8 core | 32GB | 250GB | No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |

## 2. Once the hardware and public IP's are ready

Expand DownExpand Up@@ -89,3 +99,12 @@ cd cometchatpro-onprem-dockerswarm-1.0.0
#on extensions
._extensions_bootstrap.sh
```

<Note>
Run the bootstrap script that matches each machine's role, using the exact script names included in the on-premise package shared by CometChat. If a script name in the package differs from what is shown here, follow the package. Once every machine is bootstrapped, return to the **master** node to complete the final bootstrap step with CometChat.
</Note>

## Related

- [Properties and Constraints](/articles/properties-and-constraints)
- [Rate Limits](/articles/rate-limits)
27 changes: 26 additions & 1 deletion chat-builder/android/builder-customisations.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,13 @@ The Android UI Kit Builder uses two main files for customization:
| `BuilderSettingsHelper.kt` | Utility class that applies settings to UI components | Component-level customizations |

<Info>
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin. For changes that should survive a rebuild, edit `cometchat-builder-settings.json` (feature toggles) or `themes.xml` (styling) instead.
</Info>

<Note>
The two files above cover Builder-level customization. Because the Builder sits on top of the standard [CometChat Android UI Kit](/ui-kit/android/getting-started), you can go further using the UI Kit's own customization layers — **Message Templates**, **View Slots**, and **DataSource decorators**. See [Beyond Builder Settings](#beyond-builder-settings-deeper-ui-kit-customization) below.
</Note>

---

## Using BuilderSettingsHelper
Expand DownExpand Up@@ -379,6 +383,27 @@ You can customize individual component styles by overriding their style attribut

---

## Beyond Builder Settings: Deeper UI Kit Customization

`BuilderSettingsHelper` and `themes.xml` cover feature toggles and broad styling. When you need to change the *structure* or *behavior* of a component — not just whether a feature is on — use the standard UI Kit customization layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.

| Layer | Use it when you want to… | Reference |
| ----- | ------------------------ | --------- |
| **Message Templates** | Change a message bubble's structure, content/header/reply views, or bubble interactions | [Message Template](/ui-kit/android/message-template) |
| **View Slots** | Replace a specific region of a list item — avatar, title, subtitle, trailing section, or the entire row | [View Slots](/ui-kit/android/customization-view-slots) |
| **DataSource & ChatConfigurator** | Globally override how messages render, which options appear on bubbles, and which attachment actions appear in the composer | [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) |
| **Style classes & attributes** | Override individual component style attributes beyond the brand color and font themes | [Component Styling](/ui-kit/android/component-styling) |

<Tip>
Read the [Customization Overview](/ui-kit/android/customization-overview) first. It explains the View + ViewModel + Adapter architecture that all of these layers build on.
</Tip>

<Note>
These layers belong to the underlying UI Kit, not the Builder plugin. Apply them in the same Activity/Fragment where you call `BuilderSettingsHelper`, after the component is inflated. Call order generally does not matter for visibility flags, but if a template or slot and a Builder setting target the same region, the more specific UI Kit customization wins. Verify the exact precedence for your case against the linked reference pages.
</Note>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions chat-builder/android/builder-dir-structure.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -178,6 +178,10 @@ Drawable resources including icons, shapes, and backgrounds.
Prefer using `CometChatBuilderSettings.kt` for feature toggles and `themes.xml` for styling. For extensive changes, extend existing components instead of modifying core files directly.
</Note>

<Note>
`CometChatBuilderSettings.kt` is regenerated from `cometchat-builder-settings.json` on every Gradle build, so edits there are not preserved across rebuilds. Keep feature changes in the JSON and visual changes in `themes.xml`. For structural changes to components (custom bubbles, list-item regions, global message overrides), use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers rather than editing generated files.
</Note>

---

## Next Steps
Expand Down
18 changes: 17 additions & 1 deletion chat-builder/android/builder-settings.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,13 @@ description: "Configure Android UI Kit Builder settings for messaging, AI helper
The `CometChatBuilderSettings` object controls everything the Android UI Kit Builder renders—messaging, AI helpers, calls, layout, theming, and more. This object is auto-generated by the UI Kit Builder Settings Gradle plugin from your `cometchat-builder-settings.json` configuration file.

<Info>
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup.
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup, and [Customizations](/chat-builder/android/builder-customisations) for how the generated constants are applied to components via `BuilderSettingsHelper`.
</Info>

<Note>
These settings control feature toggles, layout, and broad styling. For structural or behavioral customization beyond what the JSON exposes — custom bubbles, list-item regions, or global message overrides — use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.
</Note>

## Top-level Structure

The generated `CometChatBuilderSettings` object in Kotlin follows this structure:
Expand DownExpand Up@@ -401,4 +405,16 @@ Some features require additional configuration in the [CometChat Dashboard](http
>
Modify component props, styling, and behavior for deeper customization.
</Card>
<Card
title="Theming"
href="/ui-kit/android/theme-introduction"
>
Go beyond brand color and font with full colors, typography, and style attributes.
</Card>
<Card
title="Customization Overview"
href="/ui-kit/android/customization-overview"
>
Learn the UI Kit architecture and all deeper customization entry points.
</Card>
</CardGroup>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion ai-chatbots/custom-agents.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, custom agents are unique users capable of autonomously sending and

Users can interact with agents through private one-on-one conversations or within group chats. When an agent receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom agent** lets you bring your own backend and AI logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the agent
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (agent's reply)
CometChat->>User: Delivers the agent's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the agent are completely in your hands. A

### Responding as an agent

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your agent's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the agent's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Bots" icon="robot" href="/ai-chatbots/custom-bots">
Configure a custom bot the same way as a custom agent.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the agent's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the agent.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
41 changes: 40 additions & 1 deletion ai-chatbots/custom-bots.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, Custom bots are unique users capable of autonomously sending and r

Users can interact with bots through private one-on-one conversations or within group chats. When a bot receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom bot** lets you bring your own backend and logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the bot
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (bot's reply)
CometChat->>User: Delivers the bot's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the bot are completely in your hands. All

### Responding as a bot

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the bot's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Agents" icon="robot" href="/ai-chatbots/custom-agents">
Configure a custom agent the same way as a custom bot.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the bot's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the bot.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
43 changes: 31 additions & 12 deletions articles/docker.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,22 +3,32 @@ title: "Docker"
description: "Docker — CometChat documentation."
---

It is suggested to be familiar with the various kinds of roles for the on-premise deployment.
This guide describes how to deploy CometChat on-premise as a **Docker Swarm** cluster. The deployment spans several machines, each running a specific role (master, storage, calling, websocket, worker nodes, and extensions). Before you begin, it is suggested to be familiar with these roles.

<Note>
On-premise deployment relies on artifacts and an On-Premise Token provided directly by CometChat (the bootstrap scripts and the `cometchatpro-onprem-dockerswarm` folder referenced below). If you do not have these yet, contact CometChat to start the on-premise process.
</Note>

## Prerequisites

- Machines provisioned to meet the hardware requirements in the table below, with network connectivity between them.
- Docker with Docker Compose installed on every machine (see step 3).
- The on-premise package and On-Premise Token shared by CometChat (see steps 4 and 5).

## 1. Hardware required for Docker Swarm

Below is the list of hardware required that you will need to provision.
Below is the list of machines you will need to provision. Each row is a **role** in the Swarm cluster; the *Requires Public IP* and *Open Public Ports* columns indicate which machines must be reachable from the internet.

| Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | VM | Open Public Ports |
| ----------- | ----------- | --------------- | ------------------ | --- | ----------------------------------------- |
| master | 8 core | 32GB | 250GB| Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB| No | |
| storage2 | 8 core | 32GB | 250GB| No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |
| Role / Machine | Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | Open Public Ports |
| -------------- | ----------- | ----------- | --------------- | ------------------ | ----------------------------------------- |
| master | 8 core | 32GB | 250GB | Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB | No | |
| storage2 | 8 core | 32GB | 250GB | No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |

## 2. Once the hardware and public IP's are ready

Expand DownExpand Up@@ -89,3 +99,12 @@ cd cometchatpro-onprem-dockerswarm-1.0.0
#on extensions
._extensions_bootstrap.sh
```

<Note>
Run the bootstrap script that matches each machine's role, using the exact script names included in the on-premise package shared by CometChat. If a script name in the package differs from what is shown here, follow the package. Once every machine is bootstrapped, return to the **master** node to complete the final bootstrap step with CometChat.
</Note>

## Related

- [Properties and Constraints](/articles/properties-and-constraints)
- [Rate Limits](/articles/rate-limits)
27 changes: 26 additions & 1 deletion chat-builder/android/builder-customisations.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,13 @@ The Android UI Kit Builder uses two main files for customization:
| `BuilderSettingsHelper.kt` | Utility class that applies settings to UI components | Component-level customizations |

<Info>
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin. For changes that should survive a rebuild, edit `cometchat-builder-settings.json` (feature toggles) or `themes.xml` (styling) instead.
</Info>

<Note>
The two files above cover Builder-level customization. Because the Builder sits on top of the standard [CometChat Android UI Kit](/ui-kit/android/getting-started), you can go further using the UI Kit's own customization layers — **Message Templates**, **View Slots**, and **DataSource decorators**. See [Beyond Builder Settings](#beyond-builder-settings-deeper-ui-kit-customization) below.
</Note>

---

## Using BuilderSettingsHelper
Expand DownExpand Up@@ -379,6 +383,27 @@ You can customize individual component styles by overriding their style attribut

---

## Beyond Builder Settings: Deeper UI Kit Customization

`BuilderSettingsHelper` and `themes.xml` cover feature toggles and broad styling. When you need to change the *structure* or *behavior* of a component — not just whether a feature is on — use the standard UI Kit customization layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.

| Layer | Use it when you want to… | Reference |
| ----- | ------------------------ | --------- |
| **Message Templates** | Change a message bubble's structure, content/header/reply views, or bubble interactions | [Message Template](/ui-kit/android/message-template) |
| **View Slots** | Replace a specific region of a list item — avatar, title, subtitle, trailing section, or the entire row | [View Slots](/ui-kit/android/customization-view-slots) |
| **DataSource & ChatConfigurator** | Globally override how messages render, which options appear on bubbles, and which attachment actions appear in the composer | [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) |
| **Style classes & attributes** | Override individual component style attributes beyond the brand color and font themes | [Component Styling](/ui-kit/android/component-styling) |

<Tip>
Read the [Customization Overview](/ui-kit/android/customization-overview) first. It explains the View + ViewModel + Adapter architecture that all of these layers build on.
</Tip>

<Note>
These layers belong to the underlying UI Kit, not the Builder plugin. Apply them in the same Activity/Fragment where you call `BuilderSettingsHelper`, after the component is inflated. Call order generally does not matter for visibility flags, but if a template or slot and a Builder setting target the same region, the more specific UI Kit customization wins. Verify the exact precedence for your case against the linked reference pages.
</Note>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions chat-builder/android/builder-dir-structure.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -178,6 +178,10 @@ Drawable resources including icons, shapes, and backgrounds.
Prefer using `CometChatBuilderSettings.kt` for feature toggles and `themes.xml` for styling. For extensive changes, extend existing components instead of modifying core files directly.
</Note>

<Note>
`CometChatBuilderSettings.kt` is regenerated from `cometchat-builder-settings.json` on every Gradle build, so edits there are not preserved across rebuilds. Keep feature changes in the JSON and visual changes in `themes.xml`. For structural changes to components (custom bubbles, list-item regions, global message overrides), use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers rather than editing generated files.
</Note>

---

## Next Steps
Expand Down
18 changes: 17 additions & 1 deletion chat-builder/android/builder-settings.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,13 @@ description: "Configure Android UI Kit Builder settings for messaging, AI helper
The `CometChatBuilderSettings` object controls everything the Android UI Kit Builder renders—messaging, AI helpers, calls, layout, theming, and more. This object is auto-generated by the UI Kit Builder Settings Gradle plugin from your `cometchat-builder-settings.json` configuration file.

<Info>
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup.
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup, and [Customizations](/chat-builder/android/builder-customisations) for how the generated constants are applied to components via `BuilderSettingsHelper`.
</Info>

<Note>
These settings control feature toggles, layout, and broad styling. For structural or behavioral customization beyond what the JSON exposes — custom bubbles, list-item regions, or global message overrides — use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.
</Note>

## Top-level Structure

The generated `CometChatBuilderSettings` object in Kotlin follows this structure:
Expand DownExpand Up@@ -401,4 +405,16 @@ Some features require additional configuration in the [CometChat Dashboard](http
>
Modify component props, styling, and behavior for deeper customization.
</Card>
<Card
title="Theming"
href="/ui-kit/android/theme-introduction"
>
Go beyond brand color and font with full colors, typography, and style attributes.
</Card>
<Card
title="Customization Overview"
href="/ui-kit/android/customization-overview"
>
Learn the UI Kit architecture and all deeper customization entry points.
</Card>
</CardGroup>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion ai-chatbots/custom-agents.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, custom agents are unique users capable of autonomously sending and

Users can interact with agents through private one-on-one conversations or within group chats. When an agent receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom agent** lets you bring your own backend and AI logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the agent
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (agent's reply)
CometChat->>User: Delivers the agent's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the agent are completely in your hands. A

### Responding as an agent

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your agent's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the agent's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Bots" icon="robot" href="/ai-chatbots/custom-bots">
Configure a custom bot the same way as a custom agent.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the agent's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the agent.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
41 changes: 40 additions & 1 deletion ai-chatbots/custom-bots.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, Custom bots are unique users capable of autonomously sending and r

Users can interact with bots through private one-on-one conversations or within group chats. When a bot receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom bot** lets you bring your own backend and logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the bot
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (bot's reply)
CometChat->>User: Delivers the bot's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the bot are completely in your hands. All

### Responding as a bot

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the bot's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Agents" icon="robot" href="/ai-chatbots/custom-agents">
Configure a custom agent the same way as a custom bot.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the bot's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the bot.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
43 changes: 31 additions & 12 deletions articles/docker.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,22 +3,32 @@ title: "Docker"
description: "Docker — CometChat documentation."
---

It is suggested to be familiar with the various kinds of roles for the on-premise deployment.
This guide describes how to deploy CometChat on-premise as a **Docker Swarm** cluster. The deployment spans several machines, each running a specific role (master, storage, calling, websocket, worker nodes, and extensions). Before you begin, it is suggested to be familiar with these roles.

<Note>
On-premise deployment relies on artifacts and an On-Premise Token provided directly by CometChat (the bootstrap scripts and the `cometchatpro-onprem-dockerswarm` folder referenced below). If you do not have these yet, contact CometChat to start the on-premise process.
</Note>

## Prerequisites

- Machines provisioned to meet the hardware requirements in the table below, with network connectivity between them.
- Docker with Docker Compose installed on every machine (see step 3).
- The on-premise package and On-Premise Token shared by CometChat (see steps 4 and 5).

## 1. Hardware required for Docker Swarm

Below is the list of hardware required that you will need to provision.
Below is the list of machines you will need to provision. Each row is a **role** in the Swarm cluster; the *Requires Public IP* and *Open Public Ports* columns indicate which machines must be reachable from the internet.

| Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | VM | Open Public Ports |
| ----------- | ----------- | --------------- | ------------------ | --- | ----------------------------------------- |
| master | 8 core | 32GB | 250GB| Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB| No | |
| storage2 | 8 core | 32GB | 250GB| No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |
| Role / Machine | Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | Open Public Ports |
| -------------- | ----------- | ----------- | --------------- | ------------------ | ----------------------------------------- |
| master | 8 core | 32GB | 250GB | Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB | No | |
| storage2 | 8 core | 32GB | 250GB | No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |

## 2. Once the hardware and public IP's are ready

Expand DownExpand Up@@ -89,3 +99,12 @@ cd cometchatpro-onprem-dockerswarm-1.0.0
#on extensions
._extensions_bootstrap.sh
```

<Note>
Run the bootstrap script that matches each machine's role, using the exact script names included in the on-premise package shared by CometChat. If a script name in the package differs from what is shown here, follow the package. Once every machine is bootstrapped, return to the **master** node to complete the final bootstrap step with CometChat.
</Note>

## Related

- [Properties and Constraints](/articles/properties-and-constraints)
- [Rate Limits](/articles/rate-limits)
27 changes: 26 additions & 1 deletion chat-builder/android/builder-customisations.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,13 @@ The Android UI Kit Builder uses two main files for customization:
| `BuilderSettingsHelper.kt` | Utility class that applies settings to UI components | Component-level customizations |

<Info>
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin. For changes that should survive a rebuild, edit `cometchat-builder-settings.json` (feature toggles) or `themes.xml` (styling) instead.
</Info>

<Note>
The two files above cover Builder-level customization. Because the Builder sits on top of the standard [CometChat Android UI Kit](/ui-kit/android/getting-started), you can go further using the UI Kit's own customization layers — **Message Templates**, **View Slots**, and **DataSource decorators**. See [Beyond Builder Settings](#beyond-builder-settings-deeper-ui-kit-customization) below.
</Note>

---

## Using BuilderSettingsHelper
Expand DownExpand Up@@ -379,6 +383,27 @@ You can customize individual component styles by overriding their style attribut

---

## Beyond Builder Settings: Deeper UI Kit Customization

`BuilderSettingsHelper` and `themes.xml` cover feature toggles and broad styling. When you need to change the *structure* or *behavior* of a component — not just whether a feature is on — use the standard UI Kit customization layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.

| Layer | Use it when you want to… | Reference |
| ----- | ------------------------ | --------- |
| **Message Templates** | Change a message bubble's structure, content/header/reply views, or bubble interactions | [Message Template](/ui-kit/android/message-template) |
| **View Slots** | Replace a specific region of a list item — avatar, title, subtitle, trailing section, or the entire row | [View Slots](/ui-kit/android/customization-view-slots) |
| **DataSource & ChatConfigurator** | Globally override how messages render, which options appear on bubbles, and which attachment actions appear in the composer | [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) |
| **Style classes & attributes** | Override individual component style attributes beyond the brand color and font themes | [Component Styling](/ui-kit/android/component-styling) |

<Tip>
Read the [Customization Overview](/ui-kit/android/customization-overview) first. It explains the View + ViewModel + Adapter architecture that all of these layers build on.
</Tip>

<Note>
These layers belong to the underlying UI Kit, not the Builder plugin. Apply them in the same Activity/Fragment where you call `BuilderSettingsHelper`, after the component is inflated. Call order generally does not matter for visibility flags, but if a template or slot and a Builder setting target the same region, the more specific UI Kit customization wins. Verify the exact precedence for your case against the linked reference pages.
</Note>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions chat-builder/android/builder-dir-structure.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -178,6 +178,10 @@ Drawable resources including icons, shapes, and backgrounds.
Prefer using `CometChatBuilderSettings.kt` for feature toggles and `themes.xml` for styling. For extensive changes, extend existing components instead of modifying core files directly.
</Note>

<Note>
`CometChatBuilderSettings.kt` is regenerated from `cometchat-builder-settings.json` on every Gradle build, so edits there are not preserved across rebuilds. Keep feature changes in the JSON and visual changes in `themes.xml`. For structural changes to components (custom bubbles, list-item regions, global message overrides), use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers rather than editing generated files.
</Note>

---

## Next Steps
Expand Down
18 changes: 17 additions & 1 deletion chat-builder/android/builder-settings.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,13 @@ description: "Configure Android UI Kit Builder settings for messaging, AI helper
The `CometChatBuilderSettings` object controls everything the Android UI Kit Builder renders—messaging, AI helpers, calls, layout, theming, and more. This object is auto-generated by the UI Kit Builder Settings Gradle plugin from your `cometchat-builder-settings.json` configuration file.

<Info>
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup.
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup, and [Customizations](/chat-builder/android/builder-customisations) for how the generated constants are applied to components via `BuilderSettingsHelper`.
</Info>

<Note>
These settings control feature toggles, layout, and broad styling. For structural or behavioral customization beyond what the JSON exposes — custom bubbles, list-item regions, or global message overrides — use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.
</Note>

## Top-level Structure

The generated `CometChatBuilderSettings` object in Kotlin follows this structure:
Expand DownExpand Up@@ -401,4 +405,16 @@ Some features require additional configuration in the [CometChat Dashboard](http
>
Modify component props, styling, and behavior for deeper customization.
</Card>
<Card
title="Theming"
href="/ui-kit/android/theme-introduction"
>
Go beyond brand color and font with full colors, typography, and style attributes.
</Card>
<Card
title="Customization Overview"
href="/ui-kit/android/customization-overview"
>
Learn the UI Kit architecture and all deeper customization entry points.
</Card>
</CardGroup>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion ai-chatbots/custom-agents.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, custom agents are unique users capable of autonomously sending and

Users can interact with agents through private one-on-one conversations or within group chats. When an agent receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom agent** lets you bring your own backend and AI logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the agent
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (agent's reply)
CometChat->>User: Delivers the agent's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the agent are completely in your hands. A

### Responding as an agent

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your agent's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the agent's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Bots" icon="robot" href="/ai-chatbots/custom-bots">
Configure a custom bot the same way as a custom agent.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the agent's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the agent.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
41 changes: 40 additions & 1 deletion ai-chatbots/custom-bots.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, Custom bots are unique users capable of autonomously sending and r

Users can interact with bots through private one-on-one conversations or within group chats. When a bot receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom bot** lets you bring your own backend and logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the bot
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (bot's reply)
CometChat->>User: Delivers the bot's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the bot are completely in your hands. All

### Responding as a bot

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the bot's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Agents" icon="robot" href="/ai-chatbots/custom-agents">
Configure a custom agent the same way as a custom bot.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the bot's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the bot.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
43 changes: 31 additions & 12 deletions articles/docker.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,22 +3,32 @@ title: "Docker"
description: "Docker — CometChat documentation."
---

It is suggested to be familiar with the various kinds of roles for the on-premise deployment.
This guide describes how to deploy CometChat on-premise as a **Docker Swarm** cluster. The deployment spans several machines, each running a specific role (master, storage, calling, websocket, worker nodes, and extensions). Before you begin, it is suggested to be familiar with these roles.

<Note>
On-premise deployment relies on artifacts and an On-Premise Token provided directly by CometChat (the bootstrap scripts and the `cometchatpro-onprem-dockerswarm` folder referenced below). If you do not have these yet, contact CometChat to start the on-premise process.
</Note>

## Prerequisites

- Machines provisioned to meet the hardware requirements in the table below, with network connectivity between them.
- Docker with Docker Compose installed on every machine (see step 3).
- The on-premise package and On-Premise Token shared by CometChat (see steps 4 and 5).

## 1. Hardware required for Docker Swarm

Below is the list of hardware required that you will need to provision.
Below is the list of machines you will need to provision. Each row is a **role** in the Swarm cluster; the *Requires Public IP* and *Open Public Ports* columns indicate which machines must be reachable from the internet.

| Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | VM | Open Public Ports |
| ----------- | ----------- | --------------- | ------------------ | --- | ----------------------------------------- |
| master | 8 core | 32GB | 250GB| Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB| No | |
| storage2 | 8 core | 32GB | 250GB| No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |
| Role / Machine | Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | Open Public Ports |
| -------------- | ----------- | ----------- | --------------- | ------------------ | ----------------------------------------- |
| master | 8 core | 32GB | 250GB | Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB | No | |
| storage2 | 8 core | 32GB | 250GB | No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |

## 2. Once the hardware and public IP's are ready

Expand DownExpand Up@@ -89,3 +99,12 @@ cd cometchatpro-onprem-dockerswarm-1.0.0
#on extensions
._extensions_bootstrap.sh
```

<Note>
Run the bootstrap script that matches each machine's role, using the exact script names included in the on-premise package shared by CometChat. If a script name in the package differs from what is shown here, follow the package. Once every machine is bootstrapped, return to the **master** node to complete the final bootstrap step with CometChat.
</Note>

## Related

- [Properties and Constraints](/articles/properties-and-constraints)
- [Rate Limits](/articles/rate-limits)
27 changes: 26 additions & 1 deletion chat-builder/android/builder-customisations.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,13 @@ The Android UI Kit Builder uses two main files for customization:
| `BuilderSettingsHelper.kt` | Utility class that applies settings to UI components | Component-level customizations |

<Info>
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin. For changes that should survive a rebuild, edit `cometchat-builder-settings.json` (feature toggles) or `themes.xml` (styling) instead.
</Info>

<Note>
The two files above cover Builder-level customization. Because the Builder sits on top of the standard [CometChat Android UI Kit](/ui-kit/android/getting-started), you can go further using the UI Kit's own customization layers — **Message Templates**, **View Slots**, and **DataSource decorators**. See [Beyond Builder Settings](#beyond-builder-settings-deeper-ui-kit-customization) below.
</Note>

---

## Using BuilderSettingsHelper
Expand DownExpand Up@@ -379,6 +383,27 @@ You can customize individual component styles by overriding their style attribut

---

## Beyond Builder Settings: Deeper UI Kit Customization

`BuilderSettingsHelper` and `themes.xml` cover feature toggles and broad styling. When you need to change the *structure* or *behavior* of a component — not just whether a feature is on — use the standard UI Kit customization layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.

| Layer | Use it when you want to… | Reference |
| ----- | ------------------------ | --------- |
| **Message Templates** | Change a message bubble's structure, content/header/reply views, or bubble interactions | [Message Template](/ui-kit/android/message-template) |
| **View Slots** | Replace a specific region of a list item — avatar, title, subtitle, trailing section, or the entire row | [View Slots](/ui-kit/android/customization-view-slots) |
| **DataSource & ChatConfigurator** | Globally override how messages render, which options appear on bubbles, and which attachment actions appear in the composer | [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) |
| **Style classes & attributes** | Override individual component style attributes beyond the brand color and font themes | [Component Styling](/ui-kit/android/component-styling) |

<Tip>
Read the [Customization Overview](/ui-kit/android/customization-overview) first. It explains the View + ViewModel + Adapter architecture that all of these layers build on.
</Tip>

<Note>
These layers belong to the underlying UI Kit, not the Builder plugin. Apply them in the same Activity/Fragment where you call `BuilderSettingsHelper`, after the component is inflated. Call order generally does not matter for visibility flags, but if a template or slot and a Builder setting target the same region, the more specific UI Kit customization wins. Verify the exact precedence for your case against the linked reference pages.
</Note>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions chat-builder/android/builder-dir-structure.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -178,6 +178,10 @@ Drawable resources including icons, shapes, and backgrounds.
Prefer using `CometChatBuilderSettings.kt` for feature toggles and `themes.xml` for styling. For extensive changes, extend existing components instead of modifying core files directly.
</Note>

<Note>
`CometChatBuilderSettings.kt` is regenerated from `cometchat-builder-settings.json` on every Gradle build, so edits there are not preserved across rebuilds. Keep feature changes in the JSON and visual changes in `themes.xml`. For structural changes to components (custom bubbles, list-item regions, global message overrides), use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers rather than editing generated files.
</Note>

---

## Next Steps
Expand Down
18 changes: 17 additions & 1 deletion chat-builder/android/builder-settings.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,13 @@ description: "Configure Android UI Kit Builder settings for messaging, AI helper
The `CometChatBuilderSettings` object controls everything the Android UI Kit Builder renders—messaging, AI helpers, calls, layout, theming, and more. This object is auto-generated by the UI Kit Builder Settings Gradle plugin from your `cometchat-builder-settings.json` configuration file.

<Info>
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup.
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup, and [Customizations](/chat-builder/android/builder-customisations) for how the generated constants are applied to components via `BuilderSettingsHelper`.
</Info>

<Note>
These settings control feature toggles, layout, and broad styling. For structural or behavioral customization beyond what the JSON exposes — custom bubbles, list-item regions, or global message overrides — use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.
</Note>

## Top-level Structure

The generated `CometChatBuilderSettings` object in Kotlin follows this structure:
Expand DownExpand Up@@ -401,4 +405,16 @@ Some features require additional configuration in the [CometChat Dashboard](http
>
Modify component props, styling, and behavior for deeper customization.
</Card>
<Card
title="Theming"
href="/ui-kit/android/theme-introduction"
>
Go beyond brand color and font with full colors, typography, and style attributes.
</Card>
<Card
title="Customization Overview"
href="/ui-kit/android/customization-overview"
>
Learn the UI Kit architecture and all deeper customization entry points.
</Card>
</CardGroup>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion ai-chatbots/custom-agents.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, custom agents are unique users capable of autonomously sending and

Users can interact with agents through private one-on-one conversations or within group chats. When an agent receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom agent** lets you bring your own backend and AI logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the agent
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (agent's reply)
CometChat->>User: Delivers the agent's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the agent are completely in your hands. A

### Responding as an agent

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your agent's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the agent's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Bots" icon="robot" href="/ai-chatbots/custom-bots">
Configure a custom bot the same way as a custom agent.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the agent's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the agent.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
41 changes: 40 additions & 1 deletion ai-chatbots/custom-bots.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, Custom bots are unique users capable of autonomously sending and r

Users can interact with bots through private one-on-one conversations or within group chats. When a bot receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom bot** lets you bring your own backend and logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the bot
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (bot's reply)
CometChat->>User: Delivers the bot's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the bot are completely in your hands. All

### Responding as a bot

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the bot's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Agents" icon="robot" href="/ai-chatbots/custom-agents">
Configure a custom agent the same way as a custom bot.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the bot's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the bot.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
43 changes: 31 additions & 12 deletions articles/docker.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,22 +3,32 @@ title: "Docker"
description: "Docker — CometChat documentation."
---

It is suggested to be familiar with the various kinds of roles for the on-premise deployment.
This guide describes how to deploy CometChat on-premise as a **Docker Swarm** cluster. The deployment spans several machines, each running a specific role (master, storage, calling, websocket, worker nodes, and extensions). Before you begin, it is suggested to be familiar with these roles.

<Note>
On-premise deployment relies on artifacts and an On-Premise Token provided directly by CometChat (the bootstrap scripts and the `cometchatpro-onprem-dockerswarm` folder referenced below). If you do not have these yet, contact CometChat to start the on-premise process.
</Note>

## Prerequisites

- Machines provisioned to meet the hardware requirements in the table below, with network connectivity between them.
- Docker with Docker Compose installed on every machine (see step 3).
- The on-premise package and On-Premise Token shared by CometChat (see steps 4 and 5).

## 1. Hardware required for Docker Swarm

Below is the list of hardware required that you will need to provision.
Below is the list of machines you will need to provision. Each row is a **role** in the Swarm cluster; the *Requires Public IP* and *Open Public Ports* columns indicate which machines must be reachable from the internet.

| Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | VM | Open Public Ports |
| ----------- | ----------- | --------------- | ------------------ | --- | ----------------------------------------- |
| master | 8 core | 32GB | 250GB| Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB| No | |
| storage2 | 8 core | 32GB | 250GB| No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |
| Role / Machine | Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | Open Public Ports |
| -------------- | ----------- | ----------- | --------------- | ------------------ | ----------------------------------------- |
| master | 8 core | 32GB | 250GB | Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB | No | |
| storage2 | 8 core | 32GB | 250GB | No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |

## 2. Once the hardware and public IP's are ready

Expand DownExpand Up@@ -89,3 +99,12 @@ cd cometchatpro-onprem-dockerswarm-1.0.0
#on extensions
._extensions_bootstrap.sh
```

<Note>
Run the bootstrap script that matches each machine's role, using the exact script names included in the on-premise package shared by CometChat. If a script name in the package differs from what is shown here, follow the package. Once every machine is bootstrapped, return to the **master** node to complete the final bootstrap step with CometChat.
</Note>

## Related

- [Properties and Constraints](/articles/properties-and-constraints)
- [Rate Limits](/articles/rate-limits)
27 changes: 26 additions & 1 deletion chat-builder/android/builder-customisations.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,13 @@ The Android UI Kit Builder uses two main files for customization:
| `BuilderSettingsHelper.kt` | Utility class that applies settings to UI components | Component-level customizations |

<Info>
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin. For changes that should survive a rebuild, edit `cometchat-builder-settings.json` (feature toggles) or `themes.xml` (styling) instead.
</Info>

<Note>
The two files above cover Builder-level customization. Because the Builder sits on top of the standard [CometChat Android UI Kit](/ui-kit/android/getting-started), you can go further using the UI Kit's own customization layers — **Message Templates**, **View Slots**, and **DataSource decorators**. See [Beyond Builder Settings](#beyond-builder-settings-deeper-ui-kit-customization) below.
</Note>

---

## Using BuilderSettingsHelper
Expand DownExpand Up@@ -379,6 +383,27 @@ You can customize individual component styles by overriding their style attribut

---

## Beyond Builder Settings: Deeper UI Kit Customization

`BuilderSettingsHelper` and `themes.xml` cover feature toggles and broad styling. When you need to change the *structure* or *behavior* of a component — not just whether a feature is on — use the standard UI Kit customization layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.

| Layer | Use it when you want to… | Reference |
| ----- | ------------------------ | --------- |
| **Message Templates** | Change a message bubble's structure, content/header/reply views, or bubble interactions | [Message Template](/ui-kit/android/message-template) |
| **View Slots** | Replace a specific region of a list item — avatar, title, subtitle, trailing section, or the entire row | [View Slots](/ui-kit/android/customization-view-slots) |
| **DataSource & ChatConfigurator** | Globally override how messages render, which options appear on bubbles, and which attachment actions appear in the composer | [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) |
| **Style classes & attributes** | Override individual component style attributes beyond the brand color and font themes | [Component Styling](/ui-kit/android/component-styling) |

<Tip>
Read the [Customization Overview](/ui-kit/android/customization-overview) first. It explains the View + ViewModel + Adapter architecture that all of these layers build on.
</Tip>

<Note>
These layers belong to the underlying UI Kit, not the Builder plugin. Apply them in the same Activity/Fragment where you call `BuilderSettingsHelper`, after the component is inflated. Call order generally does not matter for visibility flags, but if a template or slot and a Builder setting target the same region, the more specific UI Kit customization wins. Verify the exact precedence for your case against the linked reference pages.
</Note>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions chat-builder/android/builder-dir-structure.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -178,6 +178,10 @@ Drawable resources including icons, shapes, and backgrounds.
Prefer using `CometChatBuilderSettings.kt` for feature toggles and `themes.xml` for styling. For extensive changes, extend existing components instead of modifying core files directly.
</Note>

<Note>
`CometChatBuilderSettings.kt` is regenerated from `cometchat-builder-settings.json` on every Gradle build, so edits there are not preserved across rebuilds. Keep feature changes in the JSON and visual changes in `themes.xml`. For structural changes to components (custom bubbles, list-item regions, global message overrides), use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers rather than editing generated files.
</Note>

---

## Next Steps
Expand Down
18 changes: 17 additions & 1 deletion chat-builder/android/builder-settings.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,13 @@ description: "Configure Android UI Kit Builder settings for messaging, AI helper
The `CometChatBuilderSettings` object controls everything the Android UI Kit Builder renders—messaging, AI helpers, calls, layout, theming, and more. This object is auto-generated by the UI Kit Builder Settings Gradle plugin from your `cometchat-builder-settings.json` configuration file.

<Info>
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup.
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup, and [Customizations](/chat-builder/android/builder-customisations) for how the generated constants are applied to components via `BuilderSettingsHelper`.
</Info>

<Note>
These settings control feature toggles, layout, and broad styling. For structural or behavioral customization beyond what the JSON exposes — custom bubbles, list-item regions, or global message overrides — use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.
</Note>

## Top-level Structure

The generated `CometChatBuilderSettings` object in Kotlin follows this structure:
Expand DownExpand Up@@ -401,4 +405,16 @@ Some features require additional configuration in the [CometChat Dashboard](http
>
Modify component props, styling, and behavior for deeper customization.
</Card>
<Card
title="Theming"
href="/ui-kit/android/theme-introduction"
>
Go beyond brand color and font with full colors, typography, and style attributes.
</Card>
<Card
title="Customization Overview"
href="/ui-kit/android/customization-overview"
>
Learn the UI Kit architecture and all deeper customization entry points.
</Card>
</CardGroup>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion ai-chatbots/custom-agents.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, custom agents are unique users capable of autonomously sending and

Users can interact with agents through private one-on-one conversations or within group chats. When an agent receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom agent** lets you bring your own backend and AI logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the agent
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (agent's reply)
CometChat->>User: Delivers the agent's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the agent are completely in your hands. A

### Responding as an agent

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your agent's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the agent's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Bots" icon="robot" href="/ai-chatbots/custom-bots">
Configure a custom bot the same way as a custom agent.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the agent's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the agent.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
41 changes: 40 additions & 1 deletion ai-chatbots/custom-bots.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, Custom bots are unique users capable of autonomously sending and r

Users can interact with bots through private one-on-one conversations or within group chats. When a bot receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom bot** lets you bring your own backend and logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the bot
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (bot's reply)
CometChat->>User: Delivers the bot's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the bot are completely in your hands. All

### Responding as a bot

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the bot's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Agents" icon="robot" href="/ai-chatbots/custom-agents">
Configure a custom agent the same way as a custom bot.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the bot's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the bot.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
43 changes: 31 additions & 12 deletions articles/docker.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,22 +3,32 @@ title: "Docker"
description: "Docker — CometChat documentation."
---

It is suggested to be familiar with the various kinds of roles for the on-premise deployment.
This guide describes how to deploy CometChat on-premise as a **Docker Swarm** cluster. The deployment spans several machines, each running a specific role (master, storage, calling, websocket, worker nodes, and extensions). Before you begin, it is suggested to be familiar with these roles.

<Note>
On-premise deployment relies on artifacts and an On-Premise Token provided directly by CometChat (the bootstrap scripts and the `cometchatpro-onprem-dockerswarm` folder referenced below). If you do not have these yet, contact CometChat to start the on-premise process.
</Note>

## Prerequisites

- Machines provisioned to meet the hardware requirements in the table below, with network connectivity between them.
- Docker with Docker Compose installed on every machine (see step 3).
- The on-premise package and On-Premise Token shared by CometChat (see steps 4 and 5).

## 1. Hardware required for Docker Swarm

Below is the list of hardware required that you will need to provision.
Below is the list of machines you will need to provision. Each row is a **role** in the Swarm cluster; the *Requires Public IP* and *Open Public Ports* columns indicate which machines must be reachable from the internet.

| Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | VM | Open Public Ports |
| ----------- | ----------- | --------------- | ------------------ | --- | ----------------------------------------- |
| master | 8 core | 32GB | 250GB| Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB| No | |
| storage2 | 8 core | 32GB | 250GB| No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |
| Role / Machine | Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | Open Public Ports |
| -------------- | ----------- | ----------- | --------------- | ------------------ | ----------------------------------------- |
| master | 8 core | 32GB | 250GB | Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB | No | |
| storage2 | 8 core | 32GB | 250GB | No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |

## 2. Once the hardware and public IP's are ready

Expand DownExpand Up@@ -89,3 +99,12 @@ cd cometchatpro-onprem-dockerswarm-1.0.0
#on extensions
._extensions_bootstrap.sh
```

<Note>
Run the bootstrap script that matches each machine's role, using the exact script names included in the on-premise package shared by CometChat. If a script name in the package differs from what is shown here, follow the package. Once every machine is bootstrapped, return to the **master** node to complete the final bootstrap step with CometChat.
</Note>

## Related

- [Properties and Constraints](/articles/properties-and-constraints)
- [Rate Limits](/articles/rate-limits)
27 changes: 26 additions & 1 deletion chat-builder/android/builder-customisations.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,13 @@ The Android UI Kit Builder uses two main files for customization:
| `BuilderSettingsHelper.kt` | Utility class that applies settings to UI components | Component-level customizations |

<Info>
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin. For changes that should survive a rebuild, edit `cometchat-builder-settings.json` (feature toggles) or `themes.xml` (styling) instead.
</Info>

<Note>
The two files above cover Builder-level customization. Because the Builder sits on top of the standard [CometChat Android UI Kit](/ui-kit/android/getting-started), you can go further using the UI Kit's own customization layers — **Message Templates**, **View Slots**, and **DataSource decorators**. See [Beyond Builder Settings](#beyond-builder-settings-deeper-ui-kit-customization) below.
</Note>

---

## Using BuilderSettingsHelper
Expand DownExpand Up@@ -379,6 +383,27 @@ You can customize individual component styles by overriding their style attribut

---

## Beyond Builder Settings: Deeper UI Kit Customization

`BuilderSettingsHelper` and `themes.xml` cover feature toggles and broad styling. When you need to change the *structure* or *behavior* of a component — not just whether a feature is on — use the standard UI Kit customization layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.

| Layer | Use it when you want to… | Reference |
| ----- | ------------------------ | --------- |
| **Message Templates** | Change a message bubble's structure, content/header/reply views, or bubble interactions | [Message Template](/ui-kit/android/message-template) |
| **View Slots** | Replace a specific region of a list item — avatar, title, subtitle, trailing section, or the entire row | [View Slots](/ui-kit/android/customization-view-slots) |
| **DataSource & ChatConfigurator** | Globally override how messages render, which options appear on bubbles, and which attachment actions appear in the composer | [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) |
| **Style classes & attributes** | Override individual component style attributes beyond the brand color and font themes | [Component Styling](/ui-kit/android/component-styling) |

<Tip>
Read the [Customization Overview](/ui-kit/android/customization-overview) first. It explains the View + ViewModel + Adapter architecture that all of these layers build on.
</Tip>

<Note>
These layers belong to the underlying UI Kit, not the Builder plugin. Apply them in the same Activity/Fragment where you call `BuilderSettingsHelper`, after the component is inflated. Call order generally does not matter for visibility flags, but if a template or slot and a Builder setting target the same region, the more specific UI Kit customization wins. Verify the exact precedence for your case against the linked reference pages.
</Note>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions chat-builder/android/builder-dir-structure.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -178,6 +178,10 @@ Drawable resources including icons, shapes, and backgrounds.
Prefer using `CometChatBuilderSettings.kt` for feature toggles and `themes.xml` for styling. For extensive changes, extend existing components instead of modifying core files directly.
</Note>

<Note>
`CometChatBuilderSettings.kt` is regenerated from `cometchat-builder-settings.json` on every Gradle build, so edits there are not preserved across rebuilds. Keep feature changes in the JSON and visual changes in `themes.xml`. For structural changes to components (custom bubbles, list-item regions, global message overrides), use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers rather than editing generated files.
</Note>

---

## Next Steps
Expand Down
18 changes: 17 additions & 1 deletion chat-builder/android/builder-settings.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,13 @@ description: "Configure Android UI Kit Builder settings for messaging, AI helper
The `CometChatBuilderSettings` object controls everything the Android UI Kit Builder renders—messaging, AI helpers, calls, layout, theming, and more. This object is auto-generated by the UI Kit Builder Settings Gradle plugin from your `cometchat-builder-settings.json` configuration file.

<Info>
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup.
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup, and [Customizations](/chat-builder/android/builder-customisations) for how the generated constants are applied to components via `BuilderSettingsHelper`.
</Info>

<Note>
These settings control feature toggles, layout, and broad styling. For structural or behavioral customization beyond what the JSON exposes — custom bubbles, list-item regions, or global message overrides — use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.
</Note>

## Top-level Structure

The generated `CometChatBuilderSettings` object in Kotlin follows this structure:
Expand DownExpand Up@@ -401,4 +405,16 @@ Some features require additional configuration in the [CometChat Dashboard](http
>
Modify component props, styling, and behavior for deeper customization.
</Card>
<Card
title="Theming"
href="/ui-kit/android/theme-introduction"
>
Go beyond brand color and font with full colors, typography, and style attributes.
</Card>
<Card
title="Customization Overview"
href="/ui-kit/android/customization-overview"
>
Learn the UI Kit architecture and all deeper customization entry points.
</Card>
</CardGroup>
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion ai-chatbots/custom-agents.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, custom agents are unique users capable of autonomously sending and

Users can interact with agents through private one-on-one conversations or within group chats. When an agent receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom agent** lets you bring your own backend and AI logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the agent
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (agent's reply)
CometChat->>User: Delivers the agent's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the agent are completely in your hands. A

### Responding as an agent

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your agent's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the agent's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Bots" icon="robot" href="/ai-chatbots/custom-bots">
Configure a custom bot the same way as a custom agent.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the agent's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the agent.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
41 changes: 40 additions & 1 deletion ai-chatbots/custom-bots.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,24 @@ In CometChat, Custom bots are unique users capable of autonomously sending and r

Users can interact with bots through private one-on-one conversations or within group chats. When a bot receives a message, whether from an individual chat or a group, CometChat relays that message to a `Callback URL` that you configure. Upon receiving the message, you can process it according to your business logic and send a response using CometChat's API.

<Note>
A **custom bot** lets you bring your own backend and logic — CometChat only forwards messages to your callback URL and posts your responses back. If you would rather configure an agent (tools, knowledge base, MCP servers) without running your own orchestration, use CometChat's native [Agent Builder APIs](/rest-api/ai-agents-apis/overview) instead.
</Note>

The flow at a glance:

```mermaid
sequenceDiagram
participant User
participant CometChat
participant Your Server
User->>CometChat: Sends a message to the bot
CometChat->>Your Server: HTTP POST to your Callback URL (JSON)
Your Server->>Your Server: Apply your business logic
Your Server->>CometChat: Send Bot Message REST API (bot's reply)
CometChat->>User: Delivers the bot's reply
```

## Create a callback endpoint

### Callback endpoint requirements
Expand DownExpand Up@@ -57,4 +75,25 @@ The actual development and behavior of the bot are completely in your hands. All

### Responding as a bot

After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so.
After your bot's callback endpoint has received and processed a message, and you're ready to send a response back, make use of CometChat's [Send Bot Message](/rest-api/messages/send-bot-message) REST API to do so. This API posts a message authored by the bot's UID (`POST /bots/{uid}/messages`).

<Note>
The exact JSON shape CometChat POSTs to your Callback URL is not documented on this page. Log the incoming request body from your endpoint to inspect it, or contact the CometChat team for the current payload reference.
</Note>

## Next steps

<CardGroup cols={2}>
<Card title="Custom Agents" icon="robot" href="/ai-chatbots/custom-agents">
Configure a custom agent the same way as a custom bot.
</Card>
<Card title="Send Bot Message (REST API)" icon="paper-plane" href="/rest-api/messages/send-bot-message">
Post the bot's reply back into the conversation.
</Card>
<Card title="Create User (REST API)" icon="user-plus" href="/rest-api/users/create">
Create the user account that backs the bot.
</Card>
<Card title="Agent Builder APIs" icon="wand-magic-sparkles" href="/rest-api/ai-agents-apis/overview">
Build native agents with tools and knowledge bases instead.
</Card>
</CardGroup>
43 changes: 31 additions & 12 deletions articles/docker.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,22 +3,32 @@ title: "Docker"
description: "Docker — CometChat documentation."
---

It is suggested to be familiar with the various kinds of roles for the on-premise deployment.
This guide describes how to deploy CometChat on-premise as a **Docker Swarm** cluster. The deployment spans several machines, each running a specific role (master, storage, calling, websocket, worker nodes, and extensions). Before you begin, it is suggested to be familiar with these roles.

<Note>
On-premise deployment relies on artifacts and an On-Premise Token provided directly by CometChat (the bootstrap scripts and the `cometchatpro-onprem-dockerswarm` folder referenced below). If you do not have these yet, contact CometChat to start the on-premise process.
</Note>

## Prerequisites

- Machines provisioned to meet the hardware requirements in the table below, with network connectivity between them.
- Docker with Docker Compose installed on every machine (see step 3).
- The on-premise package and On-Premise Token shared by CometChat (see steps 4 and 5).

## 1. Hardware required for Docker Swarm

Below is the list of hardware required that you will need to provision.
Below is the list of machines you will need to provision. Each row is a **role** in the Swarm cluster; the *Requires Public IP* and *Open Public Ports* columns indicate which machines must be reachable from the internet.

| Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | VM | Open Public Ports |
| ----------- | ----------- | --------------- | ------------------ | --- | ----------------------------------------- |
| master | 8 core | 32GB | 250GB| Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB| No | |
| storage2 | 8 core | 32GB | 250GB| No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |
| Role / Machine | Minimum CPU | Minimum RAM | Minimum Storage | Requires Public IP | Open Public Ports |
| -------------- | ----------- | ----------- | --------------- | ------------------ | ----------------------------------------- |
| master | 8 core | 32GB | 250GB | Yes | TCP: 80,443 |
| storage1 | 8 core | 32GB | 250GB | No | |
| storage2 | 8 core | 32GB | 250GB | No | |
| calling | 8 core | 32GB | 50GB| Yes | TCP: 80,443, 10000-20000 UDP: 10000-20000 |
| websocket | 8 core | 32GB | 50GB| Yes | TCP: 80,443,7070,5222,5223 |
| node1 | 4 core | 8GB | 50GB| No | |
| node2 | 4 core | 8GB | 50GB| No | |
| extensions | 4 core | 8GB | 50GB| Yes | TCP: 80, 443 |

## 2. Once the hardware and public IP's are ready

Expand DownExpand Up@@ -89,3 +99,12 @@ cd cometchatpro-onprem-dockerswarm-1.0.0
#on extensions
._extensions_bootstrap.sh
```

<Note>
Run the bootstrap script that matches each machine's role, using the exact script names included in the on-premise package shared by CometChat. If a script name in the package differs from what is shown here, follow the package. Once every machine is bootstrapped, return to the **master** node to complete the final bootstrap step with CometChat.
</Note>

## Related

- [Properties and Constraints](/articles/properties-and-constraints)
- [Rate Limits](/articles/rate-limits)
27 changes: 26 additions & 1 deletion chat-builder/android/builder-customisations.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,13 @@ The Android UI Kit Builder uses two main files for customization:
| `BuilderSettingsHelper.kt` | Utility class that applies settings to UI components | Component-level customizations |

<Info>
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.
`CometChatBuilderSettings.kt` is auto-generated by the Builder plugin from your `cometchat-builder-settings.json` file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin. For changes that should survive a rebuild, edit `cometchat-builder-settings.json` (feature toggles) or `themes.xml` (styling) instead.
</Info>

<Note>
The two files above cover Builder-level customization. Because the Builder sits on top of the standard [CometChat Android UI Kit](/ui-kit/android/getting-started), you can go further using the UI Kit's own customization layers — **Message Templates**, **View Slots**, and **DataSource decorators**. See [Beyond Builder Settings](#beyond-builder-settings-deeper-ui-kit-customization) below.
</Note>

---

## Using BuilderSettingsHelper
Expand DownExpand Up@@ -379,6 +383,27 @@ You can customize individual component styles by overriding their style attribut

---

## Beyond Builder Settings: Deeper UI Kit Customization

`BuilderSettingsHelper` and `themes.xml` cover feature toggles and broad styling. When you need to change the *structure* or *behavior* of a component — not just whether a feature is on — use the standard UI Kit customization layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.

| Layer | Use it when you want to… | Reference |
| ----- | ------------------------ | --------- |
| **Message Templates** | Change a message bubble's structure, content/header/reply views, or bubble interactions | [Message Template](/ui-kit/android/message-template) |
| **View Slots** | Replace a specific region of a list item — avatar, title, subtitle, trailing section, or the entire row | [View Slots](/ui-kit/android/customization-view-slots) |
| **DataSource & ChatConfigurator** | Globally override how messages render, which options appear on bubbles, and which attachment actions appear in the composer | [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) |
| **Style classes & attributes** | Override individual component style attributes beyond the brand color and font themes | [Component Styling](/ui-kit/android/component-styling) |

<Tip>
Read the [Customization Overview](/ui-kit/android/customization-overview) first. It explains the View + ViewModel + Adapter architecture that all of these layers build on.
</Tip>

<Note>
These layers belong to the underlying UI Kit, not the Builder plugin. Apply them in the same Activity/Fragment where you call `BuilderSettingsHelper`, after the component is inflated. Call order generally does not matter for visibility flags, but if a template or slot and a Builder setting target the same region, the more specific UI Kit customization wins. Verify the exact precedence for your case against the linked reference pages.
</Note>

---

## Next Steps

<CardGroup cols={2}>
Expand Down
4 changes: 4 additions & 0 deletions chat-builder/android/builder-dir-structure.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -178,6 +178,10 @@ Drawable resources including icons, shapes, and backgrounds.
Prefer using `CometChatBuilderSettings.kt` for feature toggles and `themes.xml` for styling. For extensive changes, extend existing components instead of modifying core files directly.
</Note>

<Note>
`CometChatBuilderSettings.kt` is regenerated from `cometchat-builder-settings.json` on every Gradle build, so edits there are not preserved across rebuilds. Keep feature changes in the JSON and visual changes in `themes.xml`. For structural changes to components (custom bubbles, list-item regions, global message overrides), use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers rather than editing generated files.
</Note>

---

## Next Steps
Expand Down
18 changes: 17 additions & 1 deletion chat-builder/android/builder-settings.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,13 @@ description: "Configure Android UI Kit Builder settings for messaging, AI helper
The `CometChatBuilderSettings` object controls everything the Android UI Kit Builder renders—messaging, AI helpers, calls, layout, theming, and more. This object is auto-generated by the UI Kit Builder Settings Gradle plugin from your `cometchat-builder-settings.json` configuration file.

<Info>
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup.
**For developers customizing their chat UI**: The `CometChatBuilderSettings.kt` file is generated automatically when you build your project. Edit the `cometchat-builder-settings.json` file to enable/disable features like messaging, calls, AI copilot, and theming. See the [Integration Guide](/chat-builder/android/integration) for setup, and [Customizations](/chat-builder/android/builder-customisations) for how the generated constants are applied to components via `BuilderSettingsHelper`.
</Info>

<Note>
These settings control feature toggles, layout, and broad styling. For structural or behavioral customization beyond what the JSON exposes — custom bubbles, list-item regions, or global message overrides — use the underlying UI Kit's [Message Templates](/ui-kit/android/message-template), [View Slots](/ui-kit/android/customization-view-slots), and [DataSource](/ui-kit/android/customization-datasource) layers. The Builder applies its settings to the same UI Kit components, so these layers compose with it.
</Note>

## Top-level Structure

The generated `CometChatBuilderSettings` object in Kotlin follows this structure:
Expand DownExpand Up@@ -401,4 +405,16 @@ Some features require additional configuration in the [CometChat Dashboard](http
>
Modify component props, styling, and behavior for deeper customization.
</Card>
<Card
title="Theming"
href="/ui-kit/android/theme-introduction"
>
Go beyond brand color and font with full colors, typography, and style attributes.
</Card>
<Card
title="Customization Overview"
href="/ui-kit/android/customization-overview"
>
Learn the UI Kit architecture and all deeper customization entry points.
</Card>
</CardGroup>
Loading