Skip to main content
This example demonstrates a collaborative team of AI agents working together to research topics across different platforms. The team consists of two specialized agents:
  1. Reddit Researcher - Uses DuckDuckGo to find and analyze relevant Reddit posts
  2. HackerNews Researcher - Uses HackerNews API to find and analyze relevant HackerNews posts
The agents work in “collaborate” mode by using delegate_task_to_all_members=True, meaning they:
  • Both are given the same task at the same time
  • Work towards reaching consensus through discussion
  • Are coordinated by a team leader that guides the discussion
The team leader moderates the discussion and determines when consensus is reached.
delegate_to_all_members_cooperation.py

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
2

Install required libraries

3

Set environment variables

4

Run the agent