@happyvertical/smrt-workflows
Durable workflow runs: ordered host steps over registered prompts, with tracked calls, checkpoints, repair, approval, and budgets.
What it gives you
Durable workflow runs: ordered host steps over registered prompts, with tracked calls, checkpoints, repair, approval, and budgets.
- 01A step names a registered prompt, a JSON Schema for its output, and an optional check
- 02Output that fails the schema is repaired up to the budget, then the run fails
- 03A budget limit leaves the run stopped and resumable; a cancel ends it
- 04A job handler works each run with claim fencing
Runs live in core
The package has no models and creates no tables. Runs, events, and checkpoints live in the system tables of smrt-core. The package replaces the design runs of smrt-inference.
Every step call is tracked
A step resolves its prompt through resolvePrompt and calls the tracked client inside the run. The budget reserves each call. A call event and a usage row record the step, the attempt, and the prompt hash.
Checks, approval, and retry
The host check can reject output, ask for the step again, finish the run early, or pause it for a person’s approval. A failed run can restart from its last accepted step as a new run.
Background execution
createWorkflowRunJobs registers a named job handler and admits one job for each run. Create the host at startup, before any runner claims work. Steps and checks must be safe to repeat after a crash.
Package UI
No UI layer to carry
This package stays focused on models, runtime behavior, or tooling. Build its interface with smrt-ui, or use a related domain package that exposes a /svelte entry point.
Intentionally headless
Package previews
No playground module yet
This package does not currently export a ./playground module. Its component names and import path remain available in the Components tab.
Intentionally not registered
Generated interface
REST
The exact route set comes from each model's @smrt({ api }) policy
and the application manifest—not from a second controller definition.
The package registers no models. It depends on smrt-core, smrt-prompts, and smrt-jobs, and adds no generated surface.
Generated interface
MCP
AI tools are generated from the methods you explicitly include. Their inputs are validated against the same model metadata used by REST and CLI.
The package registers no models. It depends on smrt-core, smrt-prompts, and smrt-jobs, and adds no generated surface.
Browser-native agent interface
WebMCP
The generated web definitions carry the same tool names, descriptions, and JSON Schema
inputs as MCP. smrt-web registers them with document.modelContext.
The package registers no models. It depends on smrt-core, smrt-prompts, and smrt-jobs, and adds no generated surface.
Generated interface
CLI
The app CLI turns manifest resources into predictable operator commands while keeping package-specific actions close to their models.
The package registers no models. It depends on smrt-core, smrt-prompts, and smrt-jobs, and adds no generated surface.