Skip to main content

Overview

Swarms provides a comprehensive suite of orchestration methods for coordinating multiple AI agents in structured conversations and decision-making processes. These methods enable sophisticated multi-agent interactions like debates, panel discussions, negotiations, and more.

Installation

Available Methods

OneOnOneDebate

Simulates a turn-based debate between two agents for a specified number of loops. Each agent takes turns responding to the other’s arguments.

Attributes

int
default:"1"
Number of conversational turns
List[Agent]
required
Two agents for debate
str
default:"None"
Optional image input
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the debate between agents.
Parameters:
  • task (str): The debate topic
Returns: list of conversation history

Example

Full example: Philosophy Discussion Example

ExpertPanelDiscussion

Simulates an expert panel discussion with a moderator guiding the conversation. Multiple experts provide insights on a topic with structured rounds.

Attributes

int
default:"3"
Number of discussion rounds
List[Agent]
required
Expert panel participants
Agent
required
Discussion moderator
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the panel discussion.
Parameters:
  • task (str): The discussion topic
Returns: list of conversation history

Example

Full example: Healthcare Panel Discussion

RoundTableDiscussion

Simulates a round table where each participant speaks in order, then the cycle repeats. Facilitated discussion with equal participation.

Attributes

int
default:"2"
Number of speaking cycles
List[Agent]
required
Round table participants
Agent
required
Discussion facilitator
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the round table discussion.
Parameters:
  • task (str): The discussion topic
Returns: list of conversation history

Example

Full example: AI Ethics Debate

InterviewSeries

Conducts a structured interview with follow-up questions. Systematic Q&A with depth through follow-up questions.

Attributes

List[str]
default:"Default questions"
Prepared interview questions
Agent
required
Interviewer agent
Agent
required
Interviewee agent
int
default:"2"
Follow-up questions per main question
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the interview series.
Parameters:
  • task (str): The interview topic
Returns: list of conversation history

Example

PeerReviewProcess

Simulates academic peer review with multiple reviewers and author responses. Structured feedback and revision process.

Attributes

List[Agent]
required
Reviewer agents
Agent
required
Author agent
int
default:"2"
Number of review rounds
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the peer review process.
Parameters:
  • task (str): The paper or topic to review
Returns: list of conversation history

Example

MediationSession

Simulates a mediation session to resolve conflicts between parties. Facilitated conflict resolution with structured sessions.

Attributes

List[Agent]
required
Disputing parties
Agent
required
Mediator agent
int
default:"3"
Number of mediation sessions
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the mediation session.
Parameters:
  • task (str): The conflict to resolve
Returns: list of conversation history

Example

Full example: Merger Mediation Session

BrainstormingSession

Simulates a brainstorming session where participants build on each other’s ideas. Creative idea generation with collaborative building.

Attributes

List[Agent]
required
Brainstorming participants
Agent
required
Session facilitator
int
default:"3"
Number of idea generation rounds
bool
default:"True"
Whether to build on previous ideas
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the brainstorming session.
Parameters:
  • task (str): The brainstorming topic
Returns: list of conversation history

Example

Full example: Pharma Research Brainstorm

TrialSimulation

Simulates a legal trial with structured phases and roles. Complete legal proceeding simulation with all participants.

Attributes

Agent
required
Prosecution attorney
Agent
required
Defense attorney
Agent
required
Trial judge
List[Agent]
default:"None"
Trial witnesses
List[str]
default:"Default phases"
Trial phases
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the trial simulation.
Parameters:
  • task (str): The trial case
Returns: list of conversation history

Example

Full example: Medical Malpractice Trial

CouncilMeeting

Simulates a council meeting with structured discussion and decision-making. Governance process with voting and consensus building.

Attributes

List[Agent]
required
Council participants
Agent
required
Meeting chairperson
int
default:"1"
Number of voting rounds
bool
default:"False"
Whether consensus is required
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the council meeting.
Parameters:
  • task (str): The meeting topic or proposal
Returns: list of conversation history

Example

Full example: Investment Council Meeting

MentorshipSession

Simulates a mentorship session with structured learning and feedback. Guided learning process with progress tracking.

Attributes

Agent
required
Mentor agent
Agent
required
Mentee agent
int
default:"3"
Number of sessions
bool
default:"True"
Whether to include feedback
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the mentorship session.
Parameters:
  • task (str): The mentorship topic
Returns: list of conversation history

Example

Full example: Startup Mentorship Program

NegotiationSession

Simulates a negotiation with multiple parties working toward agreement. Complex multi-party negotiation with concessions.

Attributes

List[Agent]
required
Negotiating parties
Agent
required
Negotiation mediator
int
default:"5"
Number of rounds
bool
default:"True"
Whether to allow concessions
str
default:"str-all-except-first"
Format for conversation history

run()

Executes the negotiation session.
Parameters:
  • task (str): The negotiation topic
Returns: list of conversation history

Example

Full example: NVIDIA-AMD Executive Negotiation

Key Benefits

  1. Structured Communication: Each method provides a clear framework for organizing multi-agent interactions
  2. Role-Based Interactions: Agents can take on specific roles with defined responsibilities
  3. Flexible Configuration: Customizable parameters for controlling interaction flow
  4. Scalable Architecture: Support for various numbers of participants and interaction rounds
  5. Comprehensive Coverage: Methods for different use cases from debates to negotiations
  6. Professional Output: Consistent formatting and organization of conversation history
  7. Easy Integration: Simple API for incorporating into larger applications

Source Code

View the source code on GitHub