mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-20 12:34:21 +00:00
e9dd584792
* 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.
11 KiB
11 KiB
生产级 AI 即时通信机器人开发平台。
快速构建、调试和部署 AI 机器人到微信、QQ、飞书、Slack、Discord、Telegram 等平台。
English / 简体中文 / 繁體中文 / 日本語 / Español / Français / 한국어 / Русский / Tiếng Việt
LangBot 是一个开源的生产级平台,用于构建 AI 驱动的即时通信机器人。它将大语言模型(LLM)连接到各种聊天平台,帮助你创建能够对话、执行任务、并集成到现有工作流程中的智能 Agent。
核心能力
- AI 对话与 Agent — 多轮对话、工具调用、多模态、流式输出。自带 RAG(知识库),深度集成 Dify、Coze、n8n、Langflow、Deerflow、Weknora等 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
一键云部署
更多方式: Docker · 手动部署 · 宝塔面板 · Kubernetes
支持的平台
| 平台 | 状态 | 备注 |
|---|---|---|
| ✅ | 个人号、官方机器人(频道、私聊、群聊) | |
| 微信 | ✅ | 个人微信、微信公众号 |
| 企业微信 | ✅ | 应用消息、对外客服、智能机器人 |
| 飞书 | ✅ | 官方 |
| 钉钉 | ✅ | 官方 |
| Satori | ✅ | |
| Discord | ✅ | 官方 |
| Telegram | ✅ | 官方 |
| Slack | ✅ | 官方 |
| LINE | ✅ | 官方 |
| KOOK | ✅ | 官方 |
| ✅ | 只 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 | 聚合平台 | ✅ |
| 小马算力 | 聚合平台 | ✅ |
| 百宝箱Tbox | 智能体平台 | ✅ |
| 七牛云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 友好 —— 你的编码 Agent(Claude 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 Server,Agent 可搜索和查看插件 / MCP / Skill 市场,使用 Personal Access Token 鉴权。
社区
Star 趋势
贡献者
感谢所有贡献者对 LangBot 的帮助:
