Flowstate

Write a workflow once, rehearse and test it on your machine, then run the same
workflow durably on Temporal, governed by identity, policy, and secrets.
Flowstate is a typed, durable, debuggable workflow language and engine, for work
that has to finish correctly despite crashes, network failures, and waits of
hours or days. Business processes with people in the loop; long-lived entities
that many callers address; agents that act under policy; provisioning that must
be undone when a later step fails; data pipelines; incident runbooks; releases
that roll out in stages. You describe the workload in
a Flowfile, YAML for structure and CEL expressions for data and
conditions. Flowstate validates it, compiles it into a typed Protobuf
specification, and runs that specification either in-process for rehearsal or
on Temporal, where every step is recorded and a run survives any process
stopping.
Authors get a fast local loop: validation with line and column, tests on a
virtual clock, a step debugger, and editor and agent integration. Operators get
authenticated callers and approvers, policy over what workflows may reach and
read, worker-side secret resolution, tenant isolation, and an audit trail.
Flowstate works alongside CI, services, and your existing Temporal usage rather
than replacing them. Why Flowstate, and when not compares
it with the alternatives, including the workloads it does not fit.
[!WARNING]
Flowstate is early software. The capabilities described here are shipped and
tested, but the interfaces are not yet stable: expect breaking changes, and
see SUPPORT.md.
A Flowfile
A customer asks for a refund. This workflow totals the lines of the request and
checks the total against a limit that belongs to the workflow rather than to
whoever starts it, then tells the customer what happened. A payout, and a person
in finance who must approve the large ones, are the next step; see
examples/refund-request.
edition: v2026.4
name: refund-triage
inputs:
order_id:
type: string
required: true
lines:
type: list(int)
default: [1500, 4200]
vars:
auto_limit_cents: 5000
steps:
- id: total
value: ${inputs.lines.sum()}
- id: needs_review
value: ${steps.total.value > vars.auto_limit_cents}
- id: tell
log:
message: refund of ${steps.total.value} cents on ${inputs.order_id} (needs review ${steps.needs_review.value})
outputs:
needs_review:
value: ${steps.needs_review.value}
total_cents:
value: ${steps.total.value}
$ flow validate workflow.yaml
workflow.yaml: ok
$ flow run local workflow.yaml --input order_id=o-1 -o json | jq -c .runOutputs
{"needs_review":true,"total_cents":5700}
inputs.lines is the run's typed argument, a list of integers with a default.
total and needs_review are step ids; reading ${steps.total.value} is how
needs_review gets the total, and also what orders it after total. The
outputs are the run's result. Every complete Flowfile in this README and the
core guides is compiled and linted by the test suite.
Start smaller: one step
edition: v2026.4
name: hello-world
steps:
- id: hello
log:
message: hello world
Run it with flow run local workflow.yaml. No server, worker, or Temporal is
involved. A single task can also run without a Flowfile through
flow task run; the task reference lists what each
task takes.
Go further: an authenticated approval
The approval-gate example waits for a durable signal
and accepts it only from an approver with the right verified identity, who is
not the person who asked. The server checks the sender before Temporal receives
the signal, and no process stays open while the run waits.
Rehearse its approvals, timeout, and refusals locally, on a virtual clock:
$ flow test examples/approval-gate/
Then follow its authenticated approval walkthrough
to run it durably with separate requester and approver credentials.
From file to durable run
flowchart LR
subgraph author["1 · Author"]
File["<b>Flowfile</b><br/>YAML + CEL"]
Check["validate · compile · test"]
end
Spec["<b>Workflow protobuf</b><br/>typed and frozen"]