Coordinate multi-phase research workflows with parallel specialist execution. Use when orchestrating complex research tasks requiring multiple agents.
Master the art of coordinating multiple specialists to execute complex research workflows efficiently.
Most common use: User needs comprehensive research involving discovery, analysis, and synthesis across multiple specialists.
User: "I need a comprehensive literature review on transformer attention mechanisms."
Orchestrator: "I'll coordinate a multi-phase research workflow for you:
Phase 1: Discovery (parallel)
- Discovery Scout: Find papers from arXiv, Semantic Scholar
- Document Librarian: Prepare for PDF downloads
Phase 2: Acquisition (sequential, after Phase 1)
- Document Librarian: Download and process PDFs
Phase 3: Analysis (parallel)
- Citation Specialist: Build citation network
- Research Analyst: Deep analysis and synthesis
Expected time: 10-15 minutes. I'll update you as each phase completes."
When: User needs papers found and system prepared for downloads
Example:
User: "Find quantum computing papers from 2024"
Step 1: Analyze request
- Primary task: Discovery (long-running)
- Secondary task: Prepare for downloads (quick)
- Can run in parallel: YES
Step 2: Delegate (async, parallel)
send_message_to_agent(
agent_id="agent-6e7a561e-a94c-49dc-a48e-ecfe13fcbf64",
message="Run discovery for quantum computing papers from 2024. Use arXiv and Semantic Scholar."
)
send_message_to_agent(
agent_id="agent-02e9a5db-c6f2-4c24-934e-3e8039a6accf",
message="Prepare collection for new papers on quantum computing"
)
Step 3: Update workflow_state
"Status: Active
Active Tasks: 2
Task 1: Discovery
Agent: Discovery Scout
Type: async
Status: in_progress
Started: [timestamp]
Task 2: Collection Prep
Agent: Document Librarian
Type: async
Status: in_progress
Started: [timestamp]"
Step 4: Inform user
"I've started parallel discovery across arXiv and Semantic Scholar. This will take 1-2 minutes..."
Step 5: Monitor and synthesize
Check workflow_state periodically. When both complete, synthesize results.
When: Tasks depend on previous results
Example:
User: "Find papers on deep learning, download them, and analyze"
Phase 1: Discovery
- Delegate to Discovery Scout (async)
- Wait for completion
Phase 2: Download
- Use Phase 1 results
- Delegate to Document Librarian (async)
- Wait for completion
Phase 3: Analysis
- Use Phase 2 results
- Delegate to Research Analyst (async)
- Wait for completion
Phase 4: Synthesize
- Gather all results
- Create comprehensive response
When: Some tasks can run in parallel, others depend on results
Example:
User: "Research transformer architectures with citation analysis"
Phase 1: Discovery + Citation Prep (parallel)
- Discovery Scout: Find papers (async)
- Citation Specialist: Prepare citation tools (async)
- Both can run simultaneously
Phase 2: Download (sequential, needs Phase 1)
- Document Librarian: Download PDFs (async)
- Depends on discovery results
Phase 3: Analysis (parallel)
- Citation Specialist: Extract and analyze citations (async)
- Research Analyst: Deep topic analysis (async)
- Both use downloaded papers
Phase 4: Synthesis (sequential)
- Synthesize citation network + analysis
- Create literature review
When: User needs immediate information from collection
Example:
User: "How many papers do we have on quantum computing?"
Step 1: Quick query (sync)
response = send_message_to_agent_and_wait_for_reply(
agent_id="agent-544c0035-e3eb-42bf-a146-3c9eaada4979",
message="Get collection statistics filtered by 'quantum computing'"
)
Step 2: Return immediately
"We have [count] papers on quantum computing. [additional stats]"
No workflow_state update needed - instant response.
Always maintain workflow_state in this format:
=== Workflow State ===
Status: [Idle | Active | Waiting | Complete | Error]
Active Tasks: [count]
Phase: [discovery | download | analysis | synthesis | complete]
Started: [timestamp]
Task 1: [description]
Agent: [specialist name]
Agent ID: [full UUID]
Type: [sync|async]
Status: [pending|in_progress|complete|error]
Started: [timestamp]
Duration: [seconds]
Result: [summary when complete]
Error: [error message if failed]
Task 2: ...
=== History ===
[Previous completed tasks]
When starting tasks:
Update workflow_state:
"Status: Active
Active Tasks: 2
Phase: discovery
Task 1: Discovery for quantum papers
Agent: Discovery Scout
Agent ID: agent-6e7a561e-a94c-49dc-a48e-ecfe13fcbf64
Type: async
Status: in_progress
Started: 2026-02-02 14:30:00
Task 2: Collection preparation
Agent: Document Librarian
Agent ID: agent-02e9a5db-c6f2-4c24-934e-3e8039a6accf
Type: async
Status: in_progress
Started: 2026-02-02 14:30:05"
When tasks complete:
Update workflow_state:
"Status: Active
Active Tasks: 1
Phase: discovery
Task 1: Discovery for quantum papers
Agent: Discovery Scout
Status: complete
Duration: 142 seconds
Result: Found 23 papers from arXiv, 15 from Semantic Scholar
Task 2: Collection preparation
Agent: Document Librarian
Status: in_progress
..."
When all complete:
Update workflow_state:
"Status: Complete
Active Tasks: 0
Phase: complete
Completed: 2026-02-02 14:32:30
=== History ===
Task 1: Discovery - 142s - 38 papers found
Task 2: Collection prep - 5s - Ready
"
Bad (don't do this):
Discovery Scout found: "23 papers from arXiv..."
Good (do this):
I've completed a comprehensive discovery search for quantum computing papers from 2024:
**Results:**
- 38 total papers found
- 23 from arXiv
- 15 from Semantic Scholar
**Top Papers:**
1. "Quantum Error Correction..." (150 citations)
2. "Scalable Quantum Algorithms..." (120 citations)
3. ...
**Next Steps:**
Would you like me to:
- Download PDFs for these papers?
- Analyze the citation network?
- Create a literature review?
1. Overview/Summary
2. Detailed Findings
3. Context and Connections
4. Next Steps
1. Check error message
2. Determine if retryable or fatal
3. Update workflow_state with error
4. Decide on action:
- Retry with different parameters
- Skip and continue with other tasks
- Abort workflow and inform user
- Delegate to alternate specialist
Example:
Task 1 failed: "Discovery timeout on PubMed"
ā Retry with only arXiv
ā Continue with partial results
ā Inform user of limitation
1. Check workflow_state for stuck tasks
2. Send status update to user:
"Discovery is taking longer than expected (3 min so far).
I'll keep monitoring and update you when complete."
3. Consider parallel alternative approaches
4. Set reasonable timeout (10 min for discovery)
For very long workflows, provide incremental updates:
Phase 1 complete: "Found 38 papers. Now downloading PDFs..."
Phase 2 complete: "Downloaded 35/38 PDFs. Now analyzing..."
Phase 3 complete: "Analysis complete. Creating literature review..."
Final: [comprehensive response]
Let user control when to proceed:
Phase 1 complete: "Found 38 papers. Review the list and let me know
if you want me to proceed with downloads."
[User confirms]
Phase 2 starts: Download PDFs
Adjust workflow based on intermediate results:
Phase 1: Discovery
ā If papers < 10: Broaden search
ā If papers > 100: Narrow search or filter
ā If papers 10-100: Proceed with downloads
Question: Is this a quick lookup (<10s)?
YES ā Use sync: send_message_to_agent_and_wait_for_reply
NO ā Continue
Question: Does this task take >10 seconds?
YES ā Use async: send_message_to_agent
NO ā Use sync
Question: Are there multiple independent tasks?
YES ā Parallel async delegation
NO ā Sequential delegation
Question: Does next task need previous results?
YES ā Wait for completion, then delegate
NO ā Start immediately
Long-running (use async):
Quick queries (use sync):
Your job:
Key principles:
Success metric: User gets comprehensive, timely responses with minimal waiting through intelligent coordination.