Skip to main content
ExpertPanelDiscussion runs a panel like one on a conference stage. A moderator agent opens each round with a question. Every expert answers it in turn. The moderator then sums up the answers and asks a follow-up question, which becomes the topic of the next round. You get back the full transcript. Use it when you want several specialist views on one topic, steered by a moderator who keeps the discussion moving. ExpertPanelDiscussion is not exported from the top-level swarms package. Import it from swarms.structs.multi_agent_debates. Reference: ExpertPanelDiscussion.

1. Run a panel

Pass at least two experts as agents and one moderator. max_rounds sets the number of rounds; the default is 3. Here one round keeps the run short, and output_type="list" returns each message with its speaker.
run raises ValueError if agents has fewer than two experts or moderator is not set. The check happens when you call run, not when you build the panel.
Tell the moderator never to answer for the experts. Without that line, a model asked to “open the round” often writes the experts’ answers too.

2. How a round works

Before the first round, the panel briefs every agent. The moderator is told who is on the panel. Each expert is told its number, the other experts’ names and the moderator’s name. These briefing replies are not part of the transcript. Then, in each round:
  1. The moderator gets Round N: <topic> and opens the round. The first round’s topic is your task.
  2. Each expert, in list order, gets Expert <name>, please respond to: <moderator's message>. Experts do not see each other’s answers from the same round.
  3. The moderator gets every expert’s answer for the round, as one name: answer block per expert, and is asked to sum up and ask a follow-up question.
  4. That summary becomes the next round’s topic.
Each agent’s final answer is what gets recorded and passed on, not its whole conversation. A run makes 1 + N + max_rounds * (N + 2) agent calls for N experts, one after another. The panel in section 1 makes 9.

3. Read the transcript

The transcript does not include your task. Its first message is the moderator’s opening of round 1. That matters for output_type: For a readable record, use "str" or "list". Here two rounds run between an economist and a founder:

4. Run the same panel again

The panel does not reset its agents. Each agent keeps the earlier panel in its memory, so a second topic would be discussed with the first one still in context. Call reset() on every agent first, or build new agents. This continues from section 1:
With output_type="final", run returns only the moderator’s closing summary and question, which is a quick way to see where the panel ended up.

Tips

  • Keep answers short. Each round’s summary prompt carries every expert’s answer, and every agent keeps its full history. A word limit in each system prompt keeps later rounds fast.
  • Give experts distinct roles. Experts who share a prompt give the moderator little to sum up.
  • Track cost with panel.usage, which sums the token counts of the moderator and every expert.

Next steps