From 0b02aa62c445ad80a3fa59352e3801ca2fb21ec6 Mon Sep 17 00:00:00 2001
From: Swapnil Godambe
Date: Fri, 13 Feb 2026 20:18:28 +0530
Subject: [PATCH 1/2] Updates AG-UI with Custom Agent
---
ai-agents/ag-ui.mdx | 32 +++++++++++++--------------
ai-agents/ag2-product-hunt-agent.mdx | 2 +-
ai-agents/cometchat-ag-ui-byoa.mdx | 19 ++++++++--------
ai-agents/cometchat-ag-ui-express.mdx | 21 +++++++++---------
ai-agents/cometchat-ag-ui-nestjs.mdx | 15 ++++++-------
ai-agents/crew-ai-knowledge-agent.mdx | 2 +-
docs.json | 4 ++--
images/icons/agui.svg | 2 +-
8 files changed, 47 insertions(+), 50 deletions(-)
diff --git a/ai-agents/ag-ui.mdx b/ai-agents/ag-ui.mdx
index e24e4ba31..afe92e035 100644
--- a/ai-agents/ag-ui.mdx
+++ b/ai-agents/ag-ui.mdx
@@ -1,27 +1,27 @@
---
-title: "CometChat AG-UI Integration"
-sidebarTitle: "AG-UI"
-description: "Integrate your AG-UI compatible AI agents with CometChat using the AG-UI protocol."
+title: "CometChat Custom Agent Integration"
+sidebarTitle: "Custom Agent"
+description: "Integrate your AI agents with CometChat using the Custom Agent protocol."
---
-> Overview of the CometChat AG-UI integration protocol, event categories, and message formats.
+> Overview of the CometChat Custom Agent integration protocol, event categories, and message formats.
-CometChat has integrated support for **AG-UI (Agent-User Interaction Protocol)**, making it easier than ever to bring your own AI agents into your applications. With the "Bring Your Own Agent" (BYOA) approach, you can now host your own AG-UI compatible agent and seamlessly integrate it with CometChat's full-stack platform.
+CometChat has integrated support for **Custom Agent**, making it easier than ever to bring your own AI agents into your applications. With the "Bring Your Own Agent" (BYOA) approach, you can host your own agent and seamlessly integrate it with CometChat's full-stack platform using the Custom Agent protocol.
This documentation provides a comprehensive guide on:
-* Understanding the AG-UI protocol
-* Creating AG-UI compatible agents using TypeScript
+* Understanding the Custom Agent protocol
+* Creating Custom Agent integrations using TypeScript
* Hosting agents on Express.js or NestJS
* Connecting your agent to CometChat
***
-## What is AG-UI?
+## What is Custom Agent?
### Overview
-**AG-UI (Agent-User Interaction Protocol)** is an open-source, lightweight, event-based protocol developed to standardize real-time communication between AI agents and user interfaces. It provides a vendor-neutral format that works across different AI providers (OpenAI, Anthropic, custom models, etc.) without requiring changes to client-side implementations.
+**Custom Agent** is a lightweight, event-based protocol developed to standardize real-time communication between AI agents and user interfaces. It provides a vendor-neutral format that works across different AI providers (OpenAI, Anthropic, custom models, etc.) without requiring changes to client-side implementations.
### Key Features
@@ -34,7 +34,7 @@ This documentation provides a comprehensive guide on:
### Core Concepts
-AG-UI operates on three fundamental concepts:
+The Custom Agent protocol operates on three fundamental concepts:
1. **Events**: Standardized messages that flow from agent to frontend
2. **Messages**: Conversation history between users and agents
@@ -42,9 +42,9 @@ AG-UI operates on three fundamental concepts:
***
-## AG-UI Event Types
+## Custom Agent Event Types
-AG-UI defines **16+ standardized event types** organized into six categories. Understanding these events is crucial for implementing AG-UI compatible agents.
+The Custom Agent protocol defines **16+ standardized event types** organized into six categories. Understanding these events is crucial for implementing Custom Agent integrations.
### 1. Lifecycle Events
@@ -295,7 +295,7 @@ interface RawEvent {
### Event Flow Patterns
-AG-UI events follow specific patterns:
+Custom Agent events follow specific patterns:
1. **Start-Content-End Pattern**: Used for streaming (text messages, tool calls)
* Start event initiates the stream
@@ -312,9 +312,9 @@ AG-UI events follow specific patterns:
***
-## AG-UI Message Types
+## Custom Agent Message Types
-Messages form the backbone of communication in the AG-UI protocol. They represent the conversation history between users and AI agents.
+Messages form the backbone of communication in the Custom Agent protocol. They represent the conversation history between users and AI agents.
### Base Message Structure
@@ -453,4 +453,4 @@ const conversation = [
]
```
-***
\ No newline at end of file
+***
diff --git a/ai-agents/ag2-product-hunt-agent.mdx b/ai-agents/ag2-product-hunt-agent.mdx
index 0352ee59d..527efbe77 100644
--- a/ai-agents/ag2-product-hunt-agent.mdx
+++ b/ai-agents/ag2-product-hunt-agent.mdx
@@ -114,7 +114,7 @@ curl -N http://localhost:8000/agent \
}'
```
-You’ll see `tool_call_*` events with Product Hunt data followed by streaming `text_message` chunks and a `[DONE]` sentinel—exactly what CometChat’s AI agents API consumes.
+You’ll see `tool_call_*` events with Product Hunt data followed by streaming `text_message` chunks and a `[DONE]` sentinel—exactly what CometChat’s Custom Agent API consumes.
---
diff --git a/ai-agents/cometchat-ag-ui-byoa.mdx b/ai-agents/cometchat-ag-ui-byoa.mdx
index 124b01859..39d4fd298 100644
--- a/ai-agents/cometchat-ag-ui-byoa.mdx
+++ b/ai-agents/cometchat-ag-ui-byoa.mdx
@@ -1,7 +1,7 @@
---
-title: "CometChat AG-UI Agents"
-sidebarTitle: "CometChat AG-UI Agents"
-description: "Bring your own agent to CometChat and build AG-UI compatible agents."
+title: "CometChat Custom Agents"
+sidebarTitle: "CometChat Custom Agents"
+description: "Bring your own agent to CometChat and build Custom Agent integrations."
---
### Overview
@@ -16,10 +16,10 @@ CometChat's "Bring Your Own Agent" (BYOA) feature allows you to integrate your c
### How It Works
-1. **Host Your Agent**: Deploy an AG-UI compatible agent on your infrastructure
+1. **Host Your Agent**: Deploy your Custom Agent server on your infrastructure
2. **Configure in CometChat**: Add agent details in the CometChat dashboard
3. **Secure Connection**: Set up authentication headers
-4. **Seamless Integration**: CometChat sends AG-UI messages to your agent and streams responses
+4. **Seamless Integration**: CometChat sends Custom Agent events to your agent and streams responses
### Key Benefits
@@ -31,20 +31,20 @@ CometChat's "Bring Your Own Agent" (BYOA) feature allows you to integrate your c
---
-## Building an AG-UI Compatible Agent
+## Building a Custom Agent
### Core Requirements
-An AG-UI compatible agent must:
+A Custom Agent implementation must:
1. **Accept POST requests** with `RunAgentInput` body
2. **Return streaming responses** as Server-Sent Events (SSE)
-3. **Emit AG-UI events** in the correct sequence
+3. **Emit Custom Agent events** in the correct sequence
4. **Handle errors gracefully** with `RUN_ERROR` events
### RunAgentInput Interface
-Every AG-UI agent receives this input:
+Every Custom Agent implementation receives this input:
```typescript
interface RunAgentInput {
@@ -119,4 +119,3 @@ app.post('/agent', async (req, res) => {
```
---
-
diff --git a/ai-agents/cometchat-ag-ui-express.mdx b/ai-agents/cometchat-ag-ui-express.mdx
index ca920fd8e..cfc30e4f2 100644
--- a/ai-agents/cometchat-ag-ui-express.mdx
+++ b/ai-agents/cometchat-ag-ui-express.mdx
@@ -1,7 +1,7 @@
---
-title: "AG-UI Express.js Implementation"
+title: "Custom Agent Express.js Implementation"
sidebarTitle: "Express.js"
-description: "Implementation guide for building an AG-UI agent with Express.js."
+description: "Implementation guide for building a Custom Agent with Express.js."
---
### Prerequisites
@@ -14,8 +14,8 @@ description: "Implementation guide for building an AG-UI agent with Express.js."
```bash
# Create project directory
-mkdir my-ag-ui-agent
-cd my-ag-ui-agent
+mkdir my-custom-agent
+cd my-custom-agent
# Initialize package.json
npm init -y
@@ -71,7 +71,7 @@ const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});
-// Event encoder for AG-UI events
+// Event encoder for Custom Agent events
class EventEncoder {
encode(event: any): string {
return `data: ${JSON.stringify(event)}\n\n`;
@@ -82,7 +82,7 @@ class EventEncoder {
}
}
-// AG-UI Agent Endpoint
+// Custom Agent Endpoint
app.post('/agent', async (req: Request, res: Response) => {
const input: RunAgentInput = req.body;
const encoder = new EventEncoder();
@@ -101,7 +101,7 @@ app.post('/agent', async (req: Request, res: Response) => {
runId: input.runId,
}));
- // Convert AG-UI messages to OpenAI format
+ // Convert Custom Agent messages to OpenAI format
const openaiMessages = input.messages.map((msg) => ({
role: msg.role as 'user' | 'assistant' | 'system',
content: msg.content || '',
@@ -113,7 +113,7 @@ app.post('/agent', async (req: Request, res: Response) => {
} : {})
}));
- // Convert AG-UI tools to OpenAI format
+ // Convert Custom Agent tools to OpenAI format
const openaiTools = input.tools?.map((tool) => ({
type: 'function' as const,
function: {
@@ -213,7 +213,7 @@ app.get('/health', (req: Request, res: Response) => {
// Start server
app.listen(port, () => {
- console.log(`🚀 AG-UI Agent server running on port ${port}`);
+ console.log(`🚀 Custom Agent server running on port ${port}`);
console.log(`📍 Agent endpoint: http://localhost:${port}/agent`);
console.log(`💚 Health check: http://localhost:${port}/health`);
});
@@ -234,7 +234,7 @@ Update `package.json`:
```json
{
- "name": "my-ag-ui-agent",
+ "name": "my-custom-agent",
"version": "1.0.0",
"scripts": {
"dev": "nodemon --exec ts-node src/server.ts",
@@ -277,4 +277,3 @@ curl -X POST http://localhost:8000/agent \
```
---
-
diff --git a/ai-agents/cometchat-ag-ui-nestjs.mdx b/ai-agents/cometchat-ag-ui-nestjs.mdx
index 0f6bbf5ea..1d59678da 100644
--- a/ai-agents/cometchat-ag-ui-nestjs.mdx
+++ b/ai-agents/cometchat-ag-ui-nestjs.mdx
@@ -1,7 +1,7 @@
---
-title: "AG-UI NestJS Implementation"
+title: "Custom Agent NestJS Implementation"
sidebarTitle: "NestJS"
-description: "Implementation guide for building an AG-UI agent with NestJS."
+description: "Implementation guide for building a Custom Agent with NestJS."
---
### Prerequisites
@@ -18,10 +18,10 @@ description: "Implementation guide for building an AG-UI agent with NestJS."
npm i -g @nestjs/cli
# Create new project
-nest new my-ag-ui-agent
+nest new my-custom-agent
# Navigate to project
-cd my-ag-ui-agent
+cd my-custom-agent
# Install additional dependencies
npm install @ag-ui/core openai uuid @nestjs/config
@@ -106,7 +106,7 @@ export class AgentService {
runId: input.runId,
});
- // Convert AG-UI messages to OpenAI format
+ // Convert Custom Agent messages to OpenAI format
const openaiMessages = input.messages.map((msg) => ({
role: msg.role as 'user' | 'assistant' | 'system',
content: msg.content || '',
@@ -118,7 +118,7 @@ export class AgentService {
} : {})
}));
- // Convert AG-UI tools to OpenAI format
+ // Convert Custom Agent tools to OpenAI format
const openaiTools = input.tools?.map((tool) => ({
type: 'function' as const,
function: {
@@ -293,7 +293,7 @@ async function bootstrap() {
await app.listen(port);
- console.log(`🚀 AG-UI Agent server running on port ${port}`);
+ console.log(`🚀 Custom Agent server running on port ${port}`);
console.log(`📍 Agent endpoint: http://localhost:${port}/agent`);
}
@@ -333,4 +333,3 @@ curl -X POST http://localhost:8000/agent \
```
---
-
diff --git a/ai-agents/crew-ai-knowledge-agent.mdx b/ai-agents/crew-ai-knowledge-agent.mdx
index 68ba3d7bd..d1f32360e 100644
--- a/ai-agents/crew-ai-knowledge-agent.mdx
+++ b/ai-agents/crew-ai-knowledge-agent.mdx
@@ -136,6 +136,6 @@ crew = Crew(agents=[agent], tasks=[task], process=Process.sequential)
## Wire it to CometChat
- Dashboard → **AI Agent → BYO Agents** and then **Get Started / Integrate → Choose CrewAI**. → **Agent ID** (e.g., `knowledge`) → **Deployment URL** = your public `/stream`.
-- The SSE stream is newline-delimited JSON; CometChat AG-UI adapters parse `text_start`/`text_delta`/`text_end` and stop on `done`. Message IDs, thread IDs, and run IDs are included for threading.
+- The SSE stream is newline-delimited JSON; CometChat Custom Agent adapters parse `text_start`/`text_delta`/`text_end` and stop on `done`. Message IDs, thread IDs, and run IDs are included for threading.
- Use namespaces to keep customer/workspace data separate; pass `namespace` in the payload or inside `tool_params.namespace` (either works; defaults to `default` if omitted).
- Keep secrets server-side; add auth headers on the FastAPI route if needed.
diff --git a/docs.json b/docs.json
index 6fe2a0c07..2bf7e342d 100644
--- a/docs.json
+++ b/docs.json
@@ -5049,7 +5049,7 @@
]
},
{
- "dropdown": "AG-UI",
+ "dropdown": "Custom Agent",
"icon": "/images/icons/agui.svg",
"pages": [
"/ai-agents/ag-ui",
@@ -5936,4 +5936,4 @@
"redirect": true
}
}
-}
\ No newline at end of file
+}
diff --git a/images/icons/agui.svg b/images/icons/agui.svg
index 9fe2e620b..a3f5dee04 100644
--- a/images/icons/agui.svg
+++ b/images/icons/agui.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
From 116dc730144ca4449a8543cec87d3cc91120f43d Mon Sep 17 00:00:00 2001
From: Swapnil Godambe
Date: Fri, 13 Feb 2026 22:14:13 +0530
Subject: [PATCH 2/2] removes jsx
---
ai-agents.mdx | 2 +-
...oa.mdx => cometchat-custom-agent-byoa.mdx} | 0
...mdx => cometchat-custom-agent-express.mdx} | 0
....mdx => cometchat-custom-agent-nestjs.mdx} | 0
...i-actions.mdx => custom-agent-actions.mdx} | 0
...ag-ui-tools.mdx => custom-agent-tools.mdx} | 0
ai-agents/{ag-ui.mdx => custom-agent.mdx} | 0
docs.json | 38 +++++++++++++++----
images/icons/{agui.svg => custom-agent.svg} | 0
9 files changed, 32 insertions(+), 8 deletions(-)
rename ai-agents/{cometchat-ag-ui-byoa.mdx => cometchat-custom-agent-byoa.mdx} (100%)
rename ai-agents/{cometchat-ag-ui-express.mdx => cometchat-custom-agent-express.mdx} (100%)
rename ai-agents/{cometchat-ag-ui-nestjs.mdx => cometchat-custom-agent-nestjs.mdx} (100%)
rename ai-agents/{ag-ui-actions.mdx => custom-agent-actions.mdx} (100%)
rename ai-agents/{ag-ui-tools.mdx => custom-agent-tools.mdx} (100%)
rename ai-agents/{ag-ui.mdx => custom-agent.mdx} (100%)
rename images/icons/{agui.svg => custom-agent.svg} (100%)
diff --git a/ai-agents.mdx b/ai-agents.mdx
index 7bbbfe6de..3fff390ea 100644
--- a/ai-agents.mdx
+++ b/ai-agents.mdx
@@ -84,7 +84,7 @@ Because CometChat AI Agents are model-agnostic, you can swap providers or upgrad