What you’ll build
- An orchestrator agent that plans steps, invokes sub-agents/tools, and composes the final reply.
- Tasks that enforce ordering (e.g., research → summarize → verify).
- NDJSON streaming so users see progress.
Prerequisites
- CrewAI multi-agent setup from crew-ai.mdx
- At least two specialized agents or tools to orchestrate
Steps
1
List stages
Define the stages your orchestrator must follow (e.g., gather context → call tool → summarize).
2
Write orchestration rules
In the backstory, describe exactly when to call each sub-agent/tool and how to merge outputs.
3
Enable streaming
Keep
stream=True on the Crew so CometChat receives progress as steps complete.4
Test with complex prompts
Try multi-part requests to ensure the orchestrator doesn’t skip steps.
Example backstory
src/crew_demo/config/agents.yaml
src/crew_demo/config/tasks.yaml
Process.hierarchical if you want the orchestrator to decide dynamically which sub-agent to call next.
CometChat setup
Provider: CrewAI, Agent ID:orchestrator, Deployment URL: /kickoff.
Add suggested prompts like “Find our three latest deals, then draft a summary for the customer” to exercise orchestration.