| name | result-aggregation |
| description | Aggregates results from multiple sub-agent executions into a unified output. |
| iface | [object Object] |
| slo | [object Object] |
Result Aggregation (result-aggregation)
Purpose
Surface the first successful SAG result and provide a deterministic fallback when multiple results are available.
When to Use
- MAG execution collects outputs from one or more
compensation-advisor-sagruns. - The orchestration flow needs a stable aggregation step even when sub-agents partially fail.
Procedures
- Inspect the
resultslist supplied by the caller. - Return
{}when no successful results are present. - When exactly one result exists, return it unchanged.
- When multiple results exist, merge dictionaries with later entries taking precedence. This mirrors the current Phase 2 behavior and can be replaced with domain-specific resolution later.
Examples
{"results": [{"offer": {...}}, {"offer": {..., "metadata": {...}}]} → merged dictionary with second result’s overrides.