OpenClaw Zulip 桥接是一个高性能通道插件,支持与 Zulip 流和私信交互。具有强大的持久化事件队列系统、灵活的流量策略和全面的可观测性。
功能
- 持久化事件轮询 — 使用本地持久化的队列元数据自动恢复,重启后不会丢失消息
- 流量策略 — 精细控制谁可以在私信和流中与机器人交互
- 多账号 — 单实例支持多个 Zulip 账号和域
- 提及门控 — 智能流处理,支持
oncall(需要提及)、onmessage(响应所有)和 onchar(触发字符)模式
- 持久化去重 — 内置持久化去重存储,防止重复消息处理
- 媒体支持 — 自动下载和处理 Zulip 上传和内联图片
- 丰富反馈 — 可选的基于表情反应的状态指示器
前置条件
- OpenClaw >= 2026.3.23
- Node.js(推荐最新 LTS)
- Zulip 机器人(在 Zulip 设置 → 你的机器人 → 添加新机器人中创建)
快速开始
1. 克隆并安装
mkdir -p ~/.openclaw/extensions/
cd ~/.openclaw/extensions/
git clone https://github.com/niyazmft/openclaw-zulip-bridge.git
cd openclaw-zulip-bridge
npm install
openclaw plugins install ./ --link
openclaw plugins enable zulip
2. 配置
推荐使用环境变量存储凭证:
ZULIP_API_KEY:机器人 API 密钥
ZULIP_EMAIL:机器人邮箱
ZULIP_URL:Zulip 服务器 URL
3. 重启并验证
重启 OpenClaw,检查日志确认 zulip queue registered 消息。
配置字段
enabled:启用/禁用
dmPolicy:私信策略(pairing/allowlist/open/disabled)
groupPolicy:流策略(allowlist/open/disabled)
streams:监控的流列表
chatmode:oncall/onmessage/onchar
The OpenClaw Zulip Bridge is a high-performance channel plugin for OpenClaw that enables interaction with Zulip streams and private messages. It features a robust, persistent event queue system, flexible traffic policies, and comprehensive observability.
Features
- Persistent Event Polling: Automatically resumes from where it left off using locally-persisted queue metadata, surviving restarts without missing messages.
- Traffic Policies: Granular control over who can interact with the bot in DMs (
pairing, allowlist, open, disabled) and Streams (allowlist, open, disabled).
- Multiple Accounts: Support for multiple Zulip accounts and realms in a single instance.
- Mention Gating: Intelligent stream handling with
oncall (mention required), onmessage (responds to all), and onchar (trigger-character based) modes.
- Durable Deduplication: Built-in persistent deduplication store to prevent duplicate message processing.
- Media Support: Automatically downloads and processes Zulip uploads and inline images.
- Rich Feedback: Optional reaction-based status indicators for request start, success, and errors.
- Standardized Observability: Machine-parseable logs for easy monitoring and troubleshooting.
Prerequisites
Before installing the Zulip bridge, ensure you have:
- OpenClaw: Version
>=2026.3.23
- Node.js: Latest LTS recommended
- Zulip Bot: A registered bot on your Zulip realm.
1. Go to
Settings → Your Bots → Add a new bot.
2. Choose
Generic bot type.
3. Note your
Bot Email,
API Key, and
Zulip URL.
Quickstart: Enable Zulip on a New Device
Follow these steps to get Zulip running on a fresh OpenClaw setup.
1. Clone and Install
The extension must be installed inside your OpenClaw extensions directory. Navigate there first (creating it if necessary), then clone and install:
mkdir -p ~/.openclaw/extensions/
cd ~/.openclaw/extensions/
git clone https://github.com/niyazmft/openclaw-zulip-bridge.git
cd openclaw-zulip-bridge
npm install
openclaw plugins install ./ --link
openclaw plugins enable zulip
Note on Linked Plugins: The --link flag creates a symbolic link from the OpenClaw extensions directory (typically ~/.openclaw/extensions/zulip) back to your local repository checkout. This means the local repo is the source of truth for the installed plugin; any local code changes are reflected immediately after an OpenClaw restart without re-installing.
2. Configure OpenClaw
It is highly recommended to use
environment variables for your Zulip credentials to avoid storing secrets in plaintext in your configuration file.
Recommended: Using Environment Variables
Set the following variables in your shell or
.env file:
ZULIP_API_KEY: Your bot's API key.
ZULIP_EMAIL: Your bot's email address.
ZULIP_URL: The base URL of your Zulip server.
Then, your ~/.openclaw/openclaw.json can remain simple:
{
"channels": {
"zulip": {
"enabled": true,
"dmPolicy": "allowlist",
"allowFrom": [
"user@example.com"
]
}
},
"plugins": {
"allow": ["zulip"],
"entries": {
"zulip": {
"enabled": true
}
},
"load": {
"paths": [
"~/.openclaw/extensions/zulip"
]
}
}
}
3. Restart and Verify
Restart OpenClaw to apply the changes.
Verification Steps:
- Check Logs: Confirm success by looking for the initialization marker:
-
zulip queue registered [accountId=default queueId=... lastEventId=...]
- (Or
zulip queue loaded [...] if resuming from a previous session)
- Test DM: Send a Direct Message to the bot. If
dmPolicy is pairing (default), it should respond with a pairing code.
- Test Stream: Mention the bot in the configured stream (e.g.,
@bot-name hello). The bot should receive the message and respond.
Success is confirmed when the bot is both registered in logs and responding to messages.
ClawHub Resources
The bridge is published and maintained on ClawHub:
To install via ClawHub:
openclaw plugins install clawhub:@openclaw/zulip
Configuration Fields
The setup is designed to work within ~/.openclaw/openclaw.json. Here are the core fields you can configure:
enabled: (boolean) Set to true to enable the Zulip channel.
site: (string) The base URL of your Zulip server. These are interchangeable aliases.
email: (string) The email address of your Zulip bot.
apiKey: (string) The API key for your Zulip bot.
streams: (string[]) List of streams to monitor. Use ["*"] for all.
dmPolicy: (string) Controls who can DM the bot. Options: pairing, allowlist, open, disabled.
groupPolicy: (string) Controls stream access. Options: allowlist, open, disabled.
allowFrom: (string[]) Authorized Zulip emails or user IDs (for DMs and commands).
chatmode: (enum) oncall (default), onmessage, or onchar.
streaming: (boolean) Core OpenClaw field to enable/disable response streaming.
For a full list of over 20+ configuration options (reactions, media limits, etc.), see docs/config.md.
Troubleshooting
- Plugin Not Recognized: Run
openclaw plugins list to verify zulip is installed and enabled.
- Check the symlink:
ls -l ~/.openclaw/extensions/zulip should point to your repo checkout.
- Queue Registration Fails: Verify
ZULIP_URL is reachable, and that ZULIP_API_KEY and ZULIP_EMAIL match exactly.
- Bot Not Responding in Streams: Ensure the bot is a member of the stream and that the stream name is in the
streams array.
- Logs show
mention required: By default, the bot only responds to @mentions in streams. Mention the bot or change chatmode to onmessage.
Advanced Configuration
The bridge supports complex setups, including multiple accounts and custom traffic policies.
- Multiple Accounts: See docs/config.md for how to define additional accounts.
- Traffic Policies: Detailed info on
dmPolicy and groupPolicy is available in docs/config.md.
- Observability: For machine-parseable log schemas and monitoring tips, see docs/observability.md.
- Smoke Testing: Step-by-step verification guide in docs/smoke-test.md.
Development
Prerequisites
- Node.js (Latest LTS recommended)
npm
Local Setup
- Install dependencies for plugin development:
npm install
- Run tests and type checks:
npm run check
This npm install step is for contributing to or testing the plugin codebase; it is not the command for installing the plugin into your OpenClaw runtime.
Project Structure
src/ — Plugin source code
-
zulip/ — Zulip-specific client, monitoring, and policy logic
test/ — Local regression tests
docs/ — Supporting documentation
License
Refer to the root project license for terms and conditions.