agent-operated-workflows
它能做什么
这个技能说明一个可重复的业务流程何时应由 AI 智能体控制,以及如何构建。适合设计需要处理杂乱、真实世界状态的自动化的团队。
适用场景
- ✓一个流程有清晰的正常路径,但真实世界的状态杂乱或难以预测的时候。
- ✓你需要让某个操作能够基于已验证的证据安全恢复的时候。
- ✓你需要决定由智能体还是普通代码控制某个流程的时候。
技能链接
https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/agent-operated-workflows/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们的发票匹配流程步骤清楚,但数据杂乱。应该由智能体来运行,还是用普通代码?”
每周 5 个新技能,1 分钟读完。
工作原理
它比较穷举式代码的成本与智能体判断的价值,然后说明智能体如何观察、行动、检查,并在必要时上报。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Agent-Operated Workflows
An Agent-Operated Workflow is a bounded procedure whose control loop belongs to an agent. The agent observes, interprets, sequences bounded actions, verifies their effects, adapts, and escalates genuine ambiguity. Deterministic code remains the exact substrate; it does not pretend to understand every state of a brownfield world.
Name the architecture before using it
- AI-enabled software: application code owns the control loop and calls a model as one capability.
- Agent-Operated Workflow: an agent owns one bounded procedure with a start and stop condition.
- Agent-Operated Software: an OpenRig agent or rig participates in an ongoing application's live
backend or control loop. It may run many workflows; see
agent-operated-software.
Calling a model is not enough. A deterministic program that consults a model still owns its loop.
Decide whether the agent earns the loop
Use an agent when the happy path is deterministic but the environment is brownfield, variable, partially knowable, or disproportionately expensive to model exhaustively. The judgment is in discovering what is true and choosing the next safe act.
Prefer ordinary code when the state space is closed and code is simpler and more reliable than judgment. A parser, fixed data transformation, or fully enumerated state machine does not become better because an agent drives it.
Keep ownership explicit
| Owner | Responsibility |
|---|---|
| Runbook | owns policy, the mental model, checkpoints, stop conditions, and escalation rules |
| Deterministic tools | own context gathering and bounded exact actions |
| Agent | owns interpretation, sequencing, adaptation, and effect verification |
| Human | owns destructive ambiguity and product policy |
The runbook guides judgment; tools enforce the invariants that must not be arguable.
Operate
- Establish identity, durable state, the runbook, and the promised outcome.
- Inspect with side-effect-free reads or an explicit plan mode.
- Choose one bounded action from observed state; do not mechanically replay the happy path.
- Verify the effect at the consumer or state surface that could prove it wrong.
- Record an observable checkpoint before moving on, so another agent can resume.
- Continue, stop at the declared condition, or escalate with evidence and the decision needed.
An interrupted or timed-out mutation is indeterminate, never failed by assumption and never safe to retry blind. Where a compatibility period is safer, separate reversible preparation from the destructive finalizer. Idempotence is a claim to prove per action, not a label for the whole run.
Build
Expose composable verbs, not an optimistic end-to-end controller. Help is inert. Read and plan modes are explicit. Mutations are narrow and independently readable. A failure should say what was observed, why the tool stopped, what remains unchanged, the safe next choices, and where its evidence lives. Keep checkpoints durable, effects observable, and recovery possible without private developer knowledge.
A capability composition is a reusable recipe; this is the execution architecture that operates capabilities toward an outcome. Promote a proven workflow to the composition shelf only after use.
Public example: load skills/core/openrig-upgrade/SKILL.md with
rig context get for the upgrade runbook. Its adjacent scripts/ directory
contains the bounded inspection, backup, plugin-refresh and migration helpers.
Follow that runbook for the procedure; this skill carries the reusable contract.
常见问题
什么时候普通代码更好?
技能说明,状态数量封闭的情况更适合普通代码处理,例如解析器或固定的转换。
这里的上报是什么意思?
意思是智能体把真正模糊的问题交给人来决定,而不是自行猜测。
调用模型就等于智能体吗?
不等于。技能说明,调用模型的程序仍然拥有自己的循环,因此不属于智能体工作流。
详情
作者的原始描述
Use when a bounded real-world procedure has a deterministic happy path but brownfield, variable, or partially knowable state; when an operation must resume from verified evidence; or when deciding whether agent judgment or ordinary code should own a procedure's control loop.
repo: mvschwarz/openrig
热度
- GitHub 星标
- 8.6k
- 排名
- #12383
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-operated-software
8.6k帮你的智能体设计、构建或调试一个后端包含 AI 智能体的持续运行应用,例如基于 Markdown 或 JSON 的智能体控制层。
applying-a-permission-policy
8.6k帮你的智能体在团队设置时配置 AI 编程智能体使用的命令权限,让常规命令减少审批提示。
claude-compaction-restore
8.6k帮助 Claude Code 智能体在上下文被压缩后,借助保存的恢复图、对话记录和它改动过的文件,重建工作认知。
delegating-work
8.6k帮你的智能体判断任务应由自己、子智能体,还是已掌握上下文的队友来完成,并告诉你如何向该执行者交代任务。