SDK
A flow you build on the canvas isn't tied to us. Export it, and the SDK runs that same flow inside your own Node.js process — the same behavior you'd get from the hosted run API, with the run happening on your side.
npm install @zerowidth/workbench-sdk
import Workbench from "@zerowidth/workbench-sdk"
The package is @zerowidth/workbench-sdk, published under Apache-2.0.
When to reach for it
- No lock-in. Your flows are portable. The day you want to run them yourself — or just want a fallback — the flow you already designed is what runs.
- Your data shouldn't leave your network. Run the flow next to the data instead of sending it to a hosted endpoint.
- Full control of the runtime — your own keys, your own model providers, your own logging and retries around each run.
- Offline or air-gapped execution, where calling a hosted API isn't an option.
If none of those apply, the hosted run API runs the same flow with nothing to export or host — start there.
How it fits together
- Design on Workbench
Build and test the flow on the canvas as usual. The behavior is the contract — the same flow behaves the same way under the SDK.
- Export the flow
Export the flow's definition from Workbench. That file is the portable artifact the SDK takes.
- Execute in your process
Install the package, hand it the exported flow, and run it with your inputs. Event handlers give you per-node progress, timing, and cost — the same trace you see in Devtools.
The package's own README is the full reference — the Workbench instance, the input/output system, event handlers, error handling, and examples. Start there once you've installed it.