【目录】
1.安装 OpenClaw 1)安装Node.js和Git 2)安装 OpenClaw 2.配置LMStudio+本地模型 3.初始化OpenClaw并安装为服务 4. 配置飞书AI助手 1)创建企业自建应用 2)添加机器人 3)记录应用凭证 3)配置权限 5.命令行配置 OpenClaw 1)安装飞书插件 2)添加飞书渠道 3)重启OpenClaw网关 6.配置发布飞书AI助手 1)配置事件订阅(关键!) 2)发布应用 7.飞书AI助手使用 1)首次配对授权 2)飞书AI助手测试
摘要:本文详细介绍如何在 Windows 环境下,结合 LMStudio 本地大模型与 OpenClaw 框架,快速搭建一个可接入飞书的私人 AI 助手。全程离线可运行,数据不出本地,适合开发者、技术爱好者及企业私有化部署场景。
系统要求
• Windows 10/11 或 WSL2(推荐) • Node.js ≥ 22 LTS • Git for Windows • 管理员权限 CMD
.
1.安装 OpenClaw
1)安装Node.js和Git
CMD窗口安装:
# 1.下载安装Node.js ≥ 22# 手动安装:https://nodejs.org/zh-cn/download 中下载.msi手动安装# 验证安装:node --versionnpm --version# 推荐使用 pnpm 作为包管理器,更节省空间且速度快npm install -g pnpm@latest-10# 2.安装Git# 手动安装:https://git-scm.com/install/windows 中“Git for Windows/x64 Setup.”下载择exe安装# 验证安装:重新打开终端git --version.
2)安装 OpenClaw
CMD窗口安装:
# 1. 设置国内镜像加速npm config set registry https://registry.npmmirror.com# 2. 【关键】安装 OpenClaw(跳过可选依赖 + 忽略编译脚本)npm install -g openclaw@latest --omit=optional --ignore-scripts# 3. 验证安装where openclawopenclaw --version.
2.配置LMStudio+本地模型
下载并安装 LMStudio(0.4.6版本)
LMStudio中下载模型:(如 Qwen3.5-0.8B-GGUF(Q4_K_M))
• 点击左侧 模型搜索图标(小机器人加放大镜符号);• 搜索框中,搜索模型; • 搜索结果中,选中模型条目; • 右侧 Download Options里选择模型文件版本(如Q4_K_M);• 点击 Download按钮开始下载。
LMStudio中加载模型:
• 点击左侧 Developer图标(类似终端符号);• 点击右上角 + Load Model按钮;• 弹出模型列表中,选择模型条目; • 选项卡最后,打开 手动选择模型加载参数;• 配置 上下文长度,可设置模型支持最大token数;• 点击 加载模型。
LMStudio中开启API Server:
• 左侧进入 Local Server标签页;• 开启 Server:Running;• 默认地址: http://127.0.0.1:1234。
测试 LMStudio API:
# 记下返回的模型ID,如qwen3.5-0.8b# 方式一:打开 CMD 测试curl http://127.0.0.1:1234/v1/models# 方式二:浏览器访问http://127.0.0.1:1234/v1/models.
3.初始化OpenClaw并安装为服务
# 以【管理员身份】运行 CMD# 搜索"cmd" → 右键"命令提示符" → "以管理员身份运行"openclaw onboard --install-daemon --skip-skills# 会弹出新窗口启动服务# 如果没有,使用命令前台调试:# openclaw gateway run --verbose --ws-log full• 配置
C:\Users\Administrator>openclaw onboard --install-daemon --skip-skills🦞 OpenClaw 2026.3.2 (85377a2) — Welcome to the command line: where dreams compile and confidence segfaults.Windows detected — OpenClaw runs great on WSL2!Native Windows might be trickier.Quick setup: wsl --install (one command, one reboot)Guide: https://docs.openclaw.ai/windows▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░████░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░████░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 🦞 OPENCLAW 🦞T OpenClaw onboarding|o Security ---------------------------------------------------------------------------------+| || Security warning — please read. || || OpenClaw is a hobby project and still in beta. Expect sharp edges. || By default, OpenClaw is a personal agent: one trusted operator boundary. || This bot can read files and run actions if tools are enabled. || A bad prompt can trick it into doing unsafe things. || || OpenClaw is not a hostile multi-tenant boundary by default. || If multiple users can message one tool-enabled agent, they share that delegated tool || authority. || || If you’re not comfortable with security hardening and access control, don’t run || OpenClaw. || Ask someone experienced to help before enabling tools or exposing it to the internet. || || Recommended baseline: || - Pairing/allowlists + mention gating. || - Multi-user/shared inbox: split trust boundaries (separate gateway/credentials, ideally || separate OS users/hosts). || - Sandbox + least-privilege tools. || - Shared inboxes: isolate DM sessions (`session.dmScope: per-channel-peer`) and keep || tool access minimal. || - Keep secrets out of the agent’s reachable filesystem. || - Use the strongest available model for any bot with tools or untrusted inboxes. || || Run regularly: || openclaw security audit --deep || openclaw security audit --fix || || Must read: https://docs.openclaw.ai/gateway/security || |+--------------------------------------------------------------------------------------------+|o I understand this is personal-by-default and shared/multi-user userequires lock-down. Continue?| Yes|o Onboarding mode| QuickStart|o QuickStart -------------------------+| || Gateway port: 18789 || Gateway bind: Loopback (127.0.0.1) || Gateway auth: Token (default) || Tailscale exposure: Off || Direct to chat channels. || |+--------------------------------------+|o Model/auth provider| Custom Provider|o API Base URL| http://127.0.0.1:1234/v1|o How do you want to provide this API key?| Paste API key now|o API Key (leave blank if not required)| no|o Endpoint compatibility| OpenAI-compatible|o Model ID| qwen3.5-0.8b|o Verification successful.|o Endpoint ID| custom-127-0-0-1-1234|o Model alias (optional)|Configured custom provider: custom-127-0-0-1-1234/qwen3.5-0.8b|o Channel status ----------------------------+| || Telegram: needs token || WhatsApp (default): not linked || Discord: needs token || Slack: needs tokens || Signal: needs setup || signal-cli: missing (signal-cli) || iMessage: needs setup || imsg: missing (imsg) || IRC: not configured || Google Chat: not configured || Feishu: install plugin to enable || Google Chat: install plugin to enable || Nostr: install plugin to enable || Microsoft Teams: install plugin to enable || Mattermost: install plugin to enable || Nextcloud Talk: install plugin to enable || Matrix: install plugin to enable || BlueBubbles: install plugin to enable || LINE: install plugin to enable || Zalo: install plugin to enable || Zalo Personal: install plugin to enable || Synology Chat: install plugin to enable || Tlon: install plugin to enable || |+---------------------------------------------+|o How channels work ----------------------------------------------------------------+| || DM security: default is pairing; unknown DMs get a pairing code. || Approve with: openclaw pairing approve <channel> <code> || Public DMs require dmPolicy="open" + allowFrom=["*"]. || Multi-user DMs: run: openclaw config set session.dmScope "per-channel-peer" (or || "per-account-channel-peer" for multi-account channels) to isolate sessions. || Docs: channels/pairing || || Telegram: simplest way to get started — register a bot with @BotFather and get || going. || WhatsApp: works with your own number; recommend a separate phone + eSIM. || Discord: very well supported right now. || IRC: classic IRC networks with DM/channel routing and pairing controls. || Google Chat: Google Workspace Chat app with HTTP webhook. || Slack: supported (Socket Mode). || Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord."). || iMessage: this is still a work in progress. || Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools. || Nostr: Decentralized protocol; encrypted DMs via NIP-04. || Microsoft Teams: Bot Framework; enterprise support. || Mattermost: self-hosted Slack-style chat; install the plugin to enable. || Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots. || Matrix: open protocol; install the plugin to enable. || BlueBubbles: iMessage via the BlueBubbles mac app + REST API. || LINE: LINE Messaging API bot for Japan/Taiwan/Thailand markets. || Zalo: Vietnam-focused messaging platform with Bot API. || Zalo Personal: Zalo personal account via QR code login. || Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent || capabilities. || Tlon: decentralized messaging on Urbit; install the plugin to enable. || |+------------------------------------------------------------------------------------+|o Select channel (QuickStart)| Skip for nowUpdated ~\.openclaw\openclaw.jsonWorkspace OK: ~\.openclaw\workspaceSessions OK: ~\.openclaw\agents\main\sessions|o Skills -----------------+| || Skipping skills setup. || |+--------------------------+|o Hooks ------------------------------------------------------------------+| || Hooks let you automate actions when agent commands are issued. || Example: Save session context to memory when you issue /new or /reset. || || Learn more: https://docs.openclaw.ai/automation/hooks || |+--------------------------------------------------------------------------+|o Enable hooks?| Skip for nowConfig overwrite: C:\Users\Administrator\.openclaw\openclaw.json (sha256 bbdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3d86c -> 8c3940d7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx310fc6691, backup=C:\Users\Administrator\\.openclaw\openclaw.json.bak)||o Gateway service runtime --------------------------------------------+| || QuickStart uses Node for the Gateway service (stable + supported). || |+----------------------------------------------------------------------+|o Installing Gateway service…Installed Scheduled Task: OpenClaw GatewayTask script: C:\Users\Administrator\.openclaw\gateway.cmdo Gateway service installed.|oAgents: main (default)Heartbeat interval: 30m (main)Session store (main): C:\Users\Administrator\.openclaw\agents\main\sessions\sessions.json (0 entries)|o Optional apps ------------------------+| || Add nodes for extra features: || - macOS app (system + notifications) || - iOS app (camera/canvas) || - Android app (camera/canvas) || |+----------------------------------------+|o Control UI ---------------------------------------------------------------------+| || Web UI: http://127.0.0.1:18789/ || Web UI (with token): || http://127.0.0.1:18789/#token=8febxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx46eb33d15d7 || Gateway WS: ws://127.0.0.1:18789 || Gateway: reachable || Docs: https://docs.openclaw.ai/web/control-ui || |+----------------------------------------------------------------------------------+|o Start TUI (best option!) ---------------------------------+| || This is the defining action that makes your agent you. || Please take your time. || The more you tell it, the better the experience will be. || We will send: "Wake up, my friend!" || |+------------------------------------------------------------+|o Token -------------------------------------------------------------------------------+| || Gateway token: shared auth for the Gateway + Control UI. || Stored in: ~/.openclaw/openclaw.json (gateway.auth.token) or || OPENCLAW_GATEWAY_TOKEN. || View token: openclaw config get gateway.auth.token || Generate token: openclaw doctor --generate-gateway-token || Web UI stores a copy in this browser's localStorage (openclaw.control.settings.v1). || Open the dashboard anytime: openclaw dashboard --no-open || If prompted: paste the token into Control UI settings (or use the tokenized || dashboard URL). || |+---------------------------------------------------------------------------------------+|* How do you want to hatch your bot?| Do this later|o Later -------------------------------------------+| || When you're ready: openclaw dashboard --no-open || |+---------------------------------------------------+|o Workspace backup ----------------------------------------+| || Back up your agent workspace. || Docs: https://docs.openclaw.ai/concepts/agent-workspace || |+-----------------------------------------------------------+|o Security ------------------------------------------------------+| || Running agents on your computer is risky — harden your setup: || https://docs.openclaw.ai/security || |+-----------------------------------------------------------------+|o Web search (optional) ------------------------------------------------------------+| || If you want your agent to be able to search the web, you’ll need an API key. || || OpenClaw uses Brave Search for the `web_search` tool. Without a Brave Search API || key, web search won’t work. || || Set it up interactively: || - Run: openclaw configure --section web || - Enable web_search and paste your Brave Search API key || || Alternative: set BRAVE_API_KEY in the Gateway environment (no config changes). || Docs: https://docs.openclaw.ai/tools/web || |+------------------------------------------------------------------------------------+|o What now -------------------------------------------------------------+| || What now: https://openclaw.ai/showcase ("What People Are Building"). || |+------------------------------------------------------------------------+|— Onboarding complete. Use the dashboard link above to control OpenClaw.C:\Users\Administrator>.
4. 配置飞书AI助手
1)创建企业自建应用
访问飞书开放平台:https://open.feishu.cn/app;
点击 「创建企业自建应用」;
填写应用信息:
• 应用名称:OpenClaw大虾 • 应用描述:OpenClaw大虾 • 应用图标:(选择图标)
点击 「创建」。
2)添加机器人
点击左侧菜单 「添加应用能力」;
选择 「机器人」 → 点击 「添加」。
.
3)记录应用凭证
在 「凭证与基础信息」 页面记录:
cli_xxxxxxxxxx) | |
.
3)配置权限
点击左侧菜单 「权限管理」;
点击 「批量导入/导出权限」 → 「导入」;
JSON中,添加以下权限:
{ "scopes": { "tenant": [ "contact:contact.base:readonly", "contact:user.base:readonly", "im:chat:readonly", "im:message", "im:message.group_at_msg:readonly", "im:message.group_msg", "im:message.p2p_msg:readonly", "im:message:readonly", "im:message:recall", "im:message:send_as_bot", "im:message:update", "im:resource" ] }}点击 「下一步,确认新增权限」→ 「申请开通」。
.
5.命令行配置 OpenClaw
1)安装飞书插件
CMD中运行以下命令:
openclaw plugins install @openclaw/feishu• 输出:
C:\Users\Administrator>openclaw plugins install @openclaw/feishu🦞 OpenClaw 2026.3.2 (85377a2) — I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.Downloading @openclaw/feishu…Extracting C:\Users\Administrator\AppData\Local\Temp\openclaw-npm-pack-Yf4GEf\openclaw-feishu-2026.3.2.tgz…Plugin "feishu" has 1 suspicious code pattern(s). Run "openclaw security audit --deep" for details.Installing to C:\Users\Administrator\.openclaw\extensions\feishu…Installing plugin dependencies…02:53:25 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: feishu (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts). Set plugins.allow to explicit trusted ids.Config warnings:- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)Config overwrite: C:\Users\Administrator\.openclaw\openclaw.json (sha256 736fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxee20b988b826 -> 51c5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf1a9632d540cddd, backup=C:\Users\Administrator\.openclaw\openclaw.json.bak)Installed plugin: feishuRestart the gateway to load plugins..
2)添加飞书渠道
CMD中运行以下命令,根据交互式提示完成配置:
openclaw channels add• 配置:
C:\Users\Administrator>openclaw channels addConfig warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)🦞 OpenClaw 2026.3.2 (85377a2) — Half butler, half debugger, full crustacean.|o Config warnings -------------------------------------------------------------------------+| || - plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may || be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts) || |+-------------------------------------------------------------------------------------------+Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)02:55:39 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: feishu (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts). Set plugins.allow to explicit trusted ids.Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)T Channel setup|o Channel status ----------------------------+| || Telegram: needs token || WhatsApp (default): not linked || Discord: needs token || Slack: needs tokens || Signal: needs setup || signal-cli: missing (signal-cli) || iMessage: needs setup || imsg: missing (imsg) || Feishu: needs app credentials || IRC: not configured || Google Chat: not configured || Google Chat: install plugin to enable || Nostr: install plugin to enable || Microsoft Teams: install plugin to enable || Mattermost: install plugin to enable || Nextcloud Talk: install plugin to enable || Matrix: install plugin to enable || BlueBubbles: install plugin to enable || LINE: install plugin to enable || Zalo: install plugin to enable || Zalo Personal: install plugin to enable || Synology Chat: install plugin to enable || Tlon: install plugin to enable || |+---------------------------------------------+|o Configure chat channels now?| Yes|o How channels work -----------------------------------------------------------------------+| || DM security: default is pairing; unknown DMs get a pairing code. || Approve with: openclaw pairing approve <channel> <code> || Public DMs require dmPolicy="open" + allowFrom=["*"]. || Multi-user DMs: run: openclaw config set session.dmScope "per-channel-peer" (or || "per-account-channel-peer" for multi-account channels) to isolate sessions. || Docs: channels/pairing || || Telegram: simplest way to get started — register a bot with @BotFather and get going. || WhatsApp: works with your own number; recommend a separate phone + eSIM. || Discord: very well supported right now. || IRC: classic IRC networks with DM/channel routing and pairing controls. || Google Chat: Google Workspace Chat app with HTTP webhook. || Slack: supported (Socket Mode). || Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord."). || iMessage: this is still a work in progress. || Feishu: 飞书/Lark enterprise messaging. || Nostr: Decentralized protocol; encrypted DMs via NIP-04. || Microsoft Teams: Bot Framework; enterprise support. || Mattermost: self-hosted Slack-style chat; install the plugin to enable. || Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots. || Matrix: open protocol; install the plugin to enable. || BlueBubbles: iMessage via the BlueBubbles mac app + REST API. || LINE: LINE Messaging API bot for Japan/Taiwan/Thailand markets. || Zalo: Vietnam-focused messaging platform with Bot API. || Zalo Personal: Zalo personal account via QR code login. || Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent capabilities. || Tlon: decentralized messaging on Urbit; install the plugin to enable. || |+-------------------------------------------------------------------------------------------+|o Select a channel| Feishu/Lark (飞书)|o Feishu credentials --------------------------------------------------------------+| || 1) Go to Feishu Open Platform (open.feishu.cn) || 2) Create a self-built app || 3) Get App ID and App Secret from Credentials page || 4) Enable required permissions: im:message, im:chat, contact:user.base:readonly || 5) Publish the app or add it to a test group || Tip: you can also set FEISHU_APP_ID / FEISHU_APP_SECRET env vars. || Docs: feishu || |+-----------------------------------------------------------------------------------+|o How do you want to provide this App Secret?| Enter App Secret|o Enter Feishu App Secret| gVlxxxxxxxxxxxxxxxxxxxxxxxxxxQspk|o Enter Feishu App ID| cli_a9xxxxxxxxxxxxxxc7[info]: [ 'client ready' ]|o Feishu connection test ---------------------------+| || Connected as ou_af69xxxxxxxxxxxxxxxxxxxxxxxxd9ae || |+----------------------------------------------------+|o Feishu connection mode| WebSocket (default)|o Which Feishu domain?| Feishu (feishu.cn) - China|o Group chat policy| Open - respond in all groups (requires mention)|o Select a channel| Finished|o Selected channels ------------------------------------------+| || Feishu — 飞书/Lark enterprise messaging. Docs: || feishu || |+--------------------------------------------------------------+|o Configure DM access policies now? (default: pairing)| Yes|o Feishu DM access -------------------------------------------------------------------------+| || Default: pairing (unknown DMs get a pairing code). || Approve: openclaw pairing approve feishu <code> || Allowlist DMs: channels.feishu.dmPolicy="allowlist" + channels.feishu.allowFrom entries. || Public DMs: channels.feishu.dmPolicy="open" + channels.feishu.allowFrom includes "*". || Multi-user DMs: run: openclaw config set session.dmScope "per-channel-peer" (or || "per-account-channel-peer" for multi-account channels) to isolate sessions. || Docs: channels/pairing || |+--------------------------------------------------------------------------------------------+|o Feishu DM policy| Open (public inbound DMs)|o Add display names for these accounts? (optional)| Yes|o feishu account name (default)||o Bind configured channel accounts to agents now?| Yes|o Route feishu account "default" to agent| main (default)|o Routing bindings ----------------+| || Added: feishu accountId=default || |+-----------------------------------+Config warnings:- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)Config overwrite: C:\Users\Administrator\.openclaw\openclaw.json (sha256 51c5fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf1a9632d540cddd -> e3ff1dfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9a8174850deacefb65, backup=C:\Users\Administrator\.openclaw\openclaw.json.bak)|— Channels updated.C:\Users\Administrator>.
3)重启OpenClaw网关
openclaw gateway restart输出:(新弹出终端)
Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)🦞 OpenClaw 2026.3.2 (85377a2) — Automation with claws: minimal fuss, maximal pinch.|o Config warnings -------------------------------------------------------------------------+| || - plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may || be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts) || |+-------------------------------------------------------------------------------------------+11:12:12 Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)11:12:13 Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)03:12:13 [gateway] [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: feishu (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts). Set plugins.allow to explicit trusted ids.11:12:18 Config warnings:\n- plugins.entries.feishu: plugin feishu: duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)03:12:23 [gateway] feishu_doc: Registered feishu_doc, feishu_app_scopes03:12:23 [gateway] feishu_chat: Registered feishu_chat tool03:12:23 [gateway] feishu_wiki: Registered feishu_wiki tool03:12:23 [gateway] feishu_drive: Registered feishu_drive tool03:12:23 [gateway] feishu_bitable: Registered bitable tools03:12:23 [gateway] [plugins] duplicate plugin id detected; later plugin may be overridden (C:\Users\Administrator\.openclaw\extensions\feishu\index.ts) (plugin=feishu, source=C:\Users\Administrator\.openclaw\extensions\feishu\index.ts)03:12:23 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root C:\Users\Administrator\.openclaw\canvas)03:12:23 [heartbeat] started03:12:23 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)03:12:23 [gateway] agent model: custom-127-0-0-1-1234/qwen3.5-0.8b03:12:23 [gateway] listening on ws://127.0.0.1:18789, ws://[::1]:18789 (PID 23728)03:12:23 [gateway] log file: C:\Users\Administrator\AppData\Local\Temp\openclaw\openclaw-2026-03-07.log11:12:23 [info]: [ 'client ready' ]03:12:24 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)03:12:24 [feishu] starting feishu[default] (mode: websocket)03:12:25 [feishu] feishu[default]: bot open_id resolved: ou_afxxxxxxxxxxxxxxxxxxxxxxdabd9ae11:12:25 [info]: [ 'event-dispatch is ready' ]03:12:25 [feishu] feishu[default]: starting WebSocket connection...11:12:25 [info]: [ '[ws]', 'receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in:\n' + ' Developer Console(开发者后台) \n' + ' ->\n' + ' Events and Callbacks(事件与回调)\n' + ' -> \n' + ' Mode of event/callback subscription(订阅方式)\n' + ' -> \n' + ' Receive events/callbacks through persistent connection(使用 长连接 接收事件/回调)']03:12:25 [feishu] feishu[default]: WebSocket client started11:12:25 [info]: [ '[ws]', 'ws client ready' ].
6.配置发布飞书AI助手
1)配置事件订阅(关键!)
重要顺序:先完成 OpenClaw 侧配置并启动服务,再在飞书后台保存,否则 WebSocket 连接会失败!
点击左侧菜单 「事件与回调」 → 「事件配置」;
订阅方式选择:「订阅方式」 → 选择「使用 长连接 接收事件」→ 「保存」;
下拉点击 「添加事件」,搜索并添加:im.message.receive_v1
勾选「启用」。
.
2)发布应用
点击左侧菜单 「版本管理与发布」;
点击 「创建版本」;
填写版本号(如 1.0.0)和更新说明;
点击 「保存」 → 「确认发布」;
等待状态变为 「已启用」。
.
7.飞书AI助手使用
1)首次配对授权
打开飞书应用,搜索并打开 "OpenClaw大虾" ,开启对话框。
发送任意消息。机器人会回复包含配对码的消息,如:
OpenClaw: access not configured. Your Feishu user id: ou_5cc1xxxxxxxxxxxxxxxxxxxxxxxxx Pairing code: D8xxxxxxxx Ask the bot owner to approve with: openclaw pairing approve feishu D8xxxxxxxx复制配对码,在 OpenClaw 终端中执行批准命令:
# 查看待审批列表openclaw pairing list feishu# 批准配对(将 <CODE> 替换为实际配对码)openclaw pairing approve feishu <CODE>输出应显示 Approved feishu sender ou_xxx。此后该用户即可正常对话。
.
2)飞书AI助手测试
打开飞书应用,搜索并打开 "OpenClaw大虾" ,开始对话。
• 用户发送: 你能干嘛?• 回复内容: (回复该AI助手能力)
.
参考资源OpenClaw 文档:https://docs.openclaw.aiLMStudio 教程:https://lmstudio.ai/docs飞书开放平台:https://open.feishu.cn/document.
声明:资源可能存在第三方来源,若有侵权请联系删除!
夜雨聆风