惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
F
Fortinet All Blogs
小众软件
小众软件
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Azure Blog
Microsoft Azure Blog
J
Java Code Geeks
有赞技术团队
有赞技术团队
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
A
About on SuperTechFans
I
InfoQ
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog

中文博客 on 范叶亮 | Leo Van

多智能体系统 (Multi-Agent System) 确定性和掌控欲 - 你的 AI 不是你的 AI LLM Token 消耗节省计划 (How to Save Token for LLM) 智能体的角色定位和身份演化 (Agent Role Orientation and Identity Evolution) 本地部署 OpenClaw,QwenPaw 和 Hermes Agent (Local Deployment of OpenClaw, QwenPaw and Hermes Agent) 部署 Matrix 服务器 Synapse (Deployment of Matrix Server Synapse) 部署 frp 内网穿透服务 (Deployment of frp NAT Traversal Service) 本地部署大模型服务 (Local Deployment of LLM Services) AI 时代的生产力和生产关系 (Forces and Relations of Production in AI Era) 业余无线电入门 - CQ, CQ, CQ, this is BD1CZP. Calling CQ and standing by. 重构 - 之于代码、之于工作、之于生活 大语言模型微调 (Fine-tuning Large Language Models) 提升图片分辨率和质量 - Invoke AI 101 教程 使用画布创建和组合生成新的图片 - Invoke AI 101 教程 探索 AI 模型和概念适配器 - Invoke AI 101 教程 理解图像到图像和降噪过程 - Invoke AI 101 教程 使用控制层和指示控制图片的生成 - Invoke AI 101 教程 使用 Invoke 创作你的第一张图片 - Invoke AI 101 教程 在 OpenWrt 和群晖中自动申请和部署证书 凡人歌 - 凡人,但不要烦心 Shell 调用方式 fork,exec 和 source (Run Shell with fork, exec and source) 重定向和管道 (Redirect and Pipe) 模型压缩和推理加速 (Model Compression and Inference Acceleration) 我们需要多少种编程语言 (How Many Programming Languages do We Need) 数据可视化小贴士 - 面向动态文档生成,秉承规范、统一和实用的理念 从 rm -rf * 说起 - 喜新、怀旧、再出发 当我谈摄影时,我谈些什么 - 色彩篇 Part 1 CSS 布局和定位 (CSS Layout and Position) 当我谈修图时,我谈些什么 - 色彩篇 Part 1 在 Windows 下利用 WSL2 和 Ubuntu 配置 GPU 机器学习环境
本地部署智能体 - OpenClaw,QwenPaw,Hermes Agent ...
范叶亮 · 2026-04-18 · via 中文博客 on 范叶亮 | Leo Van

本地部署智能体

OpenClaw,QwenPaw,Hermes Agent …

分类: AI, Tech101, 教程 / 字数: 2264 / 标签: 人工智能, AI, 本地部署, Podman, OpenClaw, QwenPaw, Hermes Agent


环境信息

本教程将介绍在 macOS 环境下部署 OpenClaw,QwenPaw 和 Hermes Agent。如无特殊说明,macOS 系统下需在终端中执行命令,Windows 系统下需要在 PowerShell 中执行命令。本教程涉及到的软件信息如下:

软件信息
软件 版本
Podman 5.8.2
OpenClaw 2026.4.16
QwenPaw 1.1.2
Hermes Agent 0.10.0

虚拟环境

为了更好的进行环境隔离,后续我们使用 Podman 安装不同的智能体框架。

提示

在 Windows 系统下,单击开始按钮,搜索 启用或关闭 Windows 功能,在打开的窗口中将 Hyper-V适用于 Linux 的 Windows 子系统 及其子项全部勾选,单击确定,待系统启用功能后重启电脑。

运行如下命令安装 Podman:

为了方便观察 Podman 的运行情况,可选的运行如下命令安装 Podman Desktop:

macOS

brew install podman-desktop

Windows

scoop install podman-desktop

安装完毕后,运行如下命令初始化并启动 Podman:

macOS

podman machine init
podman machine start

Windows

podman machine init
podman machine start

运行如下命令查看 Podman 的安装和运行情况:

更多 Podman 使用方法请参考 Podman 文档。有关 Podman Desktop 的使用方法请参考 Podman Desktop 文档

安装

克隆 OpenClaw 的源代码至本地:

macOS

git clone git@github.com:openclaw/openclaw.git

Windows

git clone git@github.com:openclaw/openclaw.git

macOS

运行如下命令安装 OpenClaw CLI:

curl -fsSL https://openclaw.ai/install-cli.sh | bash

命令会在 ~/.openclaw 目录下安装 Node 环境和相关依赖。进入 OpenClaw 源代码目录下,运行如下命令构建 Gateway 容器:

export OPENCLAW_DOCKER_APT_PACKAGES="chromium"
./scripts/podman/setup.sh

其中 OPENCLAW_DOCKER_APT_PACKAGES 表示构建 Gateway 容器时使用 apt 命令额外安装的软件包。运行如下命令启动 Gateway 容器:

./scripts/run-openclaw-podman.sh launch

运行如下命令进行配置:

./scripts/run-openclaw-podman.sh launch setup

在配置过程中根据实际情况对模型提供商等选项进行配置。配置如下环境变量来使用宿主机中的 OpenClaw CLI 管理 OpenClaw 容器:

export PATH="$PATH:/Users/leo/.openclaw/bin"
export OPENCLAW_CONTAINER=openclaw

Windows

在合适的目录创建如下文件夹:

mkdir /path/to/openclaw
mkdir /path/to/openclaw/workspace

进入 OpenClaw 源代码目录下,运行如下命令构建 Gateway 容器:

podman build -t openclaw:local -f Dockerfile . --build-arg OPENCLAW_DOCKER_APT_PACKAGES="chromium"

其中 OPENCLAW_DOCKER_APT_PACKAGES 表示构建 Gateway 容器时使用 apt 命令额外安装的软件包。运行如下命令配置并启动 Gateway 容器:

$env:OPENCLAW_CONFIG_DIR = "/path/to/openclaw"
$env:OPENCLAW_WORKSPACE_DIR = "/path/to/openclaw/workspace"

podman compose run --rm --no-deps --entrypoint node openclaw-gateway `
  dist/index.js onboard --mode local --no-install-daemon

podman compose run --rm --no-deps --entrypoint node openclaw-gateway `
  dist/index.js config set --batch-json '[{"path":"gateway.mode","value":"local"},{"path":"gateway.bind","value":"lan"},{"path":"gateway.controlUi.allowedOrigins","value":["http://localhost:18789","http://127.0.0.1:18789"]}]'

podman compose up -d openclaw-gateway

在配置中过程中根据实际情况对模型提供商等选项进行配置。

使用 Podman 安装 OpenClaw 后,重启 Gateway 的命令如下:

macOS

Windows

podman restart openclaw-openclaw-gateway-1

使用浏览器打开 http://127.0.0.1:18789/ 即可进入 OpenClaw 管理页面。更多细节请参考 OpenClaw 文档

警告

OpenClaw 管理页面虽然支持权限校验,但为了安全起见,请勿将其暴露在公网。

消息频道

提示

在 Windows 系统下,podman compose 命令需要在 OpenClaw 源代码目录下运行。

飞书

运行如下命令配置飞书消息频道:

macOS

openclaw channels login --channel feishu

Windows

podman compose exec openclaw-gateway node dist/index.js channels login --channel feishu

使用飞书 APP 扫描生成的二维码进行后续配置即可。

Discord

首先在 Discord 中创建一个服务器,进入 Discord 开发者门户,单击 新 APP 按钮创建新的应用,并填写应用名称。

进入 概况 - 机器人 选项卡,启用 Presence IntentServer Members IntentMessage Content Intent

进入 概况 - 机器人 选项卡,单击 重置令牌 生成令牌,注意令牌仅显示一次,请妥善保管以便后续使用。

进入 概况 - OAuth2 选项卡,在 OAuth2 URL 生成器的 范围 中选中 botapplications.commands

机器人权限 中选中 查看频道发送消息阅读消息历史记录嵌入链接添加文件添加反应

已生成的 URL 中的 URL 复制到浏览器打开,按照提示安装应用并授权。

打开 Discord 应用,进入 用户设置 页面,在 开发者 菜单中启用 开发者模式。在频道图标上右键,单击 复制服务器 ID,在个人头像上左键,单击 复制用户 ID

运行如下命令配置 Discord 消息频道:

macOS

openclaw config set channels.discord.token "你的 TOKEN"
openclaw config set channels.discord.enabled true --strict-json

Windows

podman compose exec openclaw-gateway node dist/index.js config set channels.discord.token "你的 TOKEN"
podman compose exec openclaw-gateway node dist/index.js config set channels.discord.enabled true --strict-json

向机器人发送任意消息,根据机器人回复的消息运行如下命令进行授权:

macOS

openclaw pairing approve discord <CODE>

Windows

podman compose exec openclaw-gateway node dist/index.js pairing approve discord <CODE>

此时就可以通过 Discord 私信和机器人对话了。在配置文件中添加如下内容来支持在服务器中同机器人对话:

{
  "channels": {
    "discord": {
      "groupPolicy": "allowlist",
      "guilds": {
        "服务器 ID": {
          "requireMention": true,
          "users": ["用户 ID"]
        }
      }
    }
  }
}

默认情况下,机器人只有在被 @ 时才会响应,如果需要对每条消息都进行响应,可以将 requireMention 设置为 false

QwenPaw

安装

在合适的目录创建如下文件夹:

macOS

mkdir -p /path/to/qwenpaw/data
mkdir -p /path/to/qwenpaw/secrets

Windows

mkdir /path/to/qwenpaw/data
mkdir /path/to/qwenpaw/secrets

运行如下命令使用 Podman 安装 QwenPaw:

macOS

podman pull agentscope/qwenpaw:latest
podman run -d \
  --name qwenpaw \
  --restart always \
  -v /path/to/qwenpaw/data:/app/working \
  -v /path/to/qwenpaw/secrets:/app/working.secret \
  -p 8088:8088 \
  agentscope/qwenpaw:latest

Windows

podman pull agentscope/qwenpaw:latest
podman run -d `
  --name qwenpaw `
  --restart always `
  -v /path/to/qwenpaw/data:/app/working `
  -v /path/to/qwenpaw/secrets:/app/working.secret `
  -p 8088:8088 `
  agentscope/qwenpaw:latest

使用浏览器打开 http://127.0.0.1:8088/ 即可进入 QwenPaw 管理页面。

警告

QwenPaw 管理页面暂无权限校验,请勿将其暴露在公网。

注意

在 QwenPaw 中需要进入 智能体管理 中新建一个智能体,默认智能体 无法进行修改。

消息频道

飞书

参见:https://qwenpaw.agentscope.io/docs/channels/?lang=zh#飞书

Discord

参见:https://qwenpaw.agentscope.io/docs/channels/?lang=zh#Discord

Hermes Agent

安装

在合适的目录创建如下文件夹:

macOS

mkdir -p /path/to/hermes-agent

Windows

mkdir /path/to/hermes-agent

运行如下命令使用 Podman 配置 Hermes Agent:

macOS

podman pull nousresearch/hermes-agent:latest
podman run -it --rm \
  -v /path/to/hermes-agent:/opt/data \
  nousresearch/hermes-agent:latest setup

Windows

podman pull nousresearch/hermes-agent:latest
podman run -it --rm `
  -v /path/to/hermes-agent:/opt/data `
  nousresearch/hermes-agent:latest setup

在配置过程中根据实际情况对模型提供商等选项进行配置。运行如下代码启动 Gateway 容器:

macOS

podman run -d \
  --name hermes-agent-gateway \
  --restart unless-stopped \
  -v /path/to/hermes-agent:/opt/data \
  -p 8642:8642 \
  nousresearch/hermes-agent:latest gateway run

Windows

podman run -d `
  --name hermes-agent-gateway `
  --restart unless-stopped `
  -v /path/to/hermes-agent:/opt/data `
  -p 8642:8642 `
  nousresearch/hermes-agent:latest gateway run

运行如下代码启动 Dashboard 容器:

macOS

podman run -d \
  --name hermes-agent-dashboard \
  --restart unless-stopped \
  -v /path/to/hermes-agent:/opt/data \
  -p 9119:9119 \
  -e GATEWAY_HEALTH_URL=http://$HOST_IP:8642 \
  nousresearch/hermes-agent:latest dashboard --host 0.0.0.0 --insecure

Windows

podman run -d `
  --name hermes-agent-dashboard `
  --restart unless-stopped `
  -v /path/to/hermes-agent:/opt/data `
  -p 9119:9119 `
  -e GATEWAY_HEALTH_URL=http://$HOST_IP:8642 `
  nousresearch/hermes-agent:latest dashboard --host 0.0.0.0 --insecure

$HOST_IP 替换为运行 Gateway 容器机器的 IP 地址(注意:需使用宿主机的 IP 地址,而不是 127.0.0.1)。使用浏览器打开 http://127.0.0.1:9119/ 即可进入 Hermes Agent 管理页面。

警告

Hermes Agent 管理页面暂无权限校验,请勿将其暴露在公网。

消息频道

飞书

参见:https://hermes-agent.nousresearch.com/docs/user-guide/messaging/feishu

Discord

参见:https://hermes-agent.nousresearch.com/docs/user-guide/messaging/discord