Multi-Agent Synthesis Fix
Date: 2026-01-22 Status: 🟢 In-use Author: Sri Aradhyula <sraradhy@cisco.com>
Summary​
Fixed an issue where the supervisor's final answer only contained the last sub-agent's response instead of a synthesized summary from all agents when multiple agents were invoked.
Motivation​
When a user query required multiple agents (e.g., "get apps for CAIPE, search for CAIPE in RAG, look for info for cnoe-io/ai-platform-engineering"), the system would:
- Stream content from ALL agents correctly (user sees all results)
- But return only the LAST agent's response as the final answer
Root Cause​
The sub_agent_complete boolean flag in StreamState was blocking all streaming after the first sub-agent completed:
# OLD CODE - PROBLEMATIC
if state.sub_agent_complete:
logger.info("🛑 Skipping streaming chunk - sub-agent already sent complete_result")
return # Blocks ALL subsequent streaming!
This caused:
- First agent completes →
sub_agent_complete = True - Second agent's streaming chunks → SKIPPED
- Third agent's streaming chunks → SKIPPED
- Supervisor's synthesis → SKIPPED
The _get_final_content() method would then return only the first agent's content (from artifact-updates), not the supervisor's synthesis.
Testing Strategy​
Tested with query: "get apps for CAIPE, search for CAIPE in RAG, look for info for cnoe-io/ai-platform-engineering"
Expected result: Final answer contains synthesized summary from all three agents (ArgoCD, RAG, GitHub).
Related​
-
2026-01-16-executor-simplification-refactor.md - Original executor refactor
-
2025-11-05-a2a-artifact-streaming-fix.md - Previous streaming fixes
-
Architecture: architecture.md