> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LangBot

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](https://myrouter.ai/) 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.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/apikey-management.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=65263e1d15d56052d60eb823261e1301" alt="" width="1280" height="692" data-path="images/apikey-management.png" />

### **(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.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/apikey-list.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=21130759a894017e516f09b3874be05d" alt="" width="1280" height="411" data-path="images/apikey-list.png" />

### **(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](https://myrouter.ai/models-console/library).

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/model-square.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=b76ce600b5eb58db723e1f4975dfef3d" alt="" width="1280" height="903" data-path="images/model-square.png" />

## 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](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](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](https://api.myrouter.ai/openai)*
* API Key: The key saved from the Myrouter website

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/langbot-create-model.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=01dadce64188c913d934fd059f1e94f5" alt="" width="981" height="1280" data-path="images/langbot-create-model.png" />

## **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/](https://open-dev.dingtalk.com/)*

Click \[App Development] at the top, select \[Create Application], fill in the bot's basic information, and save.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/langbot-dingding-1.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=5ac6393a1c05359913e0343d90558b09" alt="" width="1280" height="648" data-path="images/langbot-dingding-1.png" />

Go to the bot's management dashboard. For example, if we have a bot called langbot2, its management page looks like this:

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/langbot-dingding-2.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=82db1e5c4ddfeb3cd3c60cfe4cfbd99c" alt="" width="1280" height="582" data-path="images/langbot-dingding-2.png" />

### **(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.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/langbot-dingding-3.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=686c1926579cfb046f4dc85d8d3fe950" alt="" width="1280" height="642" data-path="images/langbot-dingding-3.png" />

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.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/langbot-dingding-4.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=c25be8a4d1ea8c387a766774ab4ddf4f" alt="" width="1280" height="620" data-path="images/langbot-dingding-4.png" />

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](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV) template list, copy and bind the corresponding template ID, and enter it in the card template ID field.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/langbot-dingding-5.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=38c4d9d16b930a7fdf415e0bb96397cf" alt="" width="797" height="1280" data-path="images/langbot-dingding-5.png" />

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.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/langbot-dingding-6.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=be946b9634a33bf22ba078458aa8855d" alt="" width="1280" height="1121" data-path="images/langbot-dingding-6.png" />

### **(3) Add the Bot**

Search for the bot name you just configured in DingTalk and click on it to start chatting.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/langbot-dingding-7.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=7930af18a76fd4253e2a528643cd2c1c" alt="" width="1013" height="629" data-path="images/langbot-dingding-7.png" />

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.
