OpenProse

OpenProse 是一种便携的、以 Markdown 为核心的工作流格式,用来编排 AI 会话。在 OpenClaw 中,它以插件形式存在——安装后会注册一组 OpenProse 技能包和一个 /prose 斜杠命令。程序写在 .prose 文件里,可以启动多个子代理,并支持显式的控制流。

官方网站:https://www.prose.md

能做什么

  • 多代理研究 + 综合,支持显式并行。
  • 可重复、可审批的工作流(代码审查、事件分类、内容流水线)。
  • 可复用的 .prose 程序,能在各种支持的代理运行时中运行。

安装和启用

内置插件默认是关闭的。启用 OpenProse:

openclaw plugins enable open-prose

启用后需要重启 Gateway。

本地开发安装:openclaw plugins install ./extensions/open-prose

相关文档:插件插件清单技能

斜杠命令

OpenProse 注册了 /prose 作为用户可调用的技能命令。它会路由到 OpenProse VM 指令,底层使用 OpenClaw 的工具。

常用命令:

/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 文件

# 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 }

文件位置

OpenProse 在工作目录下的 .prose/ 中保存状态:

.prose/
├── .env
├── runs/
│   └── {YYYYMMDD}-{HHMMSS}-{random}/
│       ├── program.prose
│       ├── state.md
│       ├── bindings/
│       └── agents/
└── agents/

用户级别的持久代理存储在:

~/.prose/agents/

状态模式

OpenProse 支持多种状态后端:

  • filesystem(默认):.prose/runs/...
  • in-context:临时性的,适合小程序
  • sqlite(实验性):需要 sqlite3 可执行文件
  • postgres(实验性):需要 psql 和连接字符串

注意:

  • sqlite/postgres 需要手动开启,目前处于实验阶段。
  • postgres 的凭据会流入子代理日志,建议使用专用的最小权限数据库。

远程程序

/prose run <handle/slug> 会解析到 https://p.prose.md/<handle>/<slug>。 直接 URL 则原样获取。这里使用 web_fetch 工具(POST 请求则用 exec)。

OpenClaw 运行时映射

OpenProse 程序会映射到 OpenClaw 的基本操作:

OpenProse 概念OpenClaw 工具
Spawn session / Task toolsessions_spawn
File read/writeread / write
Web fetchweb_fetch

如果你的工具白名单屏蔽了这些工具,OpenProse 程序将无法运行。参见 技能配置

安全与审批

.prose 文件当代码看——运行前先审查。用 OpenClaw 的工具白名单和审批门控来管理副作用。

如果需要确定性的、带审批门控的工作流,可以参考 Lobster