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

# Dify Agent を Discord・Telegram・Slack で動かす

> Finally Got My Dify Agent Working in Discord, Telegram and Slack

この記事は LangBot Blog から同期されています。 [Blog の原文を読む](https://langbot.app/en/blog/dify-agent-discord-telegram-slack).

公開日：2025-12-11 · 著者：LangBot Team

> この記事の日本語版はまだ公開されていないため、英語版を掲載しています。

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/source/images/covers/dify-agent.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=916e9c75631c436c568c3b5a5190fa32" alt="Finally Got My Dify Agent Working in Discord, Telegram and Slack" width="1200" height="630" data-path="images/articles/source/images/covers/dify-agent.png" />

Want your Dify Agent to break free from the browser and chat directly in WeChat, QQ, or Telegram? Combine LangBot with Dify and you can set it up in under 10 minutes.

## Why This Combo?

[**LangBot**](https://github.com/langbot-app/LangBot) is the most powerful open-source multi-platform chatbot framework available. It supports major Chinese IMs (QQ, WeChat, Feishu, DingTalk) and international platforms (Telegram, Discord, Slack, LINE). Its core strength is connecting AI backends to messaging apps.

**Dify** is one of the hottest AI app development platforms, offering visual Agent orchestration, 50+ built-in tools, and RAG knowledge bases. Together, they let you build a multi-platform AI assistant fast.

## Deploy LangBot

Three commands with uvx:

```bash theme={null}
mkdir langbot-instance
cd langbot-instance
uvx langbot@latest
```

Visit `http://127.0.0.1:5300` and register an admin account:

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/c6d52212ba91-02-langbot-dashboard.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=164ee0e3d0fa833a07d2ce6e83d3bc6b" alt="LangBot Dashboard" width="1870" height="880" data-path="images/articles/external/c6d52212ba91-02-langbot-dashboard.png" />

## Create a Dify Agent

Log in to [cloud.dify.ai](https://cloud.dify.ai) and create a new app. Choose **Agent** type - unlike basic chat apps, Agents can reason autonomously and call tools for complex tasks.

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/3e5b1d8ec6ec-07-dify-create-app-types.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=1546dd94a4668e4805d2cec0c6b30c3e" alt="Select Agent Type" width="1870" height="880" data-path="images/articles/external/3e5b1d8ec6ec-07-dify-create-app-types.png" />

### Configure the Agent

In the orchestration interface, set up:

**System Instructions** - Define the Agent's role:

```
You are an intelligent assistant that helps users complete various tasks. You have the following capabilities:
1. Answer various user questions
2. Query weather information
3. Retrieve webpage content

Please always maintain a friendly and professional attitude. If you need to use tools to get information, proactively call the relevant tools.
```

**Add Tools** - Pick from Dify's 50+ built-in tools, like Weather and Web Scraper:

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/9066d99b172c-11-dify-tools-panel.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=9094db69691f7ab7b38e471209bb9753" alt="Add Tools" width="1870" height="880" data-path="images/articles/external/9066d99b172c-11-dify-tools-panel.png" />

**Select Model** - Supports GPT, Claude, Gemini, DeepSeek, and other major LLMs.

Final configuration:

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/be278ca435e8-12-dify-agent-configured.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=7df15dcaa46c1bc6f49ca2842878973f" alt="Configuration Complete" width="1870" height="880" data-path="images/articles/external/be278ca435e8-12-dify-agent-configured.png" />

### Get the API Key

Click "Publish", then go to "Access API" to create a key:

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/471b316018e5-13-dify-api-key-created.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=dd944e50bd6928756873642306e0c928" alt="Create API Key" width="1870" height="880" data-path="images/articles/external/471b316018e5-13-dify-api-key-created.png" />

Save the API key and server address `https://api.dify.ai/v1`.

## Connect Dify to LangBot

Back in LangBot, go to Pipelines > ChatPipeline > AI Capability:

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/8f4b3820ed5b-14-langbot-pipeline-ai-capability.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=3d79ea22d664e96a31c024f1517ae6c4" alt="AI Capability Config" width="1870" height="880" data-path="images/articles/external/8f4b3820ed5b-14-langbot-pipeline-ai-capability.png" />

Select **Dify Service API** as the Runner:

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/efa6fcae9c58-15-langbot-runner-dropdown.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=777c1a0d63c4e64477819cf9d0349dc2" alt="Select Dify Runner" width="1870" height="880" data-path="images/articles/external/efa6fcae9c58-15-langbot-runner-dropdown.png" />

Enter the configuration:

* **Base URL**: `https://api.dify.ai/v1`
* **API Key**: The key you just created
* **App Type**: Chat (including Chatflow)

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/74f71a8bf1dc-17-langbot-dify-api-key-entered.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=63058eef31bccc0076b847b9efdb6390" alt="Enter Configuration" width="1870" height="880" data-path="images/articles/external/74f71a8bf1dc-17-langbot-dify-api-key-entered.png" />

Save and click "Debug Conversation" to test:

<img src="https://mintcdn.com/langbot/NbRS7zTwu8_8-9J1/images/articles/external/9999c12907eb-20-langbot-chat-test.png?fit=max&auto=format&n=NbRS7zTwu8_8-9J1&q=85&s=c038a15046efdfe00e4c9e8aa840242f" alt="Test Conversation" width="1870" height="880" data-path="images/articles/external/9999c12907eb-20-langbot-chat-test.png" />

If the Agent responds correctly and calls tools, the integration is working.

## Why This Architecture Rocks

* **Decoupled Design**: Agent capabilities live in Dify, LangBot handles message routing - each does what it's best at
* **One Config, Multi-Platform**: Same Agent serves QQ, WeChat, Telegram, and more simultaneously
* **Easy to Extend**: Add RAG knowledge bases, Workflow orchestration, or more tools in Dify later

## Next Steps

* Configure messaging platforms in LangBot (QQ bot, WeChat personal account, etc.)
* Add more tools in Dify (database queries, API calls)
* Try Dify Chatflow for complex conversation flows

If you're using n8n, FastGPT, Coze, or Langflow, LangBot supports those too.

***

**Resources**

* [LangBot Docs](https://docs.langbot.app) | [GitHub](https://github.com/langbot-app/LangBot)
* [Dify Docs](https://docs.dify.ai) | [Cloud Platform](https://cloud.dify.ai)
