OpenProse

OpenProse 是一种可移植的、以 markdown 为先的工作流格式,用于编排 AI 会话。在 Mayros 中,它作为插件提供,安装 OpenProse 技能包加上 /prose 斜杠命令。程序位于 .prose 文件中,可以使用显式控制流生成多个子代理。

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

功能

  • 具有显式并行性的多代理研究 + 综合。
  • 可重复的批准安全工作流(代码审查、事件分类、内容管道)。
  • 可在支持的代理运行时中运行的可重用 .prose 程序。

安装 + 启用

默认情况下禁用捆绑插件。启用 OpenProse:

bash
mayros plugins enable open-prose

启用插件后重新启动 Gateway。

开发/本地检出:mayros plugins install ./extensions/open-prose

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

斜杠命令

OpenProse 将 /prose 注册为用户可调用的技能命令。它路由到 OpenProse VM 指令并在幕后使用 Mayros 工具。

常用命令:

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

prose
# 使用两个并行运行的代理进行研究 + 综合。

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)。

Mayros 运行时映射

OpenProse 程序映射到 Mayros 原语:

OpenProse 概念Mayros 工具
生成会话 / 任务工具sessions_spawn
文件读/写read / write
Web 获取web_fetch

如果您的工具允许列表阻止这些工具,OpenProse 程序将失败。请参阅技能配置

安全性 + 批准

像对待代码一样对待 .prose 文件。运行前审查。使用 Mayros 工具允许列表和批准门来控制副作用。

对于确定性的、批准门控的工作流,请与 Lobster 进行比较。