AI Agent Component Spec
AI Agent Component Spec
Overview
This guide shows you how to add collaborative document editing to your chat. Documents let users create and edit shared documents together in real-time, similar to Google Docs. Time estimate: 5 minutesDifficulty: Beginner
Prerequisites
- React.js setup complete
- Groups configured
- CometChat account with Collaboration extensions
Steps
Step 1: Enable Document Extension
- Go to your CometChat Dashboard
- Navigate to Extensions → Collaboration
- Enable Collaborative Document
Step 2: Auto-Integration
Once enabled, documents automatically integrate into your chat:
Step 3: Create a Document
Users can create documents through the UI:- Click the attachment/action button in the message composer
- Select “Collaborative Document”
- A document session is created and shared in the chat
Step 4: Edit Documents Together
When a document message appears:- Click the document message to open the editor
- All participants can edit simultaneously
- Changes sync in real-time
Complete Example
Full group chat with documents:Advanced Configuration
Advanced Configuration
Styling
Customize document message appearance:Common Issues
| Issue | Solution |
|---|---|
| Document button not showing | Enable extension in Dashboard |
| Can’t edit document | Check if session is still active |
| Changes not syncing | Verify network connectivity |
| Session expired | Create a new document session |