Workbench quickstart
You'll build a small AI behavior on the canvas, test it, publish it, and call it from your own code. The end state is a real endpoint you can curl — and a flow whose behavior you can keep changing without changing the integration.
- Open Workbench
Go to workbench.zerowidth.ai, sign in, and pick your workspace. You'll land on the flows list.
- Create a flow
Hit New flow and pick the Agent pattern. You get a working chat assistant out of the box: a system prompt feeding a model, with chat coming in and going out. (The other patterns — classifier, structurer, judge, interviewer — are there when you need a different shape; see Flows.)
- Give it a behavior
Write a system prompt — the instructions that define how it responds. Something concrete, e.g.:
You are a release-notes writer. Given a list of merged changes, write a tight, friendly changelog entry. No marketing language.
- Test it on the spot
Open the test panel and talk to your flow. What you see here is what your code will get. Iterate the prompt until it behaves.
- Publish a version
When it's good, publish a version. A published version is a frozen snapshot — your production integration pins to it, so you can keep editing the draft without anything shipping until you publish again. (Pinning is the difference between a stable integration and one that changes whenever someone tweaks a prompt.)
- Mint an API key
In Accounts → Workspace → API keys, create a key with the
workbench:flows:runscope. Copy it when shown — it's the only time you'll see the secret. - Run it from your code
Open the flow's Devtools → Quickstart. It shows your Flow ID (a UUID — the public id, not the one in the editor URL) and a ready-made request shaped to this exact flow. Drop in your key and run it:
export ZW_API_KEY='zw_live_…' export ZW_FLOW='your-flow-id' # the Flow ID from the Quickstart tab curl -X POST https://api.zerowidth.ai/1.0/flows/$ZW_FLOW/runs \ -H "Authorization: Bearer $ZW_API_KEY" \ -H "Content-Type: application/json" \ -d '{"input":{"kind":"chat","messages":[ {"role":"user","content":"Merged: dark mode, CSV export, fixed login redirect"} ]},"source":{"kind":"published"}}'The response carries the flow's outputs, the run's cost, and a duration. That's your flow, live.
What's next
The model underneath — node families, input/output shapes, the authoring patterns, how versioning works.
ReferenceRun a flowThe full request + response shape — form vs chat inputs, streaming, pinning versions, errors.
CaliperProve it keeps workingScore this flow against a rubric so a regression shows up before it ships.
GuideThe improvement loopWhere building a flow fits in the bigger find → build → prove loop.