1. Overview

There are various IM platforms in the market, each with different methods for bot integration and varying levels of difficulty, making it challenging to quickly connect to LLMOps platforms like Dify and leverage its powerful ecosystem. With LangBot, you can quickly integrate Dify with platforms such as QQ, WeChat, Feishu, DingTalk, Telegram, Discord, and Slack to provide services. Additionally, LangBot offers extension mechanisms and a rich ecosystem to flexibly meet your needs.

2. Deploying LangBot

2.1. Deploying LangBot

You can deploy LangBot in three ways:

  1. Docker deployment: Link
  2. Manual deployment: Link
  3. Deployment using aaPanel: Link

2.2. Connecting to Messaging Platforms

Refer to this page to choose your messaging platform, such as Slack, Lark, DingTalk, Telegram, Discord, etc.

3. Integrating with Dify

LangBot uses Pipelines to control message processing. When first started, LangBot automatically creates a default pipeline. Go to the pipeline configuration page and click to open the pipeline configuration.
Select the AI tab and switch the runner to Dify Service API.

Fill in your Dify service’s API endpoint address, Dify application type, and API Key. After completion, you can chat with the bot in your instant messaging software.

When using workflow applications, please use summary as the key to return workflow execution results.

When using workflows, LangBot will explicitly pass the following parameters, which you can add in the start node of your Dify workflow:

  • user_message_text: Plain text of user message
  • session_id: User session ID, person_<id> for private chats, group_<id> for group chats
  • conversation_id: String, user session ID generated by LangBot. Regenerated when user resets session
  • msg_create_time: Numeric type, timestamp (in seconds) when message was received

You can customize any variables through plugins

  • For detailed instructions, please refer to the LangBot documentation

4. Demo

Below shows Discord and Slack examples only. Other platforms like Lark, DingTalk, Telegram can also be integrated