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/examples
Kye Gomez 1649922179
[DOCS][Hiearchical display]
1 day ago
..
aop_examples [FEAT][rustworkx integration into GraphWorkflow] [New Examples] 5 days ago
cli [CLI][Examples][CLI Docs] 3 days ago
deployment cleanup examples folder 2 weeks ago
guides move examples 1 week ago
mcp cleanup examples folder 2 weeks ago
models [EXAMPLES CLEANUP] [FIX][SwarmMatcher] [Remove old examples] 3 months ago
multi_agent [DOCS][Hiearchical display] 1 day ago
reasoning_agents [FEAT][DebateWithJudge] 7 days ago
single_agent [Examples][ReasoningAgentRouter] 1 week ago
swarms_api update examples readme with links 2 days ago
tools cleanup examples folder 2 weeks ago
ui example readme 2 months ago
utils cleanup examples folder 2 weeks ago
README.md update examples readme with links 2 days ago

README.md

Swarms Examples

This directory contains comprehensive examples demonstrating various capabilities and use cases of the Swarms framework. Each subdirectory focuses on specific aspects of multi-agent systems, single agents, tools, and integrations.

Directory Overview

Multi-Agent Systems

  • multi_agent/ - Advanced multi-agent patterns including agent rearrangement, auto swarm builder (ASB), batched workflows, board of directors, caching, concurrent processing, councils, debates, elections, forest swarms, graph workflows, group chats, heavy swarms, hierarchical swarms, LLM council, majority voting, orchestration examples, paper implementations, sequential workflows, social algorithms, simulations, spreadsheet examples, swarm routing, and utilities.

Single Agent Systems

  • single_agent/ - Single agent implementations including demos, external agent integrations, LLM integrations (Azure, Claude, DeepSeek, Mistral, OpenAI, Qwen), onboarding, RAG, reasoning agents, tools integration, utils, vision capabilities, and MCP integration.
    • README.md - Complete single agent examples documentation
    • simple_agent.py - Basic single agent example
    • agent_mcp.py - MCP integration example
    • rag/ - Retrieval Augmented Generation (RAG) implementations with vector database integrations

Tools & Integrations

Model Integrations

API & Protocols

  • swarms_api/ - Swarms API usage examples including agent overview, batch processing, client integration, team examples, analysis, and rate limiting.

  • mcp/ - Model Context Protocol (MCP) integration examples including agent implementations, multi-connection setups, server configurations, utility functions, and multi-MCP guides.

  • aop_examples/ - Agents over Protocol (AOP) examples demonstrating MCP server setup, agent discovery, client interactions, queue-based task submission, medical AOP implementations, and utility functions.

Advanced Capabilities

Guides & Tutorials

  • guides/ - Comprehensive guides and tutorials including demos, generation length blog, geo guesser agent, graph workflow guide, hackathon examples, hierarchical marketing team, nano banana Jarvis agent, smart database, web scraper agents, workshops, x402 examples, and workshop examples (840_update, 850_workshop).

Deployment

  • deployment/ - Deployment strategies and patterns including cron job implementations and FastAPI deployment examples.

Utilities

User Interface

  • ui/ - User interface examples and implementations including chat interfaces.

Command Line Interface

Quick Start

  1. New to Swarms? Start with single_agent/simple_agent.py for basic concepts
  2. Want to use the CLI? Check out cli/ for all CLI command examples
  3. Want multi-agent workflows? Check out multi_agent/duo_agent.py
  4. Need tool integration? Explore tools/agent_as_tools.py
  5. Interested in AOP? Try aop_examples/client/example_new_agent_tools.py for agent discovery
  6. Want to see social algorithms? Check out multi_agent/social_algorithms_examples/
  7. Looking for guides? Visit guides/ for comprehensive tutorials
  8. Need RAG? Try single_agent/rag/ for RAG examples
  9. Want reasoning agents? Check out reasoning_agents/ for reasoning agent examples

Key Examples by Category

Multi-Agent Patterns

Single Agent Examples

Tool Integrations

Model Integrations

CLI Examples

Documentation

Each subdirectory contains its own README.md file with detailed descriptions and links to all available examples. Click on any folder above to explore its specific examples and use cases.

Contributing

Found an interesting example or want to add your own? Check out our contributing guidelines and feel free to submit pull requests with new examples or improvements to existing ones.


This examples directory is continuously updated with new patterns, integrations, and use cases. Check back regularly for the latest examples!