respond_directly=True, the team routes requests to the appropriate agent, and that agent responds directly to the user without the team leader processing the response. This is useful for routing/passthrough patterns.
This example creates a language router with three agents:
- English Agent - Responds in English
- Japanese Agent - Responds in Japanese
- Spanish Agent - Responds in Spanish
1
Create a Python file
respond_directly.py
2
Set up your virtual environment
3
Install dependencies
4
Export your OpenAI API key
5
Run Team