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 daf261cc73
[EXAMPLES][8.4.0 New Examples]
1 week ago
..
aop_examples [IMPROVEMENT][AOP][New tools for agent discovery and more] 1 week ago
demos [MIGRATION][gpt-4o to gpt-4.1] [FEATURE][AOP][Agent orchestration Protocol]++[DOCS] [Examples] 1 week ago
deployment example readme 3 weeks ago
guides [EXAMPLES][8.4.0 New Examples] 1 week ago
hackathons/hackathon_sep_27 [EXAMPLES][Hackathon section] [DEPDENCIES][ORJSON] 2 weeks ago
mcp example readme 3 weeks ago
models [EXAMPLES CLEANUP] [FIX][SwarmMatcher] [Remove old examples] 1 month ago
multi_agent [IMPROVEMENT][AOP][New tools for agent discovery and more] 1 week ago
rag [MIGRATION][gpt-4o to gpt-4.1] [FEATURE][AOP][Agent orchestration Protocol]++[DOCS] [Examples] 1 week ago
reasoning_agents example readme 3 weeks ago
single_agent [MIGRATION][gpt-4o to gpt-4.1] [FEATURE][AOP][Agent orchestration Protocol]++[DOCS] [Examples] 1 week ago
swarms_api_examples [MIGRATION][gpt-4o to gpt-4.1] [FEATURE][AOP][Agent orchestration Protocol]++[DOCS] [Examples] 1 week ago
tools [fix][autoswarm builder] [new examples and fix liutelln wrapper and tools issue] 2 weeks ago
ui example readme 3 weeks ago
utils [MIGRATION][gpt-4o to gpt-4.1] [FEATURE][AOP][Agent orchestration Protocol]++[DOCS] [Examples] 1 week ago
workshops example readme 3 weeks ago
README.md main examples folder readme 3 weeks 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, majority voting, and orchestration examples.

👤 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, and vision capabilities.

🛠️ Tools & Integrations

  • tools/ - Tool integration examples including agent-as-tools, base tool implementations, browser automation, Claude integration, Exa search, Firecrawl, multi-tool usage, and Stagehand integration.

🎯 Model Integrations

  • models/ - Various model integrations including Cerebras, GPT-5, GPT-OSS, Llama 4, Lumo, Ollama, and VLLM implementations.

🔌 API & Protocols

  • swarms_api_examples/ - 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, and utility functions.

🧠 Advanced Capabilities

  • reasoning_agents/ - Advanced reasoning capabilities including agent judge evaluation systems and O3 model integration.

  • rag/ - Retrieval Augmented Generation (RAG) implementations with vector database integrations.

📚 Guides & Tutorials

  • guides/ - Comprehensive guides and tutorials including generation length blog, geo guesser agent, graph workflow guide, hierarchical marketing team, nano banana Jarvis agent, smart database, and web scraper agents.

🎪 Demonstrations

  • demos/ - Domain-specific demonstrations across various industries including apps, charts, crypto, CUDA, finance, hackathon projects, insurance, legal, medical, news, privacy, real estate, science, and synthetic data generation.

🚀 Deployment

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

🛠️ Utilities

  • utils/ - Utility functions and helper implementations including agent loader, communication examples, concurrent wrappers, miscellaneous utilities, and telemetry.

🎓 Educational

  • workshops/ - Workshop examples and educational sessions including agent tools, batched grids, geo guesser, and Jarvis agent implementations.

🖥️ User Interface

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

🚀 Quick Start

  1. New to Swarms? Start with single_agent/simple_agent.py for basic concepts
  2. Want multi-agent workflows? Check out multi_agent/duo_agent.py
  3. Need tool integration? Explore tools/agent_as_tools.py
  4. Looking for guides? Visit guides/ for comprehensive tutorials

📖 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!