durable-workflow-runtime

Executes durable multi-step workflows through a start/resume bridge protocol with persisted run state.

Updated May 13, 2026
One-click install
npx skills add https://github.com/onesmash/slm-as-harness --skill durable-workflow-runtime-onesmash
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: durable-workflow-runtime
Source: https://github.com/onesmash/slm-as-harness/tree/main/skills/durable-workflow-runtime
Command: npx skills add https://github.com/onesmash/slm-as-harness --skill durable-workflow-runtime-onesmash

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pydantic, pydantic-graph, pytest, and includes scripts (resource) and references (resource) components.

What problem does it solve? Long-running agent tasks lose state, drift into free-form chat, and improvise branching decisions when a conversation is interrupted. This Skill enforces a deterministic start → yield → observation → resume → done loop where a bundled runtime owns state, retries, and branch selection while the host agent only executes the current step. ## Core Features & Use Cases - Bridge-driven execution loop: scripts/bridge.py start returns a yield, done, or error response; the host executes the yielded prompt envelope and replies with a structured Observation via bridge.py resume until the runtime declares the run terminal. - Published workflow catalog: workflow-binding.json ships workflows such as demo-prompt-loop, academic-research-pipeline, ios-ai-assisted-development-flow, co-storm-autonomous-research, and earnings-reviewer, selectable explicitly with --workflow-id or via the configured default. - Companion subskills: setup, inject, pack, register, delete, and workflow-creator handle installing slash shortcuts, injecting catalog blocks into AGENTS.md/CLAUDE.md, exporting/importing .flow archives, removing workflows, and authoring new workflows from a spec.json blueprint. - Use Case: Run /durable-workflow-runtime academic-research-pipeline to drive a multi-stage research workflow where each stage is verified, retries surface a compact retry_context, and blocked steps pause safely for external input instead of failing silently. ## Quick Start Invoke /durable-workflow-runtime with an optional workflow id and let the agent allocate host I/O paths with scripts/host_io.py before calling bridge.py start.

Frequently Asked Questions about durable-workflow-runtime

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a durable workflow with start and resume?▼

Allocate a request path with scripts/host_io.py pending-start, write a JSON object with task_input, context, and constraints, then call bridge.py start. Execute each yielded prompt_envelope and reply with an Observation through bridge.py resume until the response kind is done.

How do I choose which workflow to start?▼

Pass --workflow-id with a workflow published in workflow-binding.json, such as academic-research-pipeline or earnings-reviewer. If omitted, the adapter falls back to default_workflow_id; an explicit but unpublished id fails instead of silently falling back.

Why does bridge.py reject my request file in /tmp?▼

Normal start, preflight, and resume payloads must live under <repo-root>/.durable-workflow-runtime/host-io/. Allocate paths with scripts/host_io.py; the --allow-unsafe-host-io-paths flag exists only for explicit transport debugging.

What does a yield response with retry_context mean?▼

It means the runtime re-yielded a step, typically because a verifier failed, and retry_context carries a compact category, summary, and repair requirements. Surface it for diagnosis but do not use it to choose a different branch; routing stays runtime-owned.

Can I create a new durable workflow?▼

Yes, use the workflow-creator companion: run scripts/create_workflow.py with a kebab-case workflow id, fill the generated spec.json with concrete stages, then rerun with --force to regenerate contracts, prompts, policy, verifiers, and tests.

What Python packages does the runtime require?▼

The requirements.txt pins pydantic, pydantic-graph, and pytest. Install them into a virtualenv before running bridge.py or the runtime regression tests, otherwise imports fail with ModuleNotFoundError.