← 返回 Skills 市场
jast-hub

Agent Office

作者 jast-hub · GitHub ↗ · v1.5.1 · MIT-0
cross-platform ⚠ suspicious
174
总下载
0
收藏
0
当前安装
8
版本数
在 OpenClaw 中安装
/install agent-office
功能描述
Agent Office:创建本地 AI 员工、office worker、AI employee 与 multi-agent office team。每个员工以独立 HTTP Worker 运行,支持 openclaw / hermes / deerflow / cli / external / stub 六种...
使用说明 (SKILL.md)

Agent Office

技能定位

这个技能用于把“员工”作为本地 HTTP Worker 管理:

  • 每个员工有自己的 worker_id
  • 每个员工占用一个端口
  • 每个员工有自己的 SOUL.md 和日志目录
  • 主控通过 /tasks 下发任务,通过 /health/state 查看状态

搜索关键词:

  • agent-office
  • agent office
  • office worker
  • AI employee
  • agent worker
  • multi-agent office

发布名和本地目录名统一为 agent-office。文档中一律优先使用相对路径 scripts/...,避免路径漂移。

内置团队预设

除了单个员工创建外,技能还支持一键套用团队预设:

预设 说明
出版公司 主编、策划、校对、封设、发行,适合内容与出版流程
编程公司 产品、前端、后端、设计、测试、项目,适合软件交付流程

命令示例:

bash scripts/apply_preset.sh --list
bash scripts/apply_preset.sh 出版公司
bash scripts/apply_preset.sh 编程公司 --dry-run

支持的引擎

引擎 适用场景 实际调用
openclaw 通用员工、代码、调研、设计 openclaw agent --agent {worker_id}
hermes Hermes 生态员工 hermes agent --json --message
deerflow 外包型复杂任务 复用共享 DeerFlow runtime,并以内嵌 DeerFlow 团队执行链完成任务
cli 接大多数本地 CLI 员工 按 profile 调用 codex / claude / aider / gemini / opencode
external 接入已在运行的现有 agent / worker 把现成 HTTP worker 桥接成员工,保留上游设定与记忆
stub 测试、占位 不启动真实进程

CLI 员工说明

cli 引擎用于把主流本地命令行代理接成一个办公室员工,而不是把它们硬编码成单独实现。

内置 profile:

profile 实际工具 传参方式
codex OpenAI Codex CLI 标准输入,默认走 codex exec --skip-git-repo-check
claude-code Claude Code 标准输入
aider Aider --message
gemini-cli Gemini CLI 标准输入
opencode OpenCode 标准输入

支持两种接法:

  • 用内置 profile:适合常见 CLI,直接复用预设命令与超时
  • --cli-cmd 覆盖:适合本机有自定义包装命令的场景

常用命令:

python3 scripts/add_worker.py --list-cli-profiles
bash scripts/add_worker.sh 小扣 cli code --cli-profile codex
bash scripts/add_worker.sh 小克 cli code --cli-profile claude-code --workspace ~/projects/demo
bash scripts/add_worker.sh 小助 cli general --cli-cmd "codex exec --skip-git-repo-check" --cli-args "--model gpt-5.4"

Codex 员工要点:

  • 不直接跑裸 codex,而是默认使用非交互模式 codex exec
  • 默认补 --skip-git-repo-check,避免员工工作目录不是 trusted git repo 时直接失败
  • 需要指定模型时,只追加自己的参数,例如 --cli-args "--model gpt-5.4"

External 员工说明

external 引擎用于接入已经在本机某个端口跑着的现有 worker / agent,而不是重新创建一个新员工内核。

它的运行规则是:

  • 上游 worker 保持原本的身份、workspace、长期记忆与系统提示
  • Agent Office 只在办公室侧创建一个桥接员工
  • 派单时会附加只读共享记忆上下文,再转发给上游
  • 移除桥接员工时,不会删除上游 worker

常用命令:

bash scripts/add_worker.sh 外挂小龙 external general --external-upstream-port 18750
bash scripts/add_worker.sh 外挂小龙 external general --external-upstream-url http://127.0.0.1:18750

DeerFlow 员工说明

deerflow 引擎用于把一个完整 DeerFlow 2.0 团队封装成办公室里的单个“外包型员工”。

它的运行规则是:

  • 办公室共享一套 DeerFlow runtime,避免每个 DeerFlow 员工重复安装
  • 每个 DeerFlow 员工单独持有自己的 homeconfig、线程与工作目录
  • 新增 DeerFlow 员工时,技能会自动安装或复用共享 runtime
  • 需要跟官方 DeerFlow 更新时,可直接执行 bash scripts/update_deerflow_runtime.sh

常用命令:

bash scripts/add_worker.sh 小D deerflow complex
bash scripts/add_worker.sh 小D deerflow complex --deerflow-update-runtime
bash scripts/update_deerflow_runtime.sh

当前约束

  • 没有默认员工,所有员工必须显式添加。
  • deerflow 员工在办公室中仍然是“一个员工”,但底层已切换为技能内嵌 DeerFlow runtime 团队。
  • 共享记忆通过 MEMORY_CLI 以可选方式启用,未配置时不影响主流程。

实际目录结构

~/.hermes/office/
├── deerflow-runtime/
│   ├── deer-flow/
│   └── homes/
│       └── {worker_id}/
├── state/
│   └── office_state.json
└── workers/
    └── {worker_id}/
        ├── SOUL.md
        ├── config.json
        └── logs/
            └── worker.log

技能预设目录:

~/.hermes/skills/agent-office/presets/
├── publishing-company.json
└── coding-company.json

说明:

  • SOUL.md:员工身份说明,由 templates/ 渲染生成
  • config.json:员工配置快照
  • worker.log:启动与运行日志

office_state.json 结构

{
  "workers": {
    "xiaolong": {
      "name": "小龙",
      "port": 5011,
      "role": "research",
      "engine": "openclaw",
      "workspace_dir": "~/.hermes/office/workers/xiaolong",
      "status": "idle",
      "config_path": "~/.hermes/office/workers/xiaolong/config.json",
      "soul_path": "~/.hermes/office/workers/xiaolong/SOUL.md",
      "added_at": "2026-04-13T00:00:00",
      "last_active": null
    }
  },
  "port_pool": {
    "used": [5011],
    "available": [5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020]
  }
}

添加员工流程

当用户说“添加一个员工,叫 XXX,职责是 YYY”时,按以下顺序执行:

Step 1:生成 worker_id 与端口

  • 中文名字转拼音 / ASCII 工号
  • port_pool.available 里取最小可用端口

Step 2:创建目录

mkdir -p ~/.hermes/office/workers/{worker_id}/logs

Step 3:生成 SOUL.md

templates/ 里按引擎选模板并渲染:

引擎 模板文件
openclaw templates/openclaw_prompt.md
hermes templates/hermes_prompt.md
deerflow templates/deerflow_prompt.md
cli templates/cli_prompt.md
external templates/external_prompt.md
stub templates/stub_prompt.md

模板变量包括:

  • {{NAME}}
  • {{ROLE}}
  • {{WORKER_ID}}
  • {{PORT}}
  • {{ROLE_DESCRIPTION}}
  • {{TIMEOUT}}

Step 4:注册 agent / 准备运行时

  • openclaw / hermes 引擎会注册本地 agent
  • cli 引擎写入 CLI profile / 命令配置
  • deerflow 引擎会自动准备共享 DeerFlow runtime、员工独立 home 与 runtime config
openclaw agents add {worker_id} --workspace ~/.hermes/office/workers/{worker_id}

Step 5:启动 worker_server.py

python3 worker_server.py \
  --port {port} \
  --worker-id {worker_id} \
  --name {name} \
  --role {role} \
  --engine {engine} \
  --workspace-dir {workspace_dir}

Step 6:严格健康检查

必须满足:

  • /health 返回 HTTP 200
  • 响应体里 status == "ok"

只要有一项不满足,员工状态就记为 not_ready,不会误记成 idle

worker_server 行为

API

方法 路径 用途
GET /health 存活检查
GET /state 当前员工状态
POST /tasks 创建任务
GET /tasks/{task_id} 查任务状态或结果
GET /tasks/{task_id}/result 只取结果

关键实现约束

  • openclaw 员工执行任务时必须使用 worker_id,不能直接用中文显示名
  • 任务标题不能通过全局共享变量透传,避免并发串单
  • hermes 子进程在员工工作目录执行,方便读本地上下文与日志
  • deerflow 任务通过技能内的 deerflow_runtime_runner.py 调共享 runtime,并读取员工独立 home/config

命令参考

以下命令都建议在技能目录中执行:

添加员工

bash scripts/add_worker.sh 小龙 openclaw research
bash scripts/add_worker.sh 小扣 cli code --cli-profile codex

应用团队预设

bash scripts/apply_preset.sh 出版公司
bash scripts/apply_preset.sh 编程公司 --dry-run

查看团队

bash scripts/list_workers.sh

健康检查

bash scripts/demo.sh

移除员工

bash scripts/remove_worker.sh 小龙
bash scripts/remove_worker.sh xiaolong

环境变量

变量 默认值 说明
HERMES_OFFICE_DIR ~/.hermes/office 办公室目录
MEMORY_CLI MemPalace CLI 路径
AGENT_OFFICE_DEERFLOW_REPO_URL https://github.com/bytedance/deer-flow.git DeerFlow runtime 来源仓库
AGENT_OFFICE_DEERFLOW_UPDATE_ON_ADD 0 设为 1 时,每次新增 DeerFlow 员工前都先更新共享 runtime

发布前自检

至少验证下面几项:

  1. python3 -m py_compile worker_server.py scripts/add_worker.py scripts/remove_worker.py scripts/apply_preset.py scripts/run_flow.py
  2. bash -n scripts/add_worker.sh scripts/list_workers.sh scripts/demo.sh scripts/remove_worker.sh scripts/apply_preset.sh scripts/run_flow.sh
  3. 添加一个 stub 员工,确认状态写入正常
  4. 添加一个 openclaw 员工,确认 /health 正常
  5. 添加一个 cli 员工,确认 --list-cli-profiles 与 worker 启动正常
  6. 添加一个 deerflow 员工,确认共享 runtime 初始化、任务回传与离职清理正常
  7. 提交一个任务,确认 /tasks/{id} 能返回 done

版本说明

1.4.2

  • 修复 DeerFlow 沙箱默认挂载范围过宽的问题,不再把整个办公室目录暴露给 DeerFlow 子任务
  • 当前 DeerFlow 员工默认只暴露 /mnt/workspace/mnt/worker,避免误读其他员工目录
  • 补充隔离挂载与模板边界约束测试,验证小D不会再串读小龙资料

1.4.1

  • 移除 1.4.0 中误写到 DeerFlow 模板与文档里的旧网关 / 旧目录调试说明
  • templates/deerflow_prompt.md 恢复为与当前内嵌 runtime 架构一致的员工说明
  • 校正文档版本说明,避免后续员工和经理被旧 DeerFlow 资产误导

1.3.0

  • deerflow 引擎改为技能内嵌 DeerFlow runtime,不再依赖外部 deerflow-worker 网关
  • 新增共享 runtime + 每员工独立 home/config 设计
  • 新增 scripts/update_deerflow_runtime.py / .sh,可直接跟随官方 DeerFlow 更新
  • 新增 DeerFlow runtime 相关测试与真实隔离烟测

1.2.0

  • 新增 cli 引擎,可把主流本地 CLI 直接接成员工
  • 内置 codexclaude-codeaidergemini-cliopencode 五个 profile
  • 支持 --cli-profile--cli-cmd--cli-args--cli-timeout--workspace
  • 新增 templates/cli_prompt.md 与对应测试

1.1.0

  • 新增 apply_preset.py / apply_preset.sh
  • 内置 出版公司编程公司 两组团队预设
  • 预设支持 --list--dry-run

1.0.1

  • 增强技能描述与标签,优化 agent office / office worker / AI employee 等搜索命中

1.0.0

  • 修复 worker_name 被误当作 worker_id 的执行错误
  • 启动后改为严格健康检查,不再用宽松返回码误判就绪
  • SOUL.md 改为真实使用 templates/ 渲染
  • shell 入口收敛到 Python 主实现,减少逻辑漂移
  • 文档与真实目录结构、命令路径、默认员工说明重新对齐
安全使用建议
This package appears to do what it says: manage local HTTP-based 'workers' and an embedded DeerFlow runtime. Before installing or running it: - Review and, if needed, override AGENT_OFFICE_DEERFLOW_REPO_URL; the default is a GitHub repo but you should only use a repository you trust because the skill will clone and run/update that code. - Do not set AGENT_OFFICE_DEERFLOW_EXTRA_MOUNTS to include sensitive host paths (home, /etc, SSH keys, etc.), as those mounts will be exposed to the embedded DeerFlow runtime. - Be aware that adding CLI workers (or passing --cli-cmd) allows execution of arbitrary local commands; only add profiles/commands you trust. - The skill operates on localhost ports 5011–5020 and uses lsof/os.kill to stop worker processes and will delete directories under ~/.hermes/office when removing workers — back up anything important first. - Note the registry metadata omission: SKILL.md lists required CLIs (openclaw, hermes) and system tools (git, lsof, uv) even though the top-level 'Requirements' block initially showed none. Treat those as real prerequisites. If you need tighter isolation, run Agent Office inside a dedicated VM/container or review/lock the env vars (repo URL, extra mounts, memory CLI) before use.
功能分析
Type: OpenClaw Skill Name: agent-office Version: 1.5.1 The agent-office skill bundle implements a complex multi-agent orchestration framework that manages local agents as HTTP workers. It features high-risk capabilities, including the automatic cloning and execution of remote code from GitHub (deerflow_runtime.py), arbitrary CLI command execution via the 'cli' engine (worker_server.py), and the ability to bridge to external network endpoints via the 'external' engine. While these functions are aligned with the stated purpose of creating an 'AI Office,' the combination of remote artifact execution, broad local process control, and the potential for RCE via the CLI engine presents a significant attack surface. No explicit evidence of malicious intent or data exfiltration was found, but the inherent risks associated with its execution model warrant a suspicious classification.
能力标签
crypto
能力评估
Purpose & Capability
The name/description (local multi-agent office) matches the included scripts and Python code: creating worker dirs, registering local agents, starting HTTP worker_server.py, managing a DeerFlow runtime, and using CLI profiles. Minor inconsistency: registry metadata at the top reported 'no required binaries / env vars', while SKILL.md and README document required CLIs (openclaw, hermes), system tools (git, lsof, uv) and configurable environment variables (HERMES_OFFICE_DIR, AGENT_OFFICE_DEERFLOW_REPO_URL, etc.). This mismatch is likely an authoring omission rather than malicious.
Instruction Scope
SKILL.md and scripts explicitly read/write ~/.hermes/office and ~/.openclaw/agents, allocate ports 5011-5020, start local HTTP workers, call local CLIs (openclaw/hermes/various CLI profiles), perform health checks via HTTP and clone/update a DeerFlow repo. These actions are consistent with the stated feature set. Attention points: worker creation can run arbitrary local CLI commands (via --cli-cmd or CLI profiles), add/remove scripts use lsof and os.kill to stop processes, and the embedded DeerFlow runner extracts and persists large text blocks — review these behaviors if you need to limit what can be executed or exposed.
Install Mechanism
No formal install spec in the registry (instruction-only), but the code performs runtime downloads/updates: it may git clone/pull the DeerFlow repo (AGENT_OFFICE_DEERFLOW_REPO_URL, default: https://github.com/bytedance/deer-flow.git) and runs 'uv sync' inside the runtime backend. The default repo is a GitHub URL (well-known host), which is typical, but the ability to override the repo URL means you should only set that env var to trusted sources.
Credentials
The skill requests no secrets and declares only configuration-style environment variables (workspace dir, optional memory CLI, DeerFlow repo URL, update-on-add flag, model names). Those are proportionate to its functionality. Two cautionary envs: AGENT_OFFICE_DEERFLOW_REPO_URL (can point to arbitrary code to be cloned and executed/installed) and AGENT_OFFICE_DEERFLOW_EXTRA_MOUNTS (can cause host paths to be mounted into embedded runtime), both of which can affect host safety if misconfigured.
Persistence & Privilege
The skill does not request always:true and does not modify other skills. It writes and manages its own state under ~/.hermes/office, can create/remove worker directories and DeerFlow homes, and will kill processes bound to worker ports when removing workers. These are appropriate for a local worker-management tool but mean the skill has the normal file- and process-level privileges on the host where it's run.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-office
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-office 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.5.1
Fix Codex CLI worker integration: use codex exec, add --skip-git-repo-check, update docs and tests.
v1.5.0
Add external bridge worker engine for existing HTTP agents; preserve upstream memory/settings; install to manager skill.
v1.4.2
修复 DeerFlow 沙箱挂载范围过宽导致可能串读其他员工目录的问题;当前只暴露 /mnt/workspace 与 /mnt/worker,并补充隔离验证。
v1.4.1
修正 1.4.0 中误写到 DeerFlow 模板与文档里的旧网关/旧目录调试说明;恢复与当前内嵌 runtime 架构一致的 DeerFlow 员工说明。
v1.4.0
Agent Office 1.4.0 - Added detailed DeerFlow 2.0 engine integration and debugging notes to SKILL.md, including API format, ports, authentication, config locations, and response handling tips. - Improved documentation for DeerFlow teamwork, configuration hot-reload, and runtime behavior. - Added a _meta.json metadata file. - Updated templates/deerflow_prompt.md and other docs for better clarity and accuracy regarding DeerFlow engine usage.
v1.3.0
新增 CLI 员工引擎与内置 profiles;新增团队预设;deerflow 改为技能内嵌共享 runtime,支持每员工独立 home/config 与 update_deerflow_runtime 更新脚本。
v1.0.1
Improve search discoverability for agent office, office worker, AI employee, and agent worker queries.
v1.0.0
Initial stable release under the new Agent Office name. Includes worker_id routing fixes, strict health checks, template rendering, unified shell/python entrypoints, and regression tests.
元数据
Slug agent-office
版本 1.5.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 8
常见问题

Agent Office 是什么?

Agent Office:创建本地 AI 员工、office worker、AI employee 与 multi-agent office team。每个员工以独立 HTTP Worker 运行,支持 openclaw / hermes / deerflow / cli / external / stub 六种... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 174 次。

如何安装 Agent Office?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-office」即可一键安装,无需额外配置。

Agent Office 是免费的吗?

是的,Agent Office 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Office 支持哪些平台?

Agent Office 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Office?

由 jast-hub(@jast-hub)开发并维护,当前版本 v1.5.1。

💬 留言讨论