Skip to main content

Channel Recipes

This page turns the public channel matrix into operator walkthroughs. The rule stays the same: get the local assistant path healthy first, then add one surface at a time. Do not jump straight to a multi-channel supervisor before one concrete channel already works. Keep Channel Guides open when you need the exact built-in contract for one shipped surface. This page stays narrower: it shows representative rollout patterns rather than duplicating the entire channel inventory. If you want the gateway ownership model in one place instead of the tutorial lane, continue to Gateway And Supervision. If you want the shared public channel-account and selector shape before the recipes branch into specific surfaces, start with Configuration Patterns.

Start Here

Most operators should start in one of these places:

Pick The Right Recipe

Surface Map

This page uses representative recipes, but it should still keep the shipped surface map visible.

Shared Readiness Loop

After each channel edit, use the same short loop:
doctor tells you whether provider and channel prerequisites are healthy. channels is the quickest way to see how Loong currently classifies each surface.

Reading Rule

  • Use this page when you already know the delivery lane and want concrete config or smoke tests.
  • Use Channel Guides when you need the exact built-in contract for one surface.
  • Use Configuration Patterns when you want the shared default_account, accounts.<id>, and trust-toggle shape before the per-surface walkthroughs.
  • Start with one surface only; do not jump to multi-channel supervision first.
  • Keep Feishu / Lark, Telegram, Matrix, QQ Bot, WhatsApp, and WeCom in the gateway-supervised runtime lane.
  • Keep LINE and Webhook in the standalone native-serve lane.
  • Keep email, Slack, Discord, Teams, Google Chat, Mattermost, Nextcloud Talk, Synology Chat, DingTalk, Signal, IRC, iMessage / BlueBubbles, Nostr, Tlon, and similar sinks in the outbound-only lane.
  • Jump to Common Setups when the provider and channel should be chosen together.

Need A Full Rollout Instead?

If the channel choice is already tied to a provider and operating shape, jump straight to the matching playbook.

Recipe 1: Feishu / Lark Inbound Runtime

Feishu and Lark share the same shipped runtime family, but the inbound mode matters. Webhook-mode example:
Websocket-mode example:
Smoke-test it:
When you need Feishu-specific richer payload modes such as posts, images, or files, switch to the dedicated Feishu namespace instead of widening the canonical grouped channel contract:
Use this when:
  • the team already lives in Feishu or Lark
  • you need a shipped inbound runtime rather than outbound notifications only
  • reply-loop behavior matters more than a generic webhook sink
Choose the transport on purpose: Operational notes:
  • domain = "lark" selects the Lark base URL, while domain = "feishu" keeps the Feishu lane.
  • webhook mode requires verification_token and encrypt_key
  • websocket mode should not be documented as if webhook-only secrets were mandatory
  • allowed_chat_ids remains the conversation trust boundary in both modes

Recipe 2: Telegram Reply-Loop Bot

Telegram is the simplest shipped runtime-backed lane.
Smoke-test it:
Use this when:
  • one bot token should own the lane
  • chat ids are easy to review and allowlist
  • you want the shortest path from local assistant to live reply loop
Operational note:
  • allowed_chat_ids is the trust boundary, not just a convenience list
  • if you later need several bot identities, move to default_account plus accounts.<id> instead of replacing one token repeatedly

Recipe 3: Matrix Room Sync Bot

Matrix is the right lane when room identity and homeserver control should stay explicit.
Smoke-test it:
Use this when:
  • you need a self-hosted or federated room lane
  • the homeserver boundary is part of the runtime truth
  • you want to verify the sync loop once before running it long-lived
Operational notes:
  • base_url should point at the homeserver URL, not a random Matrix web client URL
  • user_id helps self-message filtering when that matters for the room topology

Recipe 4: WeCom Official AIBot Runtime

WeCom is documented as the official AIBot long-connection lane, not as a generic webhook callback surface.
Smoke-test it:
Use this when:
  • the deployment is already standardized on WeCom
  • the official long-connection transport is the desired runtime contract
  • proactive sends and reply-loop service should share the same account identity
Operational notes:
  • the official websocket URL is used by default; override websocket_url only for controlled environments or bridge setups
  • ping_interval_s and reconnect_interval_s are the right knobs when the network path needs tuning
  • keep the docs language aligned with the shipped long-connection contract
  • do not describe a webhook callback mode as if it were the same supported path

Recipe 5: Multi-Account Feishu / Lark Or WeCom

Use multi-account config before you need gateway selectors. It keeps account ids stable and avoids rewriting one bot or app in place. Feishu / Lark example:
WeCom example:
Use this when:
  • one config should hold prod, backup, or environment-specific accounts
  • gateway or multi-channel supervision should target stable account ids
  • you want top-level defaults plus account-level overrides instead of duplicating everything
Operational notes:
  • set default_account explicitly so the default lane is not accidental
  • keep shared settings at the top level and override only the account-specific secrets or allowlists
  • channel-account selectors can target those configured ids directly, for example lark=work or wecom=alerts

Recipe 6: Standalone Native-Serve And Outbound-Only Delivery Families

Some surfaces now sit between the gateway-supervised and outbound-only stories: Loong ships a real built-in serve loop, but the runtime still belongs to the individual channels serve <surface> command. Standalone native-serve examples: LINE example:
Webhook example:
Email example:
DingTalk variant:
Use these when:
  • you need one standalone native-serve lane or one outbound-only delivery surface
  • the target system is a messaging webhook, SMTP relay, or other operator-owned delivery edge
  • the surface should remain truthful as standalone native-serve or outbound-only in public docs
Workplace-platform variant:
Slack, Discord, Teams, Google Chat, and similar outbound-only workplace surfaces follow the same direct-send pattern: keep the config explicit, use default_account plus accounts.<id> when you need several destinations, and call the corresponding loong channels send <surface> command instead of treating them as reply-loop runtimes. More delivery starting points: Trust-boundary note:
  • HTTP-backed outbound delivery blocks private or special-use hosts by default
  • if you intentionally target a private bridge or loopback endpoint, widen that boundary explicitly:

Recipe 7: One Host, Multiple Runtime-Backed Channels

Only do this after each service channel works on its own. Foreground compatibility wrapper:
Gateway-owned lane:
Use this when:
  • one machine should supervise several shipped runtime-backed surfaces
  • account ownership needs to stay explicit per channel
  • you want longer-lived service ownership instead of one-off shell sessions
Important boundary:
  • this lane is for gateway-supervised runtime-backed service channels only
  • lark= is the accepted alias for the Feishu channel family, and feishu= works too
  • selectors should reference configured account ids such as work, alerts, or bot_123456
  • standalone native-serve or outbound-only surfaces such as LINE, Webhook, Email, Slack, Discord, or Teams should not be described as if they join the same reply-loop supervisor
  • when you need the ownership and inspection model without the recipe framing, switch to Gateway And Supervision

Channel Rollout Order

  1. Get loong ask or loong chat healthy first.
  2. Add one gateway-supervised service channel, one standalone native-serve surface, or one outbound-only surface.
  3. Verify with loong doctor and loong channels.
  4. Only then graduate to gateway run or gateway run.

Continue Reading