Files
LangBot/README_TW.md
T
Junyan Chin e9dd584792 feat: MCP server + in-repo skills (agent-friendly platform) (#2269)
* feat(api): support global API key from config.yaml (api.global_api_key)

Accept a config-defined global API key anywhere a web-UI key is accepted
(X-API-Key / Bearer), with no login session and no DB record. Useful for
automated deployments and AI agents (HTTP API + MCP). Defaults to empty
(disabled); does not require the lbk_ prefix.

- templates/config.yaml: add api.global_api_key with security notes
- service/apikey.py: verify_api_key checks global key first (constant-time)
- docs/API_KEY_AUTH.md: document the global key + security guidance
- tests: cover global-key match, prefix-free, fallback-to-db, disabled

* feat(mcp): expose LangBot management as an MCP server at /mcp

Add an MCP (Model Context Protocol) server so external AI agents can manage a
LangBot instance. Reuses the same API-key auth as the HTTP API (including the
config.yaml global API key).

- pkg/api/mcp/server.py: FastMCP server wrapping the service layer; 21 curated
  tools across system/bots/pipelines/models/knowledge/mcp-servers/skills
- pkg/api/mcp/mount.py: ASGI dispatcher fronting Quart; authenticates /mcp
  requests with an API key, runs the streamable-HTTP session manager lifespan
- controller/main.py: serve the wrapped ASGI app via hypercorn (was run_task)
- web: new 'MCP' tab in the API integration dialog showing endpoint, auth, and
  client config; i18n for 8 locales
- tests/manual/mcp_smoke.py: e2e check (401 unauth, list tools, call tools)

Tool surface is intentionally curated (not all ~25 route groups) to keep the
agent surface small, safe, and maintainable. Extend deliberately.

* feat(skills): add in-repo skills/ as the single source of truth

Migrate the agent skills + QA/e2e test harness from the (now archived)
langbot-app/langbot-skills repo into LangBot/skills/, and add four new skills.

Migrated:
- langbot-plugin-dev, langbot-testing (e2e), langbot-env-setup,
  langbot-skills-maintenance, langbot-eba-adapter-dev
- the bin/lbs CLI (src/, test/, scripts/, schemas/, qa-agent-docs/)

New:
- langbot-dev      core backend + web development
- langbot-deploy   Docker/K8s deployment + config.yaml + global API key
- langbot-mcp-ops  operating the LangBot MCP server (/mcp)
- langbot-space-ops operating the Space marketplace MCP server

- src/cli.ts repoRoot(): recognize the skills assets root (skills.index.json +
  bin/lbs) so the CLI works when nested inside the LangBot repo
- README.md: unified skill catalog; skills.index.json regenerated

Parity with source verified: bin/lbs validate + node test suite match the
source repo (only the uncommitted .lbpkg build-artifact fixture differs).

* docs(agents): document agent-facing surfaces + API/MCP/skills sync rule

* docs(readme): add 'Built for AI Agents' section across all locales

Highlight MCP server, in-repo skills (single source of truth), AGENTS.md
sync rule, and llms.txt. Cross-link LangBot Space MCP marketplace.

* style(mcp): fix ruff format + prettier lint in MCP server and API panel

* style(web): prettier format MCP i18n locale entries

* docs(skills): note MCP instance control in dev/testing skills

All development-guidance skills now point to the LangBot instance MCP
server (/mcp) and the Space marketplace MCP server, reusing API keys.
2026-06-20 15:14:47 +08:00

10 KiB
Raw Blame History

LangBot

Featured|HelloGitHub

生產級 AI 即時通訊機器人開發平台。

快速建構、除錯和部署 AI 機器人到微信、QQ、飛書、Slack、Discord、Telegram 等平台。

English / 简体中文 / 繁體中文 / 日本語 / Español / Français / 한국어 / Русский / Tiếng Việt

Discord QQ Group Ask DeepWiki GitHub release (latest by date) python GitHub stars star

官網 特性 文件 API 外掛市場 路線圖


什麼是 LangBot

LangBot 是一個開源的生產級平台,用於建構 AI 驅動的即時通訊機器人。它將大語言模型(LLM)連接到各種聊天平台,幫助你創建能夠對話、執行任務、並整合到現有工作流程中的智能 Agent。

LangBot Web 管理面板儀表板 — 即時監控訊息量、模型調用、成功率與活躍工作階段

核心能力

  • AI 對話與 Agent — 多輪對話、工具調用、多模態、流式輸出。自帶 RAG(知識庫),深度整合 DifyCozen8nLangflowDeerflowWeknora等 LLMOps 平台。
  • 全平台支援 — 一套程式碼,覆蓋 QQ、微信、企業微信、飛書、釘釘、Discord、Telegram、Slack、LINE、KOOK 等平台。
  • 生產就緒 — 存取控制、限速、敏感詞過濾、全面監控與異常處理,已被多家企業採用。
  • 外掛生態 — 數百個外掛,事件驅動架構,組件擴展,適配 MCP 協議
  • Web 管理面板 — 透過瀏覽器直觀地配置、管理和監控機器人,無需手動編輯設定檔。
  • 多流水線架構 — 不同機器人用於不同場景,具備全面的監控和異常處理能力。

→ 了解更多功能特性

📍 實踐指南:5 分鐘部署多平台 AI 機器人將 DeepSeek 接入微信、企業微信與 Discord讓 Dify Agent 跑在 Discord、Telegram 和 Slack 上,以及用 n8n 建構多平台 AI 聊天機器人


快速開始

☁️ LangBot Cloud(推薦)

LangBot Cloud — 免部署,開箱即用。

一鍵啟動

uvx langbot

需要安裝 uv。訪問 http://localhost:5300 即可使用。

Docker Compose

git clone https://github.com/langbot-app/LangBot
cd LangBot/docker
docker compose up -d

一鍵雲端部署

Deploy on Zeabur Deploy on Railway

更多方式: Docker · 手動部署 · 寶塔面板 · Kubernetes


支援的平台

平台 狀態 備註
Discord 官方
Telegram 官方
Slack 官方
LINE 官方
QQ 個人號、官方機器人(頻道、私聊、群聊)
企業微信 應用訊息、對外客服、智能機器人
微信 個人微信、微信公眾號
飛書 官方
釘釘 官方
KOOK 官方
Satori
Email 只 Matrix、Satori
Matrix 支援多種橋接平台,如 Signal、WhatsApp、Messenger、iMessage、Mattermost、Google Chat、IRC、XMPP、Zulip 等

支援的大模型與整合

提供商 類型 狀態
OpenAI LLM
Anthropic LLM
DeepSeek LLM
Google Gemini LLM
xAI LLM
Moonshot LLM
智譜AI LLM
Ollama 本地 LLM
LM Studio 本地 LLM
Dify LLMOps
MCP 協議
SiliconFlow 聚合平台
阿里雲百煉 聚合平台
火山方舟 聚合平台
ModelScope 聚合平台
GiteeAI 聚合平台
勝算雲 GPU 平台
優雲智算 GPU 平台
PPIO GPU 平台
接口 AI 聚合平台
302.AI 聚合平台
Qiniu 聚合平台

TTS(語音合成)

平台/模型 備註
FishAudio 外掛
海豚 AI 外掛
AzureTTS 外掛

文生圖

平台/模型 備註
阿里雲百煉 外掛

→ 查看完整整合列表


為什麼選擇 LangBot

使用場景 LangBot 如何幫助
客戶服務 將 AI Agent 部署到微信/企微/釘釘/飛書,基於知識庫自動回答使用者問題
內部工具 將 n8n/Dify 工作流接入企微/釘釘,實現業務流程自動化
社群運營 在 QQ/Discord 群中使用 AI 驅動的內容審核與智能互動
多平台觸達 一個機器人,覆蓋所有平台。透過統一面板集中管理

線上演示

立即體驗: https://demo.langbot.dev/

  • 信箱:demo@langbot.app
  • 密碼:langbot123456

注意:公開演示環境,請不要在其中填入任何敏感資訊。

為 AI Agent 而生 🤖

LangBot 從設計上就對 Agent 友善 —— 你的編碼 AgentClaude Code、Codex、Copilot、Cursor 等)可以一等公民般地操作、擴充和部署 LangBot:

  • MCP Server —— LangBot 內建 Model Context Protocol 端點 /mcp,與 HTTP API 對齊,Agent 可程式化管理機器人、流水線、外掛和模型。使用同一套 API Key 鑑權(可在 config.yaml 設定全域 Key,或使用使用者 Key),無需登入流程。在 Web 面板的 API 與 MCP 分頁中設定。
  • 倉庫內 Skills —— skills/ 目錄是使用 LangBot 的唯一事實來源:外掛開發、核心開發、端到端測試、部署,以及操作 LangBot / LangBot Space MCP Server。把 Agent 指向這個目錄,它就知道如何動手。
  • AGENTS.md —— 每個倉庫都提供 AGENTS.md(軟連結到 CLAUDE.md),描述架構、規範,以及「API 變更必須同步更新 MCP Server 和 skills」的約定。
  • llms.txt —— 面向 LLM 的機器可讀專案上下文已發布在官網。

雲端 / 市集: LangBot Space 同樣開放 MCP ServerAgent 可搜尋和檢視外掛 / MCP / Skill 市集,使用 Personal Access Token 鑑權。


社群

Discord QQ Group


Star 趨勢

Star History Chart


貢獻者

感謝所有貢獻者對 LangBot 的幫助: