通过 Agent 使用 BPMAX Business Skill
BPMAX Business Skill(BBS)把特定业务场景的流程、前置检查、输入数据和验收规则封装成 Agent 可复用能力。人类用户通常不需要安装脚本,只需要告诉 OpenClaw、Codex 等 Agent 想完成什么业务。
让 Agent 查找业务 Skill
请创建一条采购申请。Agent 应先同步轻量 Catalog,再查询和 ensure 目标 Skill。不能默认安装全部业务 Skill。
OpenClaw 使用 --agent openclaw,其他运行时使用各自的 adapter 名称。下面的 <agent> 必须替换为当前真实运行时,避免把 Skill 安装到错误的 Agent 目录。
高级命令:
bpmax-cli --config-dir <config_dir> bbs sync \
--agent <agent> \
--profile <profile> \
--format json
bpmax-cli --config-dir <config_dir> bbs list \
--profile <profile> \
--format json
bpmax-cli --config-dir <config_dir> bbs ensure <key-or-id> \
--agent <agent> \
--profile <profile> \
--format json人类需要提供什么
- 目标业务,例如采购申请、报销、入库或门店操作。
- 目标 BPMAX 环境。
- 真实业务数据和限制。
- 是否允许创建、提交或推进真实记录。
Agent 负责发现 flow_type、项目字段、接口、gate 和所需权限。
Gate 是什么
BBS 可以声明执行前和执行后的业务 gate:
bpmax-cli bbs gate <skill-key> \
--stage preflight \
--input @input.json \
--profile <profile> \
--format jsonbpmax-cli bbs gate <skill-key> \
--stage verify \
--input @result.json \
--profile <profile> \
--format jsonpreflight 失败时不得继续写操作;verify 失败时不得声称业务完成。
插件 Skill
部分能力属于 BPMAX 插件,不属于通用 BBS。流程配置里出现插件扩展时,Agent 应检查插件声明的 Agent Skill:
请检查当前流程使用的 BPMAX 插件配置是否正确。高级命令:
bpmax-cli plugin skills list --profile <profile> --format json
bpmax-cli plugin skills state --profile <profile> --format json
bpmax-cli plugin skills ensure <plugin> --agent <agent> --profile <profile> --format json插件启用状态按平台全站范围判断,不应错误绑定到 workspace。
Skill 不存在时
用户无需判断是否存在匹配 Skill。Agent 应自动查询;没有匹配能力时,说明是否可以使用通用能力,或建议创建新的业务 Skill。
新 BBS 应保持单一业务目的,不要把多个无关流程打包成一个万能 Skill。
Skill 版本过旧时
用户无需主动检查版本。Agent 在使用业务 Skill 前必须自动确认并安装最新可用版本。
Agent 应输出远端版本、本地版本、安装路径和更新结果。
Gate 阻断时
为什么无法继续?我还需要补充什么?常见阻断包括:
- 必填业务数据缺失。
- 当前用户没有处理权限。
- 项目不处于允许状态。
- 上游流程或关联记录未完成。
- Skill 版本与当前平台配置不一致。
BBS 审计
正式业务调用可以记录 invocation start/finish,使平台知道使用了哪个 Skill、执行结果和错误摘要。审计不得保存敏感 payload。
开发和发布新的 BBS
Skill 作者可以让 Agent 先生成结构和 gate,再执行 lint、打包和发布:
请为“预算查询”设计一个 BPMAX Business Skill。
先给我看设计方案,不要直接发布。标准 Skill zip 根目录必须包含 SKILL.md,frontmatter 中声明名称、版本和描述。正式发布前必须递增版本并写 release note。
高级命令:
bpmax-cli bbs lint --zip <skill.zip> --format json
bpmax-cli bbs create \
--name "预算查询" \
--scene "预算分析" \
--zip <skill.zip> \
--profile <profile> \
--format json
bpmax-cli bbs upgrade <key-or-id> \
--zip <skill.zip> \
--release-note "补充预算执行率统计" \
--profile <profile> \
--format json创建和升级属于远端写操作,必须先展示 lint、包内容和版本差异。
最终结果
Agent 最终应告诉用户:
- 使用了哪个 BBS 或插件 Skill。
- Skill 版本和是否更新。
- preflight / verify gate 结果。
- 实际创建或修改的业务对象。
- 对应项目 URL 和可验证证据。
- 未完成或需要人工处理的步骤。
