ExAgent.Coordination.Flow (ExAgent v2.2.2)

View Source

A bounded, trusted host router or parallel fan-out/fan-in.

A router's versioned :select callback returns one declared branch ID. A parallel flow admits every declared branch, with at most :max_concurrency live branch workers. Every branch receives the root input and may delegate through ordinary agent tools. Branches and their portable outcomes are ordered by definition, independently of completion order.

:failure_policy is :fail_fast or :collect. Collect includes confirmed failures in the ordered outcomes; uncertain IO always blocks continuation. A versioned optional :merge callback receives the ordered portable outcomes. Without one, that list is the result. Selection and merge are admitted and checkpointed host phases: a crash after admission requires explicit recovery and never replays an uncertain callback.

Selection and merge are pure trusted host callbacks. Put external effects in agent tools, where intent/outcome and approval are journaled. Their explicit versions identify the host code; change a version when its behavior changes.

There are at most 32 branches, concurrency is 1..32 (default 4), and the merged result and each branch result have separate portable JSON limits of 65,536 bytes (:max_result_bytes and :max_branch_result_bytes, which may be lowered). These limits do not guarantee admission of every branch/delegation depth into the existing 8 MiB journal. Ordinary scope authority and checkpoint admission apply.

Summary

Functions

binding(definition)

new(opts)

resume(definition, reference, opts \\ [])

run(definition, input, opts \\ [])