Skip to main content

Collaborative Research Team with Round-Robin Turns

This example demonstrates how to use RoundRobin to facilitate collaborative discussion where agents take randomized turns and build on each other’s contributions — perfect for brainstorming, research synthesis, and cross-functional planning.

Step 1: Get Your API Key

  1. Visit https://swarms.world/platform/api-keys
  2. Sign in or create an account
  3. Generate a new API key
  4. Set it as an environment variable:

Step 2: Setup

Step 3: Define the Research Team

Create a team of domain experts who will take turns contributing their perspective. Each agent sees the full conversation history and builds on what others have said:

Step 4: Run the Roundtable

Expected Output:

Step 5: Multi-Loop Refinement (Optional)

Run multiple rounds so agents can iterate on each other’s contributions:
RoundRobin creates a collaborative dynamic where each agent sees the full conversation history and naturally builds on prior contributions. Agent order is randomized each loop, so every agent gets a chance to lead the conversation. Use max_loops > 1 when you want the team to iteratively refine their analysis across multiple rounds.