跳转到主要内容
OpenProse 是一种可移植、Markdown 优先的工作流格式,用于编排 AI 会话。在 OpenClaw 中,它以插件形式提供,会安装一个 OpenProse Skills 包和一个 /prose 斜杠命令。程序位于 .prose 文件中,并且可以 通过显式控制流生成多个子智能体。

安装

启用 OpenProse 插件并重启 Gateway 网关。

运行程序

使用 /prose run 执行 .prose 文件或远程程序。

编写程序

使用并行和顺序步骤编写多 Agent 工作流。

安装

1

启用插件

OpenProse 已内置,但默认禁用。启用它:
openclaw plugins enable open-prose
2

重启 Gateway 网关

openclaw gateway restart
3

验证

openclaw plugins list | grep prose
你应该会看到 open-prose 已启用。/prose Skills 命令现在 可在聊天中使用。
从仓库检出版本中,你可以直接安装该插件: openclaw plugins install ./extensions/open-prose

斜杠命令

OpenProse 将 /prose 注册为用户可调用的 Skills 命令:
/prose help
/prose run <file.prose>
/prose run <handle/slug>
/prose run <https://example.com/file.prose>
/prose compile <file.prose>
/prose examples
/prose update
/prose run <handle/slug> 会解析为 https://p.prose.md/<handle>/<slug>。 直接 URL 会原样使用 web_fetch 工具获取。 顶层远程运行是显式的。.prose 程序中的远程导入是 传递性的代码依赖:在 OpenProse 获取任何远程 use 目标之前, 它会显示已解析的导入列表,并要求操作员针对该次运行准确回复 approve remote prose imports

它能做什么

  • 通过显式并行实现多 Agent 研究和综合。
  • 可重复、审批安全的工作流(代码审查、事件分诊、内容流水线)。
  • 可在受支持的 Agent Runtimes 中运行的可复用 .prose 程序。

示例:并行研究和综合

# Research + synthesis with two agents running in parallel.

input topic: "What should we research?"

agent researcher:
  model: sonnet
  prompt: "You research thoroughly and cite sources."

agent writer:
  model: opus
  prompt: "You write a concise summary."

parallel:
  findings = session: researcher
    prompt: "Research {topic}."
  draft = session: writer
    prompt: "Summarize {topic}."

session "Merge the findings + draft into a final answer."
  context: { findings, draft }

OpenClaw 运行时映射

OpenProse 程序会映射到 OpenClaw 基元:
OpenProse 概念OpenClaw 工具
生成会话 / Task 工具sessions_spawn
文件读取 / 写入read / write
Web 获取web_fetch(需要 POST 时使用 exec + curl)
如果你的工具允许列表阻止了 sessions_spawnreadwriteweb_fetch,OpenProse 程序将失败。请检查你的 工具允许列表配置

文件位置

OpenProse 将状态保存在工作区的 .prose/ 下:
.prose/
├── .env                      # config (key=value), e.g. OPENPROSE_POSTGRES_URL
├── runs/
│   └── {YYYYMMDD}-{HHMMSS}-{random}/
│       ├── program.prose     # copy of the running program
│       ├── state.md          # execution state
│       ├── bindings/
│       ├── imports/          # nested remote program runs
│       └── agents/
└── agents/                   # project-scoped persistent agents
用户级持久智能体(跨项目共享)位于:
~/.prose/agents/

状态后端

状态会写入工作区中的 .prose/runs/...。不需要额外 依赖。
保存在上下文窗口中的临时状态;使用 --in-context 选择。 适合小型、短生命周期的程序。
使用 --state=sqlite 选择。需要 PATH 中存在 sqlite3 二进制文件 (缺失时回退到文件系统);状态会写入 .prose/runs/{id}/state.db
使用 --state=postgres 选择。需要 psql,并且需要在 OPENPROSE_POSTGRES_URL 中提供连接字符串(在 .prose/.env 中设置)。
Postgres 凭证会流入子智能体日志。请使用专用的、 最小权限数据库。

安全

.prose 文件视为代码。运行前请审查它们,包括远程 use 导入。顶层 /prose run https://... 请求是显式的,但 传递性远程导入在获取或执行之前需要逐次运行审批。使用 OpenClaw 工具允许列表和审批关卡来控制副作用。对于确定性、带审批门控的工作流, 可与 Lobster 对比。

相关

Skills 参考

OpenProse 的 Skills 包如何加载,以及适用哪些门控。

子智能体

OpenClaw 原生多 Agent 协调层。

文本转语音

向你的工作流添加音频输出。

斜杠命令

所有可用聊天命令,包括 /prose。
官方网站:https://www.prose.md