Skip to main content

Product Strategy Brainstorm

This example demonstrates how to facilitate a collaborative discussion between multiple specialist agents using GroupChat - perfect for brainstorming, cross-functional planning, and multi-perspective problem solving.

Step 1: Setup

Step 2: Define the Discussion Panel

Create agents with distinct expertise who will collaborate through group conversation.
For GroupChat, max_loops is the maximum number of agent messages posted across the whole conversation (one speaker per turn), not a per-agent iteration count. The API’s SwarmSpec.max_loops default is 1, so leaving max_loops unset (or at 1) lets only a single agent speak once. Set it high enough for every participant to get at least one turn (the chat can also end early if no agent has anything worth adding). GroupChat needs at least 2 agents; a single agent returns 400.

Step 3: Run the Brainstorm

Expected Output:
GroupChat enables collaborative discussion where agents can build on each other’s ideas. Use it when you need cross-functional input on the same problem - each agent contributes their domain expertise while reacting to the broader conversation context.