Skip to main content
LangBot is an open-source large language model (LLM) native instant messaging bot platform designed to provide an out-of-the-box IM bot development experience. It features Agent, RAG, MCP, and various other LLM application capabilities, and is compatible with major global instant messaging platforms such as Feishu (Lark), DingTalk, QQ, WeCom, Discord, and Slack. It also provides a rich set of APIs to support custom development. With Myrouter’s model API service, LangBot can connect to mainstream domestic and international models such as Claude-sonnet-4-5, GPT-5, GPT-4o, and Gemini-2.5-pro. Users can choose models as needed to suit different scenario requirements.

Myrouter × LangBot Configuration Guide

1. Obtain an API Key

Visit Myrouter to register and log in. Enter invitation code [YGHNZ0] during registration to receive a $2 sign-up bonus.

(1) Obtain an API Key

Open the [API Key] management page, click the Add button, enter a custom key name, and generate an API key.

(2) Generate and Save the API Key

!! Note: The key is stored encrypted on the server and cannot be viewed again after creation. Please save your key securely. If lost, you will need to delete it from the console and create a new one.

(3) Obtain the Model ID

Recommended Model IDs:
  • Claude-sonnet-4-5
  • Gpt-5
  • Gpt-4o
  • Gemini-2.5-pro
For other model IDs, maximum context lengths, and pricing, refer to the Model Hub.

2. Deploy and Configure LangBot

LangBot can be conveniently deployed on Windows, Mac, and Linux via Docker. Before deployment, please ensure Git, Docker, and Docker Compose are installed. Project URL: https://github.com/RockChinQ/LangBot

(1) Deploy LangBot via Docker

Clone the project with Git:
git clone https://github.com/langbot-app/LangBot
cd LangBot/docker
Start the container:
docker compose up
  • If your host is located in mainland China, you can change the URL in the command above from https://github.com/langbot-app/LangBot to https://gitcode.com/RockChinQ/LangBot to use a domestic mirror.
  • If your host is located in mainland China, you can consider changing the image name in the docker-compose.yaml file to docker.langbot.app/langbot-public/rockchin/langbot:latest to use the provided mirror.
  • It is recommended to set up Docker container proxy to ensure smooth network access during LangBot runtime.

(2) Create Configuration Files

On first startup, a prompt to create configuration files will be displayed. Please continue following the file configuration instructions. The container maps port 5300 for WebUI access. You can visit http://127.0.0.1:5300 to view the WebUI. Ports 2280-2290 are also mapped for reverse connection by messaging platform adapters using the OneBot protocol.

(3) Configure the Conversation Model

Open LangBot, click Model Configuration, and select Myrouter as the model provider. Configure the model with the following information:
  • Model Name: The desired model name copied from the Myrouter website
  • Model Provider: Myrouter
  • Request URL: https://api.myrouter.ai/openai
  • API Key: The key saved from the Myrouter website

3. Connect to a Platform

LangBot supports connecting chatbots to platforms such as QQ, WeChat Official Accounts, and Feishu (Lark). Using DingTalk as an example, here is the LangBot integration tutorial.

(1) Create a Bot

Go to the DingTalk Developer Portal, log in, and enter your organization. URL: https://open-dev.dingtalk.com/ Click [App Development] at the top, select [Create Application], fill in the bot’s basic information, and save. Go to the bot’s management dashboard. For example, if we have a bot called langbot2, its management page looks like this:

(2) Configure the Bot

Select [Add App Capability] to add bot functionality to the application. Click the [Bot] tab on the left, fill in the bot configuration information, complete the name, description, message name, and other basic settings. Once configured, click Publish. After successful publication, click [Version Management & Release] at the bottom left, and configure the application version number and description. If this is your first time creating a bot, the right side will be empty. You need to click [Create New Version], set the information, then configure [App Visibility Scope], and click Save. For [Event Subscription], select [Stream Mode] — no public callback URL registration is required. Click [Credentials & Basic Info] and record the Client ID and Client Secret. Click the Bot tab on the left and record the RobotCode and bot name. After recording the above configuration items, fill them into the LangBot bot configuration form. Go to the Card Platform template list, copy and bind the corresponding template ID, and enter it in the card template ID field. Start LangBot, edit the bot, and bind a pipeline (an initial ChatPipeline will be available). Select DingTalk as the platform. Edit the pipeline. In the AI Capability Configuration section, select Built-in Agent and choose the previously bound desired model.

(3) Add the Bot

Search for the bot name you just configured in DingTalk and click on it to start chatting. If you want to add the bot to a group, click [Group Management] in the DingTalk group, select [Add Bot], and search for the bot name to use it in group chats.