@zhengyi003

OpenClaw Agent Team

Recruit and manage OpenClaw work agents through a guided web GUI. Includes a copy-ready iPhone connection line for Thou.

当前版本
v0.2.0
code-plugin社区source-linked

OpenClaw Agent Team

License: Apache-2.0

A desktop plugin for OpenClaw that keeps agent creation simple and gives Thou on iPhone a copy-ready connection line.

What this plugin does

OpenClaw Agent Team lives at http://127.0.0.1:38127/agent-team/ on your Mac. It does three things:

  1. Recruit — create a new work agent through a guided flow that wraps the official OpenClaw CLI. Choose from three role templates (Scout, Operator, Auditor) designed as a lightweight operating team for solo founders.
  2. Dismiss — scan the current agent roster and remove agents you no longer need.
  3. iPhone Connection — prepare a single connection line that Thou on iPhone can paste to initiate the bridge.

iPhone Connection is a plugin-side capability that has been verified on the author's device. Public availability depends on Thou's own distribution status — until Thou is publicly available, this tab serves as a preview of the integration.

This plugin does not aim to become a full agent control panel, group chat surface, or meeting room. It stays narrow on purpose.

Quick install

Install from ClawHub (recommended once published):

openclaw plugins install clawhub:@zhengyi003/openclaw-agent-team

Or install from a local checkout during development:

openclaw plugins install --path /path/to/openclaw-agent-team

Then open http://127.0.0.1:38127/agent-team/ in your browser.

Troubleshooting

If the page won't open after a day or two, check in this order:

  1. Confirm the URL is still http://127.0.0.1:38127/agent-team/.
  2. Make sure no stale local preview process is holding port 38127.
  3. If the page opens but connection details look stale, restart the host gateway (openclaw gateway restart) — don't just rebuild the plugin.
  4. If connection details are still unavailable, verify Tailscale is running.

Before publishing

Run these checks before a release:

  1. npm run build
  2. clawhub package publish <source> --family code-plugin --dry-run
  3. Manual smoke test of Recruit, Dismiss, and iPhone Connection

For contributors

Architecture overview

The plugin is a TypeScript package structured around four groups:

  • Plugin shellpackage.json, openclaw.plugin.json, index.ts, setup-entry.ts
  • Channel & configsrc/channel/ (entry, base, accounts, types, transport, setup) and src/setup/
  • Bridge & runtimesrc/bridge/ (auth, server, runtime), src/runtime.ts, src/outbound.ts, src/connection-share.ts
  • Agent Team GUIsrc/gui/ (server, render, state, http, service)

The GUI server runs on loopback only, defaults to port 38127, and serves the single-page Agent Team workbench.

Key design decisions

  • Agent creation and deletion always go through the official OpenClaw CLI (openclaw agents add --non-interactive --json, openclaw agents delete --force --json) — the plugin never writes host config directly.
  • New agents default to workspace root ~/Documents/OpenClaw.
  • The iPhone connection tab derives its data from the Thou channel bridge runtime, not from a separate probe.
  • The bridge server adds active WebSocket heartbeats with pong timeout to shorten the false-online window after a connection drops.

Build and validate

npm run build          # compile TypeScript
npm run clean          # remove dist/
npm run validate:outbound          # test outbound delivery through WebSocket bridge
npm run validate:session-routing   # test session routing through bridge + gateway

Source map

FileRole
src/channel/base.tsThou channel meta, setup entry, account/config boundary
src/channel/entry.tsSecurity policy, pairing semantics, outbound hooks
src/channel/accounts.tsParse channels.thou config into runtime account
src/channel/types.tsChannel config and resolved types
src/channel/transport.tsTransport boundary — declares current bridge as transitional
src/setup/core.tsSetup input validation and config write-back
src/bridge/auth.tsPersist account-level auth token in OpenClaw state dir
src/bridge/runtime.tsBind bridge to host account lifecycle
src/bridge/server.tsReal WebSocket bridge — device auth, chat, history, sessions
src/runtime.tsPlugin runtime reference holder
src/outbound.tsText/media outbound through bridge sender
src/connection-share.tsGenerate Thou connection payload (Tailnet-preferred)
src/gui/server.tsHTTP server, routing, startup
src/gui/render.tsSingle-page HTML, CSS, and front-end script
src/gui/state.tsShared types and constants
src/gui/http.tsRequest/response helpers
src/gui/service.tsAgent CRUD, connect summary, preview logic

Current boundary

What this plugin owns in v0.1:

  • Config/account resolution
  • Setup input and config persistence
  • dmPolicy / allowFrom security surface
  • Pairing semantics
  • Outbound interface

What this plugin does not own (and should not absorb from sidecar):

  • Thou private auth.token protocol
  • Custom Gateway WebSocket client
  • Launch scripts, LAN IP display, magic pairing-code UI

The chat-start / chat.chunk / chat.done protocol in src/bridge/server.ts is a transitional transport. It will be replaced when OpenClaw exposes a stable channel-level transport surface.

Roadmap

Transport-layer work planned beyond the current transitional bridge:

  1. Inbound node/session binding
  2. Device pairing bootstrap
  3. Outbound delivery projection
  4. Transcript/session history alignment

Validation scripts

npm run validate:outbound — Tests outbound delivery through a real WebSocket bridge, without requiring a full OpenClaw host.

npm run validate:session-routing — Tests session creation → message send → sessions.list/chat.history landing on the same session, using the local Thou bridge and Gateway. It verifies that:

  1. The plugin outbound entry is no longer a placeholder.
  2. Assistant text and media text both flow through the bridge to an authenticated Thou device connection.
  3. The bridge sender returns a stable delivery result structure.

About the ws dependency

ws is a Node.js WebSocket library used by:

  1. src/bridge/server.ts — the Thou bridge WebSocket server
  2. scripts/validate-outbound.ts — the validation script's WebSocket client

It is an npm runtime dependency of the plugin. End users who install through ClawHub or npm do not need to install it separately.

Thou iOS ATS note

The current bridge uses ws:// (plain WebSocket). The App Transport Security adjustment belongs to the Thou iOS project, not to this plugin. When Thou moves to wss:// or ships with the right ATS exception, no user action is needed on the plugin side.

源码与版本

源码仓库

Zhengyi003/openclaw-agent-team

打开仓库

源码提交

2b29116d41ba79a8184fb17a5e20122dc6617c43

查看提交

安装命令

openclaw plugins install clawhub:@zhengyi003/openclaw-agent-team

元数据

  • 包名: @zhengyi003/openclaw-agent-team
  • 创建时间: 2026/06/13
  • 更新时间: 2026/06/13
  • 执行代码:
  • 源码标签: v0.2.0

兼容性

  • 构建于 OpenClaw: 2026.5.7
  • 插件 API 范围: ^1.0.0
  • 标签: latest
  • 文件数: 43