Operate

Flow Features And Config Toggles

Breyta feature matrix for authoring and operating advanced flows.

Goal

Provide one checklist of core flow fields, step capabilities, and operational toggles.

Quick Answer

Use this page to verify that your flow covers triggers, templates, waits, notifications, persistence, and bindings with canonical config shapes.
As complexity grows, keep :flow orchestration-focused and move shaping/body content into top-level :functions and :templates.
Treat :persist as a common default for data-heavy steps, not a niche option.

Flow Definition Surface

FieldPurposeCommon options
:slug, :name, :descriptionIdentify and describe the flow.Stable slug + editable human label.
:concurrencyControl overlap/version handoff.:singleton, :keyed, :on-new-version.
:triggersDefine run entry points.:manual, :schedule, :event with :source :webhook.
:requiresDeclare connection/secret/form requirements.Configured through flows configure (or install-specific paths).
:templatesStore reusable HTTP/LLM/DB/notify payloads.Referenced via :template + :data.
:functionsStore reusable Clojure transforms.Called via flow/step :function and :ref.
:flowOrchestrate deterministic control logic and step calls.Keep orchestration-focused, not transform-heavy.

For detailed overlap/version behavior choices, see Run Concurrency.

Trigger Choice By Target

TargetPractical trigger preferenceNotes
draftPrefer :manual while authoring.You can still test webhook paths through the draft-event API route for webhook-specific validation.
livePrefer :schedule for unattended automation, plus installation/live webhooks when needed.Treat live trigger surfaces as stable runtime entrypoints.

Step Capabilities And Toggles

Step / toggleCore shapeUse
:http:connection, :method, :path, :template, :data, :retryExternal API calls with optional retries and templating.
:llm / :dbTemplate-backed prompt/query compositionKeep prompt/query bodies reusable and reviewable.
:wait:key, :timeout, :on-timeout, :notify, optional :webhookHuman/webhook callback orchestration with bounded waits.
:notify:channels (:http), optional :templateOutbound notifications and delivery hooks.
:persist{:type :blob} or {:type :kv}Store large outputs/state handoff as refs.
:kv:operation (:get, :set, :append, etc.)Durable keyed state between steps/runs.

Orchestration Primitives (Non-Step)

PrimitivePurposeNotes
flow/call-flowExplicit child-flow orchestrationReuse focused subflows instead of copying complex branches.
Flow forms (let, do, if, cond, for, loop, etc.)Deterministic control flowKeep transforms in top-level :functions.
flow/pollBounded status pollingBuilt on deterministic loop + sleep semantics.
Metadata labels (^{:label ...})Timeline readabilityif/if-not support :yes/:no; loop supports :max-iterations.
flow/inputRun input entryCall once near top and pass narrowed maps downstream.

Use flow/call-flow when one branch grows into a separate lifecycle (for example: ingress flow -> routing flow -> apply flow). Keep parent flow responsible for orchestration and move shaping into top-level :functions.

'(let [input (flow/input)
       normalized (flow/step :function :normalize {:ref :normalize :input input})
       routed (flow/call-flow :billing-route (:route-input normalized))
       result ^{:label "Apply routed action?"
                :yes "Call apply flow"
                :no "Skip apply"}
              (if (:should-apply routed)
                (flow/call-flow :billing-apply (:apply-input routed))
                {:skipped true})]
   {:routed routed
    :result result})

See construct metadata and polling details:

Loop pattern for bounded item processing with explicit persistence:

'(let [input (flow/input)
       items (:items input)
       batch (reduce (fn [acc item]
                       (let [item-result (flow/step :http :process-item
                                           {:connection :api
                                            :method :post
                                            :path "/process"
                                            :json {:id (:id item)}
                                            :persist {:type :blob}})]
                         (conj acc item-result)))
                     []
                     items)
       summary (flow/step :function :summarize
                 {:ref :summarize
                  :input batch})]
   summary)

Security And Runtime Controls

ControlGuidance
Webhook authDeclare explicit :auth {:type ...} on webhook triggers.
Secret handlingStore secret material in bindings, never in flow files.
Retry policyUse :retry {:max-attempts ... :backoff-ms ...} for transient failures.
Runtime limitsPayload/output limits are enforced at runtime.
Persistence posturePlan refs/:persist early because inline limits are reached quickly.

High-Impact Limits

LimitValueNotes
Flow payload (core definition map)150 KBExcludes template/function body content.
Effective package budget with templates/functions~2.1 MBExternalize large prompt/request/query content into templates/functions.
Max step result1 MBHard per-step output cap.
Inline result threshold256 KBExceeding this usually requires :persist.
Webhook payload max50 MB (signed multipart: 5 MB)See webhook transport and signing mode details.
Platform-managed LLM :max-tokens clamp10000 per callApplies to platform-managed keys.
Wait timeoutDefault 24h, max 30 daysSet explicit bounded timeout in wait configs.

See full list: Limits And Recovery

CLI Commands That Surface These Features

Command groupUse
breyta flows pull/push/configure/configure check/validateAuthoring and configuration lifecycle.
breyta flows release / breyta flows installations ...Advanced rollout and installation targeting.
breyta flows run <slug> --waitRuntime verification after changes.
breyta resources search / breyta resources workflow list / breyta resources readFind and inspect persisted run artifacts and refs.

Related

As of Mar 5, 2026