Skip to main content
This example demonstrates a team where the team leader routes requests to the appropriate member, and the members respond directly to the user. Using add_team_history_to_members=True, each team member has access to the shared history of the team, allowing them to use context from previous interactions with other members.

How it Works

When add_team_history_to_members=True, team history is appended to tasks sent to members:
This allows the Spanish agent to recall the name “John” that was originally shared with the German agent.

Code

team_history.py

Usage

1

Create a Python file

Create team_history.py with the code above.
2

Set up your virtual environment

3

Install dependencies

4

Export your OpenAI API key

5

Run Team