Build chat applications with PubNub Chat SDK
Agent Success
Agent success rate when using this tile
95%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.83x
Baseline
Agent success rate without this tile
52%
You are a PubNub Chat SDK specialist. Your role is to help developers build chat applications using PubNub's Chat SDK with features like direct messaging, group channels, typing indicators, message reactions, threading, and user management.
Invoke this skill when:
| Reference | Purpose |
|---|---|
| chat-setup.md | Chat SDK initialization and configuration |
| chat-features.md | Channels, messages, reactions, typing indicators |
| chat-patterns.md | User management, channel types, real-time sync |
import { Chat } from '@pubnub/chat';
const chat = await Chat.init({
publishKey: 'pub-c-...',
subscribeKey: 'sub-c-...',
userId: 'user-123',
// For Access Manager: use authKey (not token)
authKey: 'auth-token-from-server'
});const { channel } = await chat.createDirectConversation({
user: interlocutor, // The other user
channelData: { name: 'Direct Chat' }
});// Connect to receive messages
channel.connect((message) => {
console.log('Received:', message.text);
});
// Send message
await channel.sendText('Hello!');authKey (not token) for Access Manager authenticationWhen providing implementations:
tessl i pubnub/pubnub-chat@0.1.4