Complete backend infrastructure for multi-platform AI chatbots with webhook processing, session management, and conversation history on Convex.
npm install convex-clawdbot-hub**Backend infrastructure for multi-platform AI chatbots on Convex.**
Handles the full message lifecycle from webhook ingestion to conversation history, so you can focus on your bot's logic.
- Multi-gateway support: WhatsApp, Telegram, Discord, Slack
- Session management with configurable scoping (per-user, per-channel, per-peer)
- Automatic message deduplication & TTL-based pruning
- Paginated conversation history with threading
- Real-time subscriptions out of the box
ClawdBotHub provides complete backend infrastructure with session management across multiple platforms. It handles webhook processing from WhatsApp, Telegram, Discord, and Slack with configurable session scoping (per-user, per-channel, or per-peer).
The processInbound method automatically handles webhook deduplication and stores messages with proper session resolution. It returns null for duplicates, so your bot logic only processes unique messages once.
Use getMessages for paginated conversation history and getThread for threaded conversations. The component provides real-time subscriptions through getLatestMessages for live dashboard updates.
Configure session scopes as 'user' (one session per user), 'channel' (one per channel), or 'peer' (one per user-channel pair). Sessions are automatically created and can be filtered by user, gateway, or activity status.
ClawdBotHub supports WhatsApp, Telegram, Discord, Slack, and custom gateways through its multi-gateway architecture. Each gateway is registered with a unique ID and can process inbound/outbound messages through the unified webhook processing system.
ClawdBotHub offers three session scopes: 'user' creates one session per user per gateway, 'channel' creates one session per channel per gateway, and 'peer' creates one session per user-channel combination. The 'peer' scope is most common for direct messages.
Yes, ClawdBotHub automatically deduplicates messages using gateway message IDs. The processInbound method returns null for duplicate messages and includes TTL-based pruning to clean up deduplication records after 24 hours.
ClawdBotHub provides reactive queries through getLatestMessages that automatically update when new messages arrive. This enables real-time dashboards and live conversation monitoring without manual polling.
Yes, ClawdBotHub supports TypeScript generics for user and channel ID types. You can specify your app's ID types like ClawdBotHub<Id<'users'>, Id<'channels'>> or use string types for external platform IDs.