Skip to content

Installation

Quick Install

Install SWARM from PyPI:

pip install swarm-safety

Install from Source

Clone the repository and install in development mode:

git clone https://github.com/swarm-ai-safety/swarm.git
cd swarm
pip install -e ".[dev]"

Optional Dependencies

SWARM has several optional dependency groups:

pip install swarm-safety[dev]

Includes: pytest, pytest-cov, hypothesis, mypy, ruff

pip install swarm-safety[analysis]

Includes: pandas, matplotlib, seaborn

pip install swarm-safety[llm]

Includes: anthropic, openai, httpx

pip install swarm-safety[dashboard]

Includes: streamlit, plotly

pip install swarm-safety[all]

All optional dependencies

Verify Installation

import swarm
print(swarm.__version__)
swarm --help

System Requirements

  • Python 3.10 or higher
  • numpy, pydantic, pandas (installed automatically)

Next Steps