SwarmZero Docs
Main WebsitePricingGitHubDiscordX
  • GETTING STARTED
    • Welcome
    • Developing on SwarmZero
    • Quickstart
    • Key Concepts
      • AI
      • ML
      • LLM
      • AI Agents
      • Swarms
    • Contributing to SwarmZero
  • SDK
    • Agent Kit
    • Agent API Schema
    • Observability
      • Langtrace
      • OpenLIT
      • AgentOps
  • EXAMPLES
    • AI Agents
      • Build a Dune Agent with SwarmZero.ai
      • Build a News Agent with SwarmZero.ai using the GDELT API
      • Build a Uniswap Docs Retrieval Agent with SwarmZero.ai
      • Build an AAVE AI Agent to Lend and Borrow Crypto
      • Build & Monitor a Web Search Agent
      • Build a Multi-Chain Crypto Trading Telegram Bot with SwarmZero, Bitquery and DEXRabbit
    • Swarms
      • AI Researcher Swarm
      • Build a Web3 dApp with a Swarm of AI Agents
      • Livepeer Youtube Video Generator Swarm
    • Tools
      • Tools for Building Agents with Livepeer
      • Tools for Building Agents with Dune
      • YouTube Video Editor & Upload Tools
      • File Operations Tools
Powered by GitBook
LogoLogo

Quick Links

  • Main Website
  • Pricing
  • GitHub
  • Discord

© 2025 SwarmZero Technology Solutions Inc. All rights reserved.

On this page
  • Installation
  • Creating a Swarm
  • Interested in Building Interesting Swarms with SwarmZero.ai?

Was this helpful?

  1. GETTING STARTED
  2. Key Concepts

Swarms

PreviousAI AgentsNextContributing to SwarmZero

Last updated 6 months ago

Was this helpful?

Swarms on SwarmZero.ai allow you to group multiple AI Agents into a coordinated workflow to handle more complex tasks. Each agent within a Swarm has a specific function but works collaboratively to achieve a larger goal. This approach allows users to combine various specialized agents to process information, interact with external services, and automate tasks seamlessly and efficiently.

SwarmZero makes it simple to create Swarms using a no-code or low-code interface. Users can visually organize their agents, specify their interactions, and set up workflows that respond to real-time data. By utilizing AI, Machine Learning, and Large Language Models (LLMs), Swarms can operate autonomously or with user inputs, depending on the task complexity.

Installation

To get started, install the necessary framework via pip:

pip install swarmzero

Alternatively, you can add it to your requirements.txt:

swarmzero==x.y.z

Creating a Swarm

You can create a swarm of agents to collaborate on complex tasks. Here's an example of how to set up and use a swarm:

from swarmzero.swarm import Swarm
from swarmzero.agent import Agent
from swarmzero.sdk_context import SDKContext

import asyncio

# Create SDK Context
sdk_context = SDKContext(config_path="./swarmzero_config_example.toml")


def save_report():
    return "save_item_to_csv"


def search_on_web():
    return "search_on_web"


# Create individual agents
agent1 = Agent(name="Research Agent", instruction="Conduct research on given topics", sdk_context=sdk_context,
               functions=[search_on_web])
agent2 = Agent(name="Analysis Agent", instruction="Analyze data and provide insights", sdk_context=sdk_context,
               functions=[save_report])
agent3 = Agent(name="Report Agent", instruction="Compile findings into a report", sdk_context=sdk_context, functions=[])

# Create swarm
swarm = Swarm(name="Research Team", description="A swarm of agents that collaborate on research tasks",
              instruction="Be helpful and collaborative", functions=[], agents=[agent1, agent2, agent3])


async def chat_with_swarm():
    return await swarm.chat("Can you analyze the following data: [1, 2, 3, 4, 5]")


if __name__ == "__main__":
    asyncio.run(chat_with_swarm())

Interested in Building Interesting Swarms with SwarmZero.ai?

Follow the tutorial below:

Build a Web3 dApp with a Swarm of AI Agents