Soul ID
Soul IDAI AGENTS

⚑ Workflows

Workflow Composition (meta-orchestration)

Combine existing workflow patterns into larger end-to-end processes by chaining, branching, or running them in parallel β€” reusing proven patterns without reinventing orchestration.

Bundle files

πŸ“„ORCHESTRATION.mdβ€” Orchestration
1# ORCHESTRATION.md
2
3## Diagram
4
5 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
6 β”‚ Trigger Event β”‚
7 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
8 β–Ό
9 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
10 β”‚ Composer (orchestrator) β”‚
11 β”‚ (reads composition plan + dispatches) β”‚
12 β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
13 β”‚ β”‚ β”‚
14 β–Ό β–Ό β–Ό
15 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
16 β”‚Workflow β”‚ β”‚Workflow β”‚ β”‚Workflow β”‚
17 β”‚ A β”‚ β”‚ B β”‚ β”‚ C β”‚
18 β”‚(triage) β”‚ β”‚(incident)β”‚ β”‚(on-call) β”‚
19 β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
20 β”‚ β”‚ β”‚
21 β–Ό β–Ό β–Ό
22 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
23 β”‚ Composer (collect + route) β”‚
24 β”‚ if A=sev1 β†’ B; if A=sev3 β†’ C β”‚
25 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
26 β–Ό
27 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
28 β”‚ Selected Workflow β”‚
29 β”‚ (executes to completion) β”‚
30 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
31 β–Ό
32 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
33 β”‚ Post-workflow (optional) β”‚
34 β”‚ (e.g., weekly-planning for follow-up) β”‚
35 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
36
37
38## Workflow
39Workflow Composition (meta-orchestration)
40
41## Objective
42Combine existing workflow patterns into larger end-to-end processes by chaining, branching, or running them in parallel β€” reusing proven patterns without reinventing orchestration.
43
44## Roles
45- **Composer:** the meta-orchestrator that reads a composition plan and dispatches to individual workflows.
46- **Child Workflows:** any existing workflow pattern (triage, incident-mode, feedback-loop, etc.) running as a self-contained unit.
47- **Context Shuttle:** carries state and outputs between child workflows.
48
49## When to use
50- Complex processes that span multiple existing workflow patterns.
51- When you need conditional routing (e.g., triage β†’ incident-mode OR triage β†’ on-call based on severity).
52- When workflows must run in parallel and sync at a join point.
53- To avoid duplicating orchestration logic that already exists.
54
55## Composition modes
56
57### Sequential
58```
59Workflow A β†’ Workflow B β†’ Workflow C
60```
61Output of A feeds into B, output of B feeds into C.
62
63### Conditional
64```
65Workflow A β†’ if condition_X β†’ Workflow B
66 β†’ if condition_Y β†’ Workflow C
67```
68Route to different workflows based on the outcome of a previous one.
69
70### Parallel + Join
71```
72Workflow A ──┐
73Workflow B ──┼── Join β†’ Workflow D
74Workflow C β”€β”€β”˜
75```
76Run multiple workflows concurrently, wait for all, then feed into the next.
77
78### Loop
79```
80Workflow A β†’ Workflow B β†’ if !done β†’ Workflow A (repeat)
81```
82Iterate through a set of workflows until a condition is met.
83
84## Protocol
851. Define a composition plan (sequence of workflows + routing rules).
862. Composer initializes context with the trigger event data.
873. Composer dispatches to the first workflow(s) per the plan.
884. Child workflow runs to completion and returns output + status.
895. Composer evaluates routing rules and dispatches to next workflow(s).
906. Context Shuttle preserves accumulated state across boundaries.
917. Repeat until plan is complete.
928. Composer produces final aggregated output.
93
94## Rules
95- Child workflows are black boxes β€” Composer never reaches into their internals.
96- Each child workflow gets a clean context (original input + accumulated outputs).
97- Failures in a child workflow follow that workflow's own error handling first.
98- If a child workflow fails and cannot self-recover, Composer decides: skip, retry, or abort composition.
99- Composition plans are declarative (config/YAML), not imperative code.
100
101## Deliverables
102- Composition execution trace (which workflows ran, in what order, with what inputs/outputs)
103- Per-workflow status and outputs
104- Final aggregated result
105- Routing decisions log (why each path was chosen)
106

Lines: 106 | Words: 516

Install

Copy bundle to your OpenClaw workspace.

curl -fsSL https://raw.githubusercontent.com/cerealskill/openclaw-agents/main/install.sh | bash -s workflow workflow-composition EN
Download .tar.gz

Rate this agent

Loading...

Sign in to rate this agent

Includes

  • βœ“ ORCHESTRATION.md

Info

Slug
workflow-composition
Lines
106
Words
516