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.task(str): The debate topic
Example
Full example: Philosophy Discussion ExampleExpertPanelDiscussion
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.task(str): The discussion topic
Example
Full example: Healthcare Panel DiscussionRoundTableDiscussion
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.task(str): The discussion topic
Example
Full example: AI Ethics DebateInterviewSeries
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.task(str): The interview topic
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.task(str): The paper or topic to review
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.task(str): The conflict to resolve
Example
Full example: Merger Mediation SessionBrainstormingSession
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.task(str): The brainstorming topic
Example
Full example: Pharma Research BrainstormTrialSimulation
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.task(str): The trial case
Example
Full example: Medical Malpractice TrialCouncilMeeting
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.task(str): The meeting topic or proposal
Example
Full example: Investment Council MeetingMentorshipSession
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.task(str): The mentorship topic
Example
Full example: Startup Mentorship ProgramNegotiationSession
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.task(str): The negotiation topic
Example
Full example: NVIDIA-AMD Executive NegotiationKey Benefits
- Structured Communication: Each method provides a clear framework for organizing multi-agent interactions
- Role-Based Interactions: Agents can take on specific roles with defined responsibilities
- Flexible Configuration: Customizable parameters for controlling interaction flow
- Scalable Architecture: Support for various numbers of participants and interaction rounds
- Comprehensive Coverage: Methods for different use cases from debates to negotiations
- Professional Output: Consistent formatting and organization of conversation history
- Easy Integration: Simple API for incorporating into larger applications