playbook
Playbook
流程以 JSON 形式存储。按意图搜索它们,浏览标题,一次加载一个 do。
Playbook 是一个小型 CLI 和 MCP 服务器,让智能体(或你)可以编写、查找和遵循操作指南,而无需将整个 playbook 加载到上下文中。CLI 动词保持拆分。MCP 将相关动词压缩为更少的工具。一切都是 JSON。
Python 3.10+,运行时仅使用标准库。
安装
pip install -e .
playbook searchPyPI 尚未发布。
Related MCP server: sop-mcp
文件存放位置
每个流程对应一个 JSON 文件,位于平台数据目录中:
操作系统 | 目录 |
Linux |
|
macOS |
|
Windows |
|
遵循 XDG_DATA_HOME / APPDATA / LOCALAPPDATA。命令接受流程 id,而不是路径。
结构
{
"id": "follow-playbook",
"title": "Follow a playbook procedure",
"description": "When to pick this file. Can be verbose.",
"tags": ["playbook", "follow"],
"steps": [
{
"id": "a1b2c3…",
"title": "Search by intent",
"do": "Call playbook_search with a sentence for the job."
}
]
}title — 搜索卡片上的简短名称
description — 何时选择此流程
steps — 串行。标题唯一。步骤 id 随机。
do是实际工作。
CLI
每个命令都会输出 JSON(包括错误)。
playbook create demo --title "Demo" --description "when to pick this" --tags demo
playbook add-step demo --title "First" --do "Do the first thing."
playbook add-step demo --title "Middle" --do "Do the middle." --after "First"
playbook edit demo --title "Better title"
playbook search "I want to follow a procedure"
playbook load demo
playbook load demo --full
playbook start demo --title "First"
playbook validate demo
playbook mcpsearch 采用 BM25 加上字符 n-gram。命中结果仅包含 id、title、description(默认 8 条,上限 50 条)。弱匹配会被丢弃。
load 仅包含标题。--full 包含每个 do。start 是一个 do 加上 before / after 标题。
MCP (Grok)
grok mcp add --scope user playbook -- playbook mcp如果生成的进程没有你的 shell PATH,请使用 playbook 的绝对路径。然后使用 /mcps 和 r,或新开会话。
工具 | 作用 |
| 意图搜索 |
| 加载标题、 |
| 新建流程 |
| Title / description / tags |
|
|
| 校验 |
测试
pip install -e .
python -m pytest tests/ -q许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
- mcp-serverOAuthcom.make
Give your AI agents the tools to build, manage, and run automation workflows.
Build and run agents and automations across hundreds of apps using natural language.
The governed runtime for agent skills. Search the catalog and inspect a skill before running it.
- SkilderOAuthai.skilder
One place to build, share, and govern the skills and tools your AI agents use at work.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, share, discover, and execute reusable multi-step workflow templates.MIT
- AlicenseAqualityAmaintenanceEnables AI agents to execute multi-step Standard Operating Procedures step by step, with enforcement of completion at each step, making LLM behavior predictable and auditable.53Apache 2.0
- AlicenseNot gradedqualityBmaintenanceGuides AI agents through structured, multi-step workflows with discovery, navigation, and fidelity enforcement.2Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI agents to manage, search, plan, and execute reusable skills while automatically enforcing always-on coding and reasoning guidelines. It provides workflow orchestration, permission-controlled execution, dynamic skill registration, and feedback-based ranking.96 npm1MIT