Skip to content

Your First Flow

A flow is a YAML file under flows/{name}/definition.yaml in the configured Storage.Directory. The simplest useful one echoes its input back, which makes it perfect for verifying invocation paths end-to-end.

Save this as flows/hello/definition.yaml:

status: active
input:
message: !str Hello from Zenvara
output:
echo: !str
message: !str
steps:
- return:
echo: "Parameters received successfully"
message: "${message}"

The platform picks the file up on the next request — no restart needed.

These show up everywhere:

  • Typed input and output. !str, !int, !bool, !obj, !str-list and friends declare a real signature. The value after the tag is the default; omit the value to make the field required.
  • ${message} references a payload key. Each step’s output is merged back into the payload, so later steps reference earlier steps the same way.
  • return: ends the flow and produces the typed output contract. Anything you produce that is not declared in output: is dropped.

The fastest check is a POST to the flow’s invocation endpoint. live is the branch alias that resolves to production on Git-disabled installs:

Terminal window
curl -X POST http://localhost:5000/api/v1/live/flows/hello/invocations \
-H "Content-Type: application/json" \
-d '{"message":"Hi there"}'

You’ll get back exactly the declared output shape:

{
"echo": "Parameters received successfully",
"message": "Hi there"
}

There are three equivalent ways to invoke a flow — from a human, a script, or an AI agent. See Invoking Flows for all three.

  • Add a real operator. Try http.get to fetch a URL or filesystem.read to load a file. See the Operator Catalog.
  • Wire up an environment. Flows run against an environment that bundles typed connections — see Connections & Environments.
  • Schedule or trigger it. Add a triggers: block (cron, webhook, filesystem watch, mail, log monitor, SQS, flow-to-flow) — see Triggers & Scheduling.
  • Write a longer flow. The Authoring Flows section is the full guide.