Flow
Package flow is Hanzo Flow: build an agent workflow on a visual canvas, run it, and read every run.
Package flow is Hanzo Flow: build an agent workflow on a visual canvas, run it, and read every run.
| Base URL | https://api.hanzo.ai |
| Operations | 8 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
flow
GET /v1/flow/runs
Runs reads one workflow's recorded runs: every component build with its result, keyed by component. Ownership is verified first — run records never cross the org boundary.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
workflow | query | string | — | Workflow is the UUID of the workflow whose run records to read. |
POST /v1/flow/runs
Run executes one of the caller's workflows synchronously: the graph runs in the flow service and the response carries the run's session and outputs. A graph whose components fail reports the product's own error. Runs are bounded by the product's five-minute sync ceiling.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
input | string | — | Input is the run's chat input value, handed to the graph's input node. |
session | string | — | Session groups runs into one conversation; the product mints one when absent and returns it in the response. |
tweaks | — | Tweaks override component fields for this run only (the product's tweaks document), verbatim. | |
workflow | string | — | Workflow is the UUID of the workflow to run. |
GET /v1/flow/status
Status reports whether the flow service is reachable and which version it runs. It is the product's own /health and /v1/version composed — an honest lens for "is the workflow plane up", never a fabricated ok.
GET /v1/flow/workflows/{workflow}
Workflow reads one of the caller's workflows — the full record, graph included. A workflow outside the caller's org answers 404, indistinguishable from one that does not exist.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
workflow | path | string | yes | Workflow is the workflow's UUID, taken from the path. |
PATCH /v1/flow/workflows/{workflow}
Patches one of the caller's workflows: name, description, graph, or the locked flag — only the stated fields move. Ownership is verified before the patch reaches the product.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
workflow | path | string | yes | Workflow is the workflow's UUID, taken from the path. |
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
data | — | Data replaces the workflow graph when present, verbatim. | |
description | string | — | Description replaces the description when present. |
locked | boolean | — | Locked freezes or unfreezes the workflow against edits when present. |
name | string | — | Name renames the workflow when present. |
workflow | string | — | Workflow is the workflow's UUID, taken from the path. |
DELETE /v1/flow/workflows/{workflow}
Deletes one of the caller's workflows and its runs. Ownership is verified first; a foreign id answers 404 and deletes nothing.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
workflow | path | string | yes | Workflow is the workflow's UUID, taken from the path. |
GET /v1/flow/workflows
Workflows lists the caller's workflows, paged. The list is scoped server-side to the org's project — the page can only ever hold the caller's own workflows.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | string | — | Page is the 1-based page of workflows to return. |
size | query | string | — | Size is how many workflows one page holds (the product caps it at 100). |
POST /v1/flow/workflows
Creates a workflow in the caller's org. The org's project id is pinned server-side from the validated principal — there is no field by which a caller could place a workflow in another org.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
data | — | Data is the workflow graph (the product's nodes/edges document), verbatim. | |
description | string | — | Description says what the workflow does. |
name | string | — | Name is the workflow's display name, unique within the org's project (the product de-duplicates by suffixing). |
How is this guide?