Docs
Reference

Limits And Recovery

Canonical runtime and payload limits for public flow authoring, plus recovery actions for common limit failures.

Quick Answer

Design flows to stay within hard limits, and prefer templates/persistence/chunking before raising payload size in runtime paths.

Core Flow Limits

LimitValueNotes
Max flow payload size150 KBDefinition map only; excludes template/function bodies.
Max steps per flow50Total declared steps in a flow.
Max flow/call-flow nesting depth5Child-flow nesting guardrail.
Max templates total size1 MBAggregate template content budget.
Max functions total size1 MBAggregate function content budget.
Effective package budget~2.1 MBCombined payload + templates + functions.

Runtime Limits Per Run

LimitValueNotes
Max step executions10000Per run execution ceiling. Includes configured tool calls dispatched by :agent and execute-mode :llm steps.
Max HTTP requests50Per run, across HTTP steps.
Max tracked LLM tokens per run (platform-managed keys)100000Accounting limit for platform-managed keys.
Platform-managed :max-tokens clamp per LLM call10000Applied only for platform-managed keys.
User-provided LLM keys :max-tokens clampNot clamped by platformProvider/account limits still apply.
Max workflow duration30 daysHard run duration cap.
Max child workflow invocations60flow/call-flow invocations and async :fanout child runs per root run.
Max fanout step executions5Total :fanout step executions per run.
Max fanout total items100Total items across all :fanout steps in one run.

Fanout And Child-Workflow Guardrails

GuardrailValueNotes
Max fanout width25Max items in one :fanout step.
Max :on-event emissions500Per :http step attempt; streamed SSE event emissions past the cap are suppressed and counted.
Max async child fanout concurrency20:max-concurrency must be at most 20; validation rejects larger values.
Async fanout item type:call-flow or :agentAll items in async mode must use the same child workflow item mode.
Mixed fanout modesNot allowedDo not mix legacy step items, :call-flow items, and :agent items in one :fanout.
Nested fanout itemsNot allowed:fanout items cannot themselves be :fanout.
Nested async child fanout depth1Descendant async child fanout is rejected.
Child start confirmationRequiredParent waits for child start confirmation before treating spawn as successful.

Wait And Approval Limits

LimitValueNotes
Default wait timeout24hApplies when timeout is omitted.
Max wait timeout30 daysHard cap for wait duration.
Checkpoint timeout default24hReview checkpoint timeout can be set up to 30 days.

Polling Limits (flow/poll)

Limit / RuleValueNotes
Max poll timeout1hHard timeout ceiling for flow/poll.
Max poll attempts100Hard attempt ceiling for flow/poll.
Required boundAt least one of :timeout or :max-attemptsUnbounded polling is rejected.
Required condition + backoff validation:return-on requiredBackoff shape is validated (for example :linear requires :step).
Terminal provider outcomesInclude success and failure statuses in :return-on, then branch on the resultStop polling when the remote actor has finished and prevent terminal failures from being recorded as success.

External Actor Cost Boundary

flow/poll limits the Breyta orchestration loop only. It does not impose a
limit on work already accepted by a third-party actor or provider. Use these
controls together:

ControlWhat it limitsWhat it does not guarantee
Query/partition countNumber of provider requests started by the flow.That one provider request produces only one bounded run.
Provider item limit (maxPosts, limit, maxItems)Provider-specific requested output size.A universal cap on actor events, pagination, or billing.
Provider run timeout/quotaProvider-side execution where supported.That the provider exposes the same semantics for every actor.
flow/poll :timeout / :max-attemptsBreyta status checks and waiting time.Cancellation of a still-running remote actor.
Provider cancellation endpointRemote work after the flow detects timeout/error.Cleanup when the provider has no cancellation surface.

For high-volume searches, run a small probe first, record the remote run id,
inspect actual events/items and cost, then scale queries and item limits in
stages. If a poll ends before the actor is terminal, cancel it when possible and
do not blindly start a second run.

Step Result And Persistence Limits

LimitValueNotes
Inline result threshold512 KBResults above this should usually use :persist.
Max step result size1 MBHard per-step output cap.
DB result max bytes1 MBCap for database step result payload bytes.
DB result max rows5000Cap for row count returned by DB steps.
Code step input max1 MBHard cap on :function step :input.
Notify payload max1 MBHard cap for notify payload body.
Authoring recommendationPrefer :persist for unknown/growing outputsMany real flows exceed inline limits quickly.

Webhook And Ref Loading Limits

LimitValueNotes
Webhook payload max50 MBGeneral webhook body size ceiling.
Signed multipart webhook payload max5 MBApplies to signed multipart uploads.
Raw MIME webhook payload max50 MBRaw MIME ingestion ceiling.
Ref load into LLM content100 KBRef content cap when injected into LLM fields.
Ref load into code step1 MBRef content cap for code step loading.
Ref load into HTTP body10 MB retained / 20 MB ephemeral tierTier-dependent HTTP body ref loading limit.
Persist write cap50 MB retained / 4 GB ephemeral tierTier-dependent blob persistence write limit.

API Request Validation Limits

JSON request bodies sent to the flows API (CLI commands, connections call,
manual run inputs, ...) pass a generic bounded-payload check before the
handler runs. Violations return HTTP 400 with violation set to the failed
bound (for example max-string-length with at: map-value).

Exemptions: native connection webhooks skip JSON parsing entirely and are
bounded only by the webhook payload caps above, and flowLiteral/flow
command arguments are excluded from these checks (flow definitions have their
own dedicated size limits, listed under Core Flow Limits).

LimitValueNotes
Max nesting depth8Webhook/event ingress and dashboard apply allow 10.
Max total nodes20000Counts every key, value, and collection item.
Max collection size1000Per map/vector/set.
Max string length100000 charsPer single string value (including map values).
Max string length, connections call6000000 chars (~6 MB)POST /api/connections/:id/call replays full outbound request bodies, so a single string value may be much larger. The whole request must still fit the ~8 MiB transport body cap.

Recovery: for oversized payloads on ordinary endpoints, persist the content as
a resource and pass a ref instead of inlining it, or split the request. To
replay a large HTTP request against a provider (for example to read a 4xx
error body), use connections call, which accepts string values up to ~6 MB.

Config Warning Thresholds

ThresholdBehaviorRecommendation
~1 KB per step payloadNon-blocking warning starts around this sizeMove large literals into templates.

Failure Recovery Patterns

When you hit size/limit validation errors, apply these patterns first:

Validation errorFirst recovery actions
Flow payload too largeMove large inline content into :templates and :functions.
Replace large literals in :flow with template/function refs.
Payload contains an overly long string / Payload is too large (API validation)Persist the content as a resource and pass a ref instead of inlining it.
Split the request into smaller payloads.
For replaying large HTTP requests against a provider, use connections call (~6 MB per string value).
Result too large / Query result too large / DB row limit exceededPaginate (LIMIT, cursor loops).
Aggregate/filter in database first.
Persist artifacts and pass refs instead of full payloads.
Blob reference too large for ...Reduce blob size before loading it into a step.
For user downloads, return signed links instead of loading full content into flow memory.
Code step :input too largePass compact subsets into code steps.
Move heavy processing to data layer or external compute.
Orchestrate in smaller batches.
Fanout width exceeds limit / fanout max concurrency exceeded / max fanout total items exceededReduce batch size or requested concurrency.
Split work into multiple parent runs or stages.
Keep one :fanout bounded to independent child workflows.
child-flows limit exceeded / Nested async child fanout is not allowedKeep async child fanout at one orchestration depth.
Move deeper branching inside a single child flow.
Use plain flow/call-flow for descendant orchestration.
Wait timeout exceeds maximumUse shorter waits and multi-stage waits.
Branch timeout outcomes explicitly (:fail or :continue).
flow/poll timeout exceeds limit / flow/poll max attempts exceededReduce timeout and use staged polling (fast first poll, slower secondary poll).
Increase interval and use explicit backoff.
Prefer webhook/wait-signal patterns when callbacks are supported.
Remote actor continues after polling stopsCall the provider cancellation endpoint with the recorded run id when available.
Inspect provider terminal state before retrying.
Reduce probe size and configure provider-side quotas/timeouts when cancellation is unavailable.

Recommended Authoring Checklist

Checklist itemWhy
Add :persist when output size is uncertainPrevents inline payload overflow as data grows.
Use templates for large request/prompt/SQL bodiesKeeps flow payload size stable and reviewable.
Keep waits bounded and keyedAvoids unbounded waits and ambiguous resume paths.
Design webhook auth explicitly (:auth {:type ...})Prevents insecure/default webhook exposure.
Test largest expected payload paths, not just tiny happy-path samplesCatches real-world limit failures before production.

Related

As of Aug 9, 2026