---
name: bijection-clawdbot-hub
description: "Evaluate and integrate the Clawdbot Hub component with Bijection."
---

# Clawdbot Hub

Message hub component for ClawdBot — webhook processing, session management, conversation history, and multi-gateway support for Bijection

- Package: @bijectionhq/clawdbot-hub
- Category: Messaging
- Status: Preview
- License: MIT
- Bijection source (repository access required): https://github.com/bijectionhq/clawdbot-hub/tree/b0d9c111a9fe982b121ec0a5bca8babd80914c86
- Upstream: https://github.com/TimpiaAI/convex-clawdbot-hub/tree/007bdd11b66fbe4aab221a541217edc9372e86f0
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/clawdbot-hub

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/clawdbot-hub.git
cd clawdbot-hub
git checkout b0d9c111a9fe982b121ec0a5bca8babd80914c86
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This is a source candidate for evaluation. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes convex-clawdbot-hub. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


# ClawdBot Message Hub

## Instructions

Use ClawdBot Message Hub to complete backend infrastructure for multi-platform ai chatbots with webhook processing, session management, and conversation history on convex. This Convex component integrates directly with your backend.

### Installation

```bash
npm install convex-clawdbot-hub
```

### Capabilities

- Handle the full message lifecycle from webhook ingestion to conversation history automatically
- Support multiple platforms (WhatsApp, Telegram, Discord, Slack) with unified session management
- Get automatic message deduplication and TTL-based cleanup to prevent duplicates and manage storage
- Access real-time conversation data with paginated history and reactive subscriptions

## Examples

### how to build multi-platform chatbot backend with session management

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).

### webhook processing and message deduplication for chatbots

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.

### conversation history and threading for AI chatbots

Use getMessages for paginated conversation history and getThread for threaded conversations. The component provides real-time subscriptions through getLatestMessages for live dashboard updates.

### chatbot session management across multiple channels

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.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by ClawdBot Message Hub is not needed

## Troubleshooting

**What platforms does ClawdBotHub support for chatbot integration?**

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.

**How does session scoping work in ClawdBotHub?**

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.

**Does ClawdBotHub handle message deduplication automatically?**

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.

**How do I get real-time updates for chatbot conversations?**

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.

**Can I use TypeScript generics with ClawdBotHub for type safety?**

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.

## Resources

- [npm package](https://www.npmjs.com/package/convex-clawdbot-hub)
- [GitHub repository](https://github.com/TimpiaAI/convex-clawdbot-hub)
- [Live demo](https://clawdbot-hub-demo.vercel.app/)
- [Convex Components Directory](https://www.convex.dev/components/convex-clawdbot-hub)
- [Convex documentation](https://docs.convex.dev)