agent-operated-workflows
What it does
This skill explains when a repeatable business procedure should be controlled by an AI agent, and how to build it. It is for teams designing automation that must handle messy, real-world state.
When to use it
- ✓When a procedure has a clear happy path but messy or unpredictable real-world state.
- ✓When you need an operation to resume safely from verified evidence.
- ✓When you must decide whether an agent or plain code should control a process.
Skill link
https://github.com/mvschwarz/openrig/blob/main/packages/daemon/assets/plugins/openrig-core/skills/agent-operated-workflows/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Our invoice matching process has clear steps but messy data. Should an agent run it, or should we use plain code?”
5 new skills a week. 1 minute to read.
How it works
It compares the cost of exhaustive code with the value of agent judgment, then sets out how the agent observes, acts, checks and escalates.
Technical content (original SKILL.md)
Original text by the author, straight from 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.
FAQ
When is plain code better?
The skill says a closed set of states is better handled by ordinary code, such as a parser or fixed transformation.
What does escalation mean here?
It means the agent hands genuine ambiguity to a person instead of guessing.
Is a model call the same as an agent?
No, the skill says a program that calls a model still owns its own loop, so it is not an agent workflow.
Details
Original description by the author
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
Popularity
- GitHub stars
- 8.6k
- Ranking position
- #12383
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
agent-operated-software
8.6kHelps your agent design, build or debug an ongoing app whose live backend includes AI agents, such as a Markdown or JSON agent control plane.
applying-a-permission-policy
8.6kHelps your agent set up the command permissions an AI coding agent uses during team setup, so routine commands run with fewer approval prompts.
claude-compaction-restore
8.6kHelps a Claude Code agent rebuild its working picture after its context is compacted, using a saved restore map, its transcript and the files it touched.
delegating-work
8.6kHelps your agent decide who should do a task, itself, a subagent or a teammate who already holds the context, and how to brief that worker.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.