Expand description
Operator algebra for agent composition.
All types implementing Composable participate in the algebra:
| Operator | Meaning | Example |
|---|---|---|
>> | Sequential pipeline | agent_a >> agent_b |
| | Parallel fan-out | agent_a | agent_b |
* | Loop | agent * 3, agent * until(..) |
/ | Fallback chain | agent_a / agent_b |
>> means “then” everywhere in the SDK: a pipeline step, a state
transform (S), a context rewrite (C), a middleware layer (M). A
state transform is a pipeline step too, reshaping state between agents:
researcher >> S::pick(&["findings", "input"]) >> writer.
Structs§
- Branch
- Choose between two workflows by a predicate over state.
- Fallback
- Fallback chain: try each agent in sequence until one succeeds.
- FanOut
- Parallel fan-out: execute branches concurrently, merge results.
- Loop
- Loop: repeat an agent or pipeline up to
maxtimes, or until a predicate. - Loop
Predicate - Predicate for conditional loop termination.
- Pipeline
- Sequential pipeline: execute steps in order, passing state between them.
Enums§
- Composable
- A composable workflow node — can be sequenced, fan-out, looped, etc.
Functions§
- until
- Create a conditional loop predicate.