Skip to content
Merged
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
4 changes: 4 additions & 0 deletions ai-agents/agent-builder/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ description: "Create, configure, and launch AI agents directly inside CometChat.

Agent Builder provides the capability to create, configure, and customize AI agents directly within CometChat. It supports selecting models, integrating ready-to-use tools, APIs, and MCPs, and deploying agents without relying on any external management or orchestration platforms.

<Note>
**Where AI Agents respond.** Agents created in Agent Builder respond only in one-on-one conversations between an end user and the agent user. They do not respond when added to a group, even as a member or owner. If your use case requires an agent in group conversations, share your requirements on [feedback.cometchat.com](https://feedback.cometchat.com).
</Note>

## Getting Started

### How to create an agent – step-by-step guide
Expand Down
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3057,6 +3057,7 @@
"sdk/javascript/ai-moderation",
"sdk/javascript/ai-agents",
"sdk/javascript/ai-copilot",
"sdk/javascript/webhooks",
{
"group": "Resources",
"pages": [
Expand Down
46 changes: 39 additions & 7 deletions moderation/lists-management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,27 @@ Create a custom keyword list in under 2 minutes:
- Profanity and offensive terms
- Brand names or competitors
- Industry-specific blocked terms

**Example:** `badword, offensive, blocked`

**Entry format:** Comma-separated. Add multiple keywords on the same line, separated by commas.

**Example:**
```
badword, offensive, blocked
```
</Tab>
<Tab title="Patterns (Regex)">
Regular expression matching for complex patterns. Use for:
- Phone number formats
- Email patterns
- Custom data formats

**Example:** `\b\d{3}[-.]?\d{3}[-.]?\d{4}\b` (US phone numbers)

**Entry format:** Newline-separated — one regex pattern per line. Commas are treated as literal characters inside a pattern, so do **not** comma-separate multiple patterns on the same line.

**Example:**
```
\b\d{3}[-.]?\d{3}[-.]?\d{4}\b
[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}
```

<Warning>
**Greedy Regex Not Allowed:** For system performance and security, greedy regex patterns (using `*`, `+`, `{n,}` without proper boundaries) are not permitted. Greedy patterns can cause excessive backtracking and impact system performance.
Expand All @@ -72,11 +83,30 @@ Create a custom keyword list in under 2 minutes:
- Scam message variations
- Platform circumvention attempts
- Context-aware blocking

**Example:** "Send me your credit card details" will match similar phishing attempts

**Entry format:** Newline-separated — one sentence or phrase per line.

**Example:**
```
Send me your credit card details
What is your bank account number
Share your OTP with me
```
</Tab>
</Tabs>

<Note>
**Entry format at a glance**

| List type | Format | Separator |
| --- | --- | --- |
| Keywords | Comma-separated | `,` |
| Patterns (Regex) | Newline-separated | New line |
| Sentence Similarity | Newline-separated | New line |

If you paste comma-separated values into a Patterns or Sentence Similarity list, the entire string is stored as a single entry and will not match as expected.
</Note>

---

## Default Lists Summary
Expand Down Expand Up @@ -176,7 +206,9 @@ Pre-configured lists ready to use with your rules:
- **ID**: Unique identifier
- **Category**: Word, Pattern, or Sentence Similarity
- **Description**: Purpose of the list
- **Source**: Enter terms manually (comma-separated) or upload CSV
- **Source**: Enter terms manually or upload CSV. Format depends on the category:
- **Word**: comma-separated entries.
- **Pattern** and **Sentence Similarity**: one entry per line (newline-separated).
3. Click **Save**

### List All Lists
Expand Down
12 changes: 11 additions & 1 deletion notifications/logs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,15 @@ Logs are kept for up to 14 days: 7 days while logging is active, plus 7 days aft

### Access and filtering

- **Dashboard:** Browse recent logs and narrow by channel, event, user, or status.
- **Dashboard:** Browse recent logs and narrow them down using any of the following filters:
- **Channel** — push, email, or SMS.
- **Event** — message sent, edited, deleted, reaction, group membership change, etc.
- **Sender (User)** — filter by the UID that triggered the notification.
- **Receiver Type** — `user` (one-on-one) or `group`.
- **Receiver ID** — the UID or GUID that should receive the notification.
- **Status** — sent, failed, skipped, etc.
- **API:** Use the Get logs API with query parameters (event, medium, receiver, status, time window, provider) for deeper filtering. See the [API explorer](/rest-api/chat-apis) for the full list.

<Note>
**Receiver ID filter requires Receiver Type.** When filtering by Receiver ID in the dashboard, first select a **Receiver Type** (user or group), then enter the Receiver ID. Using Receiver ID without selecting Receiver Type first will not return results. We are tracking this requirement and plan to make Receiver ID work standalone in a future release.
</Note>
67 changes: 67 additions & 0 deletions sdk/javascript/webhooks.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
title: "Webhooks"
description: "Webhooks — CometChat documentation."
---



CometChat can send webhook events that notify your application any time an event happens on your account.

## Setting up webhooks

### Create a webhook endpoint

Webhook data is sent as JSON in the POST request body. Creating a webhook endpoint on your server is no different from creating any page on your website. With PHP, you might create a new .php file on your server; with a Ruby framework like Sinatra, you would add a new route with the desired URL.

### Test the endpoint locally

Once you’ve added an endpoint to your server, start an instance locally and use a tool like [ngrok](https://ngrok.com) to make your endpoint available for receiving events.

Start ngrok in a command prompt with the same port number that you have configured for your server (e.g., ./ngrok http 8000). You should see information about your tunnel session such as status, expiration, and version. Take note of the Forwarding addresses (e.g., [https://xxxxxxxx.ngrok.io](https://xxxxxxxx.ngrok.io) -> localhost:8000) as this is required for the following step.

### Configure webhook settings

With your endpoint created, you need to tell CometChat about where to send events to. In the Dashboard's Webhooks section, click **Create Webhook** to reveal a form to add a new webhook for receiving events. You can enter any URL as the destination for events. However, this should be a dedicated page on your server that is set up to receive webhook events.

Once you've created the webhook, click **View/Update** to add a trigger. We support two types of triggers-

| Trigger | Description |
| --------------- | ----------------------------------------------------------- |
| after\_message | The endpoint will be triggered after a message is sent. |
| before\_message | The endpoint will be triggered when a message is in-flight. |

The `after_message` trigger is fairly straightforward. CometChat will call your endpoint once a message has been sent.

The `before_message` trigger is useful when you want to add metadata to a message before it reaches the recipient. The data you return will be automatically added to the message metadata:

<Tabs>
<Tab title="JSON">
```json
{
"@injected": {
"webhooks": {
"webhook-id": {
// JSON Object Response From Endpoint
}
}
}
}
```

</Tab>

</Tabs>

You can also decide to drop a message by returning the following JSON object-

<Tabs>
<Tab title="JSON">
```json
{
"action": "do_not_propagate"
}
```

</Tab>

</Tabs>
4 changes: 4 additions & 0 deletions ui-kit/android/guide-ai-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Enable intelligent conversational AI capabilities in your Android app using Come

Transform your chat experience with AI-powered assistance that provides intelligent responses and offers seamless integration with your existing chat infrastructure.

<Note>
**1:1 conversations only.** AI Agents currently respond only in one-on-one conversations between an end user and the agent user. They do not respond to messages sent in groups, even if the agent user is added as a member or owner. Group support is on the roadmap — share your use case on [feedback.cometchat.com](https://feedback.cometchat.com).
</Note>

## Overview

Users can interact with AI agents through a dedicated chat interface that:
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/android/v6/guide-ai-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Enable intelligent conversational AI capabilities in your Android app using Come

Transform your chat experience with AI-powered assistance that provides intelligent responses and seamless integration with your existing chat infrastructure.

<Note>
**1:1 conversations only.** AI Agents currently respond only in one-on-one conversations between an end user and the agent user. They do not respond to messages sent in groups, even if the agent user is added as a member or owner. Group support is on the roadmap — share your use case on [feedback.cometchat.com](https://feedback.cometchat.com).
</Note>

## Overview

Users can interact with AI agents through a dedicated chat interface that:
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/flutter/v5/guide-message-agentic-flow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ description: "Integrate AI agents with chat history, contextual responses, and s

AI Agent Integration enables intelligent conversational AI capabilities with chat history, contextual responses, and seamless handoffs.

<Note>
**1:1 conversations only.** AI Agents currently respond only in one-on-one conversations between an end user and the agent user. They do not respond to messages sent in groups, even if the agent user is added as a member or owner. Group support is on the roadmap — share your use case on [feedback.cometchat.com](https://feedback.cometchat.com).
</Note>

Before starting, complete the [Getting Started](/ui-kit/flutter/v5/getting-started) guide.

---
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/ios/guide-ai-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ description: "Add AI-powered chat assistants to your iOS app"

Integrate AI agents into your iOS app to provide intelligent conversational experiences with chat history, contextual responses, and seamless handoffs.

<Note>
**1:1 conversations only.** AI Agents currently respond only in one-on-one conversations between an end user and the agent user. They do not respond to messages sent in groups, even if the agent user is added as a member or owner. Group support is on the roadmap — share your use case on [feedback.cometchat.com](https://feedback.cometchat.com).
</Note>

<Frame>
<img src="/images/flutter_ai_agent_guide_overview.png" />
</Frame>
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/react-native/guide-ai-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Enable intelligent conversational AI capabilities in your React Native app using

Transform your chat experience with AI-powered assistance that provides intelligent responses and offers seamless integration with your existing chat infrastructure.

<Note>
**1:1 conversations only.** AI Agents currently respond only in one-on-one conversations between an end user and the agent user. They do not respond to messages sent in groups, even if the agent user is added as a member or owner. Group support is on the roadmap — share your use case on [feedback.cometchat.com](https://feedback.cometchat.com).
</Note>

## Overview

Users can interact with AI agents through a dedicated chat interface that:
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/react/ai-assistant-chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ description: "Composite AI agent chat with streaming responses, quick suggestion

`CometChatAIAssistantChat` is a standalone AI chat panel. It composes an internal message header, message list, and message composer into a self-contained AI conversation experience. It requires a `CometChat.User` representing the AI agent.

<Note>
**1:1 conversations only.** AI Agents currently respond only in one-on-one conversations between an end user and the agent user. They do not respond to messages sent in groups, even if the agent user is added as a member or owner. Group support is on the roadmap — share your use case on [feedback.cometchat.com](https://feedback.cometchat.com).
</Note>

```tsx lines
import { useState, useEffect } from "react";
import { CometChat } from "@cometchat/chat-sdk-javascript";
Expand Down