LangBot Docs

Chat

LangBot Chats connect AI orchestration platforms (Dify, Coze, n8n, Langflow) to your messaging bots. Learn how they work.

A Chat (formerly Pipeline) defines how AI handles and answers messages: which runner, model and prompt to use, and which plugin tools, MCP servers and skills the AI may call. In a bot's event routing, hand "message received" to a Chat; one Chat can be used by several bots.

LangBot automatically creates a default Chat when first started. A new bot routes its messages to the default Chat. When you create the first model, it becomes the default Chat's model.

Trigger settings (group response rules, access control, ignore rules, message aggregation), safety (content filter, rate limit) and general output (long text, forced delay, @sender, quote, exception notices) have moved to the bot's "Message policy", and plugin commands and event listeners are now enabled on the bot. See Bots. The plugin list in a Chat only controls which plugin tools the AI may call.

arch

You can create multiple Chats for different bots to adapt to different scenarios.

A Chat can be configured with the following features:

AI Capabilities

You can choose to use: Built-in Agent, Dify, n8n

AI capabilities are mainly divided into two parts: selecting the runner and configuring runner parameters.

The runner defines how to schedule the large model to process messages. The default is Built-in Agent, which is a multi-round Agent strategy implemented by LangBot. Only when this runner is selected will the models and tools configured internally in LangBot be used.

edit_pipeline

You can also choose to use external Agent platforms such as Dify, n8n. In this case, the models, prompts, tools, and other resources used will be provided by the Agent platform.

more_runner

Group chat context

Group chat context under Runner decides how conversation memory is split in group chats:

  • Separate for each member (default): every member has their own conversation. The bot remembers what that member said before, without mixing in other members' conversations.
  • Shared by the group: the whole group uses one conversation, so the bot sees everyone's earlier messages.

The setting applies to the built-in Agent, the conversation that external Agent platforms (such as Dify) receive, sandbox sessions, and the scope of "Reset context". Private chats are not affected; access control, group response rules and rate limits in the bot message policy still apply to the whole group.

Chats that never saved this setting also use "Separate for each member". To keep one conversation per group, switch the Chat to "Shared by the group".

In the bot's session monitor, group chats are always listed per member. Click "Same group" to see only the sessions of that group. When you reset a member's session and the Chat is set to "Shared by the group", the whole group's conversation is reset, and the dialog says so.

Conversation Variables

When using external Agent platforms, LangBot explicitly passes the following parameters, which you can add to the start node of the Agent platform workflow (the image below is an example of Dify):

  • launcher_type: Launcher object type, person for private chat, group for group chat
  • launcher_id: Launcher object ID, user ID for private chat, group ID for group chat
  • sender_id: Sender ID
  • user_message_text: The plain text of the user message
  • session_id: User session ID. person_<id> for private chat; for group chat, group_<group ID> when shared by the group, or groupmember_<group ID length>_<group ID>_<sender ID> when separate for each member
  • conversation_id: String, user session ID, generated by LangBot. It will be regenerated after the user resets the session
  • msg_create_time: Numeric type, timestamp (seconds) when this message was received
  • group_name: Group name, only set when receiving group messages
  • sender_name: Sender name

You can customize any variable through plugins.

Dify Workflow Start Node Configuration

Prompt library

With the built-in Agent, the Prompt field has two buttons:

  • Prompt library opens a dialog to search reviewed prompts shared on LangBot Space. Chats show Chat prompts by default and Agents show Agent prompts; you can switch to the other kind. Choose Replace current prompt or Append to current prompt, then save.
  • Share submits the current prompt to LangBot Space. Prompts containing credentials such as API keys or tokens are refused; emails, phone numbers and internal URLs need your confirmation. A prompt becomes public once it passes review.

With a LangBot Account bound to the instance you can favorite prompts. Favorites belong to the account, so they also appear on the LangBot Space website when you sign in with it.

On the LangBot Space templates page, a prompt's Use button opens your LangBot instance (your dedicated Cloud instance if you have one, otherwise LangBot Cloud; the settings button next to it sets a self-hosted address). Pick an existing Chat or Agent, or create a new one, and the prompt is written into its prompt setting and takes effect immediately. Only runners with a prompt setting, such as the built-in Agent, can receive it.

Other Configurations

If a Chat's Runner plugin is still starting, LangBot waits up to 30 seconds for that installed, enabled plugin before reporting it unavailable. This does not install plugins or confirm permissions automatically. If the Runner is missing, open Plugins in the same Workspace to check installation, enablement and permission confirmation. For failed downloads, dependencies or initialization, inspect the installation task and Plugin Runtime logs, resolve the cause and retry. If the plugin is running but the selected Runner is absent, check the plugin version and select an available Runner in the Chat's AI settings. The monitoring error includes the failure details.

Please refer to the descriptions in the configuration form.

Deleting a Chat

A Chat that a bot's event binding still points to cannot be deleted; the error lists the bots that use it. Point those bindings at another Chat or Agent first, then delete it. The same applies to Agents.

On this page