You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/docs/examples/index.md

27 KiB

Swarms Examples Index

Welcome to the comprehensive Swarms Examples Index! This curated collection showcases the power and versatility of the Swarms framework for building intelligent multi-agent systems. Whether you're a beginner looking to get started or an advanced developer seeking complex implementations, you'll find practical examples to accelerate your AI development journey.

What is Swarms?

Swarms is a cutting-edge framework for creating sophisticated multi-agent AI systems that can collaborate, reason, and solve complex problems together. From single intelligent agents to coordinated swarms of specialized AI workers, Swarms provides the tools and patterns you need to build the next generation of AI applications.

What You'll Find Here

This index organizes 100+ production-ready examples from our Swarms Examples Repository and the main Swarms repository, covering:

  • Single Agent Systems: From basic implementations to advanced reasoning agents

  • Multi-Agent Architectures: Collaborative swarms, hierarchical systems, and experimental topologies

  • Industry Applications: Real-world use cases across finance, healthcare, security, and more

  • Integration Examples: Connect with popular AI models, tools, and frameworks

  • Advanced Patterns: RAG systems, function calling, MCP integration, and more

Getting Started

New to Swarms? Start with the Easy Example under Single Agent Examples → Core Agents.

Looking for comprehensive tutorials? Check out The Swarms Cookbook for detailed walkthroughs and advanced patterns.

Want to see real-world applications? Explore the Industry Applications section to see how Swarms solves practical problems.

Quick Navigation

Single Agent Examples

Core Agents

Category Example Description
Basic Easy Example Basic agent implementation demonstrating core functionality and setup
Settings Agent Settings Comprehensive configuration options for customizing agent behavior and capabilities
YAML Agents from YAML Creating and configuring agents using YAML configuration files for easy deployment
Memory Agent with Long-term Memory Implementation of persistent memory capabilities for maintaining context across sessions

Model Integrations

Category Example Description
Azure Azure OpenAI Agent Integration with Azure OpenAI services for enterprise-grade AI capabilities
Groq Groq Agent High-performance inference using Groq's accelerated computing platform
Custom Custom Model Agent Framework for integrating custom ML models into the agent architecture
Cerebras Cerebras Example Integration with Cerebras AI platform for high-performance model inference
Claude Claude 4 Example Anthropic Claude 4 model integration for advanced reasoning capabilities
Swarms Claude Swarms Claude Example Optimized Claude integration within the Swarms framework
Lumo Lumo Example Lumo AI model integration for specialized tasks
VLLM VLLM Example High-performance inference using VLLM for large language models
Llama4 LiteLLM Example Llama4 model integration using LiteLLM for efficient inference

Tools and Function Calling

Category Example Description
Basic Tools Tool Agent Basic tool-using agent demonstrating external tool integration capabilities
Advanced Tools Agent with Many Tools Advanced agent utilizing multiple tools for complex task execution
OpenAI Functions OpenAI Function Caller Integration with OpenAI's function calling API for structured outputs
Command Line Command Tool Agent Command-line interface tool integration
Jamba Jamba Tool Agent Integration with Jamba framework for enhanced tool capabilities
Pydantic Pydantic Tool Agent Tool validation and schema enforcement using Pydantic
Function Caller Function Caller Example Advanced function calling capabilities with dynamic tool execution
LiteLLM Tools LiteLLM Tool Example Tool integration using LiteLLM for model-agnostic function calling
Swarms Tools Swarms Tools Example Native Swarms tool ecosystem integration
Structured Outputs Structured Outputs Example Structured data output capabilities for consistent responses
Schema Validation Schema Validation Example Tool schema validation and error handling

MCP (Model Context Protocol) Integration

Category Example Description
Agent Tools Agent Tools Dict Example MCP integration for dynamic tool management
MCP Execute MCP Execute Example MCP command execution and response handling
MCP Load Tools MCP Load Tools Example Dynamic tool loading through MCP protocol
Multiple Servers MCP Multiple Servers Example Multi-server MCP configuration and management

RAG and Memory

Category Example Description
Full RAG Full Agent RAG Example Complete RAG implementation with retrieval and generation
Pinecone Pinecone Example Vector database integration using Pinecone for semantic search

Reasoning and Decision Making

Category Example Description
Agent Judge Agent Judge Example Agent-based decision making and evaluation system
MALT MALT Example Multi-agent logical reasoning framework
Reasoning Duo Reasoning Duo Example Collaborative reasoning between two specialized agents

Vision and Multimodal

Category Example Description
Image Batch Image Batch Example Batch processing of multiple images with vision capabilities
Multimodal Multimodal Example Multi-modal agent supporting text, image, and audio inputs

Utilities and Output Formats

Category Example Description
XML Output XML Output Example Structured XML output formatting for agent responses
CSV Agent CSV Agent Example CSV data processing and manipulation agent
Swarm Matcher Swarm Matcher Example Agent matching and selection system

Third-Party Integrations

Category Example Description
Microsoft AutoGen Integration Integration with Microsoft's AutoGen framework for autonomous agents
LangChain LangChain Integration Combining LangChain's capabilities with Swarms for enhanced functionality
Browser Multion Integration Web automation and browsing capabilities using Multion
Team AI Crew AI Team-based AI collaboration using Crew AI framework
Development Griptape Integration with Griptape for structured AI application development

Industry-Specific Agents

Category Example Description
Finance 401k Agent Retirement planning assistant with investment strategy recommendations
Finance Estate Planning Comprehensive estate planning and wealth management assistant
Security Perimeter Defense Security monitoring and threat detection system
Research Perplexity Agent Advanced research automation using Perplexity AI integration
Legal Alberto Agent Legal research and document analysis assistant
Healthcare Pharma Agent Pharmaceutical research and drug interaction analysis

Multi-Agent Examples

Core Architectures

Category Example Description
Basic Build a Swarm Foundation for creating custom swarm architectures with multiple agents
Auto Swarm Auto Swarm Self-organizing swarm with automatic task distribution and management
Concurrent Concurrent Swarm Parallel execution of tasks across multiple agents for improved performance
Star Star Swarm Centralized architecture with a hub agent coordinating peripheral agents
Circular Circular Swarm Ring topology for cyclic information flow between agents
Graph Workflow Graph Workflow Basic Minimal graph workflow with two agents and one task

Concurrent and Parallel Processing

Category Example Description
Concurrent Concurrent Example Basic concurrent execution of multiple agents
Concurrent Swarm Concurrent Swarm Example Advanced concurrent swarm with parallel task processing

Hierarchical and Sequential Workflows

Category Example Description
Hierarchical Hierarchical Swarm Example Multi-level hierarchical agent organization
Hierarchical Basic Hierarchical Swarm Basic Simplified hierarchical swarm implementation
Hierarchical Advanced Hierarchical Advanced Advanced hierarchical swarm with complex agent relationships
Sequential Workflow Sequential Workflow Example Linear workflow with agents processing tasks in sequence
Sequential Swarm Sequential Swarm Example Sequential swarm with coordinated task execution

Group Chat and Interactive Systems

Category Example Description
Group Chat Group Chat Example Multi-agent group chat system with turn-based communication
Group Chat Advanced Group Chat Advanced Advanced group chat with enhanced interaction capabilities
Mortgage Panel Mortgage Tax Panel Specialized panel for mortgage and tax discussions
Interactive Group Chat Interactive Group Chat Interactive group chat with real-time user participation
Dynamic Speaker Random Dynamic Speaker Dynamic speaker selection in group conversations
Interactive Speaker Interactive Speaker Example Interactive speaker management in group chats
Medical Panel Medical Panel Example Medical expert panel for healthcare discussions
Stream Example Stream Example Streaming capabilities in interactive group chats

Research and Deep Analysis

Category Example Description
Deep Research Deep Research Example Comprehensive research system with multiple specialized agents
Deep Research Swarm Deep Research Swarm Swarm-based deep research with collaborative analysis
Scientific Agents Deep Research Swarm Example Scientific research swarm for academic and research applications

Routing and Decision Making

Category Example Description
Model Router Model Router Example Intelligent routing of tasks to appropriate model agents
Multi-Agent Router Multi-Agent Router Example Advanced routing system for multi-agent task distribution
Swarm Router Swarm Router Example Swarm-specific routing and load balancing
Majority Voting Majority Voting Example Consensus-based decision making using majority voting

Council and Collaborative Systems

Category Example Description
Council Judge Council Judge Example Council-based decision making with expert judgment

Advanced Collaboration

Category Example Description
Enhanced Collaboration Enhanced Collaboration Example Advanced collaboration patterns between multiple agents
Mixture of Agents Mixture of Agents Example Heterogeneous agent mixture for diverse task handling
Aggregate Aggregate Example Aggregation of results from multiple agents

API and Integration

Category Example Description
Swarms API Swarms API Example API integration for Swarms multi-agent systems

Utilities and Batch Processing

Category Example Description
Batch Agent Batch Agent Example Batch processing capabilities for multiple agents

Experimental Architectures

Category Example Description
Monte Carlo Monte Carlo Swarm Probabilistic decision-making using Monte Carlo simulation across agents
Federated Federated Swarm Distributed learning system with privacy-preserving agent collaboration
Ant Colony Ant Swarm Bio-inspired optimization using ant colony algorithms for agent coordination
Matrix Agent Matrix Grid-based agent organization for complex problem-solving
DFS DFS Search Swarm Depth-first search swarm for complex problem exploration
Pulsar Pulsar Swarm Pulsar-based coordination for synchronized agent behavior

Collaboration Patterns

Category Example Description
Delegation Agent Delegation Task delegation and management system
Communication Message Pool Shared communication system for efficient agent interaction
Scheduling Round Robin Round-robin task scheduling and execution
Load Balancing Load Balancer Dynamic task distribution system for optimal resource utilization
Consensus Majority Voting Consensus-building system using democratic voting among agents

Industry Applications

Category Example Description
Finance Accountant Team Multi-agent system for financial analysis, bookkeeping, and tax planning
Marketing Ad Generation Collaborative ad creation with copywriting and design agents
Aerospace Space Traffic Control Complex simulation of space traffic management with multiple coordinating agents
Agriculture Plant Biology Agricultural analysis and optimization using specialized biology agents
Urban Dev Urban Planning City development planning with multiple specialized urban development agents
Education Education System Personalized learning system with multiple teaching and assessment agents
Security Email Phishing Detection Multi-agent security analysis and threat detection
Fashion Personal Stylist Fashion recommendation system with style analysis and matching agents
Healthcare Healthcare Assistant Medical diagnosis and treatment planning with specialist consultation agents
Security Ops Security Team Comprehensive security operations with threat detection and response agents
Medical X-Ray Analysis Multi-agent medical imaging analysis and diagnosis
Business Business Strategy Strategic planning and business development swarm
Research Astronomy Research Collaborative space research and astronomical analysis

Additional Resources