Skip to main content
This example demonstrates a team where member interactions during the current run are shared with other members through share_member_interactions=True. This allows members to see what other members have done during the same run, enabling better coordination and avoiding duplicate work.

How it Works

When share_member_interactions=True, interaction details are appended to tasks sent to members:
This allows the Billing Agent to see that the User Profile Agent has already retrieved the user’s information, avoiding duplicate tool calls.

When to Use

Use share_member_interactions=True when:
  • Multiple members might need the same information
  • You want to avoid duplicate API calls or tool executions
  • Members need to coordinate their actions during a single run
  • One member’s work builds on another’s within the same request

Code

share_member_interactions.py

Usage

1

Create a Python file

Create share_member_interactions.py with the code above.
2

Set up your virtual environment

3

Install dependencies

4

Export your OpenAI API key

5

Run Team