openilink-hub 搭建微信消息平台:开源自托管,20 款应用开箱即用
openilink-hub: Open-Source Self-Hosted WeChat Bot Platform with 20+ App Marketplace
本文基于 openilink/openilink-hub(MIT 协议,Go 实现)整理,涵盖部署、应用市场接入和 AI Agent 搭建三个核心环节。
一、背景
微信 ClawBot 是微信官方在 2026 年初推出的 Bot 能力,底层叫 iLink/智联协议,这是微信第一次通过正式渠道开放消息收发接口。
但 iLink 本身只是原始通道——消息进来了,怎么管理、怎么路由、怎么接第三方工具,全要自己写。openilink-hub 就是在 iLink 上封装了完整管理层的开源平台:可视化后台、应用市场、多通道分发、AI Agent 网关,一套搞定。
二、架构概览
| 层次 | 说明 |
|---|---|
| 接入层 | iLink SDK 接收微信消息 |
| 调度层 | Message Broker 并行分发 |
| 应用层 | App 市场(20+ 工具)+ WebSocket + Webhook + AI Sink |
| 后端 | Go,SQLite(默认)或 PostgreSQL |
| 前端 | React + TypeScript + Tailwind CSS |
| 认证 | Passkey / OAuth 2.0 (PKCE) |
三、5 分钟部署
最简单(单文件二进制)
curl -fsSL https://raw.githubusercontent.com/openilink/openilink-hub/main/install.sh | sh
oih
数据默认存在 ~/.local/share/openilink-hub/,无需配置数据库。
Docker(推荐)
docker run -d -p 9800:9800 openilink/openilink-hub:latest
生产环境(PostgreSQL + MinIO)
services:
postgres:
image: postgres:17-alpine
environment:
POSTGRES_USER: openilink
POSTGRES_PASSWORD: <强密码>
POSTGRES_DB: openilink
volumes:
- pgdata:/var/lib/postgresql/data
hub:
image: openilink/openilink-hub:latest
ports:
- "9800:9800"
environment:
DATABASE_URL: postgres://openilink:<密码>@postgres:5432/openilink?sslmode=disable
RP_ORIGIN: https://hub.example.com
RP_ID: hub.example.com
SECRET: <随机字符串>
depends_on:
- postgres
前面架 Nginx/Caddy 做 HTTPS 反代,oih install 注册系统服务(支持 systemd/launchd)。
四、应用市场(20+)
安装完成后,在后台的 App 市场里一键启用,PKCE OAuth 授权后即可使用。
平台互通
- 飞书 — 34 个 AI Tools(日历、云文档、多维表格等 11 大业务域)
- Slack — 23 个 AI Tools
- Discord — 19 个 AI Tools
- 钉钉 — 20 个 AI Tools
- 企业微信 — 18 个 AI Tools
效率工具
- GitHub — 36 个 AI Tools(Issue、PR、Actions、Release)
- Google Workspace — 18 个 AI Tools(Gmail、Calendar、Drive、Docs)
- Notion — 15 个 AI Tools
- Linear — 13 个 AI Tools
零配置工具
天气、汇率、记账、提醒、定时任务、RSS、二维码。
五、接入 AI Agent
Hub 提供三个通道:
方式 1:AI Sink(最简单)
在后台填入 OpenAI 兼容 API endpoint + key,Bot 自动对话,支持:
- Coze、扣子(OpenAI 兼容接口)
- 本地 Ollama(
http://localhost:11434/v1) - LangChain 服务端
- 任何 OpenAI 格式的 API
方式 2:WebSocket 实时推送
AI Agent 订阅 Hub 的 WebSocket,毫秒级收到消息后自行处理,再通过 Hub API 回复。
方式 3:Webhook HTTP 回调
消息触达时 POST 到你的服务,适合接已有的后端逻辑。
六、SDK 开发自己的 App
7 种语言 SDK,3 分钟上手:
pip install openilink-sdk-python
npm install @openilink/openilink-sdk-node
go get github.com/openilink/openilink-sdk-go
Hub 自带 Mock Server,本地开发无需真实微信 Bot:
go run ./cmd/appmock --webhook-url http://localhost:8080/webhook
curl -X POST http://localhost:9801/mock/event \
-d '{"sender":"alice","content":"@test-app hello"}'
七、总结
| 能力 | 说明 |
|---|---|
| 部署 | 单文件/Docker,5 分钟启动 |
| 应用市场 | 20+ 工具一键接入,无需手写 API |
| AI 接入 | OpenAI 兼容 API 直接配置 |
| SDK | 7 种语言,支持二次开发 |
| 安全 | Passkey 登录,数据本地 |
| 协议 | MIT 开源,可商用 |
GitHub:openilink/openilink-hub
在线体验:hub.openilink.com
© 2026 Author: Mycelium Protocol
openilink-hub: Open-Source WeChat Bot Platform with App Marketplace
Based on openilink/openilink-hub — MIT license, Go backend.
What It Is
openilink-hub is a self-hosted management platform and app marketplace built on top of WeChat’s official ClawBot iLink protocol (launched early 2026). iLink is WeChat’s first official programmatic messaging channel — but it’s a raw pipe. openilink-hub wraps it with a full management layer: visual dashboard, app marketplace, multi-channel dispatch, and AI Agent gateway.
Deploy in 5 Minutes
Single binary:
curl -fsSL https://raw.githubusercontent.com/openilink/openilink-hub/main/install.sh | sh && oih
Docker:
docker run -d -p 9800:9800 openilink/openilink-hub:latest
Default: SQLite. Production: swap DATABASE_URL to PostgreSQL.
App Marketplace (20+)
One-click install from the dashboard. Highlights:
- Lark/Feishu — 34 AI Tools across 11 domains
- Slack — 23 AI Tools
- GitHub — 36 AI Tools (Issues, PRs, Actions)
- Google Workspace — 18 AI Tools
- Notion — 15 AI Tools
AI Agent Integration
Three channels:
- AI Sink — fill in any OpenAI-compatible API (Coze, Ollama, LangChain). Bot auto-replies.
- WebSocket — sub-millisecond push to your agent; reply via Hub API.
- Webhook — HTTP callback to any backend.
SDK
7 languages: Go, Node.js, Python, PHP, Java, C#, Lua.
Local mock server included — develop without a real WeChat Bot.
GitHub: openilink/openilink-hub · Stars: 1,443 · MIT
© 2026 Author: Mycelium Protocol
关于本站 · 免责声明
🍄 Mushroom Research Blog 是非营利、免费公开的个人科技观察博客与公众号 XStack18,不接受商业合作、不代表任何企业或机构立场,也不谋求商业利益。我们以个人视角客观中立地记录和分析 AI、Web3 等领域的最新模型发布与技术动态——不止转述新闻标题或二手信息,而是给出有独立思考的深入分析,希望帮更多人获得有价值的一手科技认知。
⚠️ 文中介绍的开源代码与模型,仅供学习交流与技术借鉴。它们大多仍处于早期阶段,有待进一步研究和验证,请勿直接用于工作或生产环境;如需采用,请先自行充分测试,并核实其许可证与安全性。
Open-source code and models featured here are shared for learning and reference only. Most are early-stage and still need further study and verification — please don't use them directly in your work or in production. Test them thoroughly and check their licenses and security first.
- 本站文章均为作者基于公开信息的个人研究与观点整理,不代表文中提及的任何公司、产品、模型的官方立场,未与其构成商业关联或合作关系。
- 科技行业信息更新极快,我们尽力保证内容准确、及时,但不对完整性、实时性做绝对保证,具体请以相关企业/项目官方公告为准。
- 文中引用的第三方商标、产品名称、图片、数据等版权归原权利人所有,我们会尽量注明来源;如你认为存在版权疑问或侵权,请通过下方邮箱联系我们,收到通知后会尽快核实处理(更正、加注来源或删除)。
- 文章内容仅为技术科普与个人观点,不构成投资、法律或其他专业建议,据此进行任何决策的后果需自行判断和承担。
📮 侵权 / 勘误 / 合作咨询:hello@mushroom.cv
💬 评论与讨论
使用 GitHub 账号登录后发表评论