Skip to main content
Lucid routes messages between users and agents across multiple communication channels. All channel interactions flow through Lucid’s webhook infrastructure, ensuring every message generates a verifiable receipt.

Architecture

Channel Routing Flow

When a message arrives from any channel:
  1. Webhook reception — Lucid receives the platform webhook at /v1/webhooks/:provider
  2. Identity resolution — Maps the platform user to a Lucid user (auto-provisioned if Telegram-only)
  3. Agent binding — Looks up which agent is bound to this chat/channel
  4. Message forwarding — Sends the message to the agent’s runtime
  5. Receipt creation — Every interaction produces a cryptographic receipt
  6. Response routing — Agent’s response is sent back to the originating channel

Telegram

The deepest integration. Users can deploy and manage agents entirely from Telegram.

Bot Commands

User Provisioning

Telegram-only users are auto-provisioned: the create_telegram_user() database function creates a profile, organization, and free plan in a single transaction. Web users link their Telegram via a deep link from the dashboard (t.me/bot?start=link_TOKEN).

Billing Gate

Before deploying, checkLaunchAllowed() verifies the user’s plan permits additional agents:

Discord and Slack

Bring your own bot token. Configure via environment variables at launch time:
Messages from these platforms are received via provider-specific webhook endpoints, then forwarded to the bound agent.

HTTP (Direct API)

Agents are always accessible via their HTTP endpoint, independent of any messaging channel: