swerl
Swarm Engine RL — a reinforcement learning framework for training LLM agent swarms.
⚠️ Early alpha. The package is published so the API can stabilize in the open; expect breaking changes before
0.1.0.
Install
pip install swerl
The base install is deliberately light — it pulls no CUDA wheels, so it stays importable on a laptop or a CI runner. The training stack lives behind extras:
pip install "swerl[torch]" # torch + transformers + datasets + accelerate
pip install "swerl[ray]" # distributed swarm orchestration
pip install "swerl[vllm]" # fast rollout backend
pip install "swerl[all]" # everything a training node needs
Quick check
swerl info
Prints swerl's version plus the torch / ray / vllm versions it can see — the first thing to paste into a bug report.
Development
The repo uses uv:
uv sync --extra dev
Then:
uv run pytest
uv run ruff check . && uv run mypy
Releasing
One-time setup: create a PyPI API token and store it as the PYPI_API_TOKEN
secret in the repo's pypi environment (and TEST_PYPI_API_TOKEN in a
testpypi environment if you want dry runs).
- Bump
__version__insrc/swerl/__init__.pyand add aCHANGELOG.mdentry. - Tag and push:
git tag v0.0.1 && git push --tags. - Publish a GitHub Release for that tag — the publish workflow builds and uploads to PyPI.
To rehearse without cutting a release, run the publish workflow manually; it defaults to TestPyPI.
Publishing by hand
The workflow just runs uv publish, so you can do the same thing locally. The
publish targets are named in pyproject.toml, so no URLs to remember:
uv build && uv publish --index testpypi --token pypi-YOUR-TOKEN-HERE
--token X is shorthand for --username __token__ --password X. Prefer the
UV_PUBLISH_TOKEN environment variable so the token stays out of your shell
history, and add --dry-run to see what would be uploaded:
UV_PUBLISH_TOKEN=$(cat ~/.pypi-token) uv publish --index pypi --dry-run
License
Apache-2.0. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swerl-0.0.1.tar.gz.
File metadata
- Download URL: swerl-0.0.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15073daa44652d828fc2b709cc7cc414156edb77d7a14747645d740f3fd22e01
|
|
| MD5 |
b0a2548ddca0b54284c99e21996b4d83
|
|
| BLAKE2b-256 |
2f3abb92af94ba38f076c2f7b512b06ee43156493f0b5052471f6bcd2fd5fb61
|
File details
Details for the file swerl-0.0.1-py3-none-any.whl.
File metadata
- Download URL: swerl-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7815739d42621cc85b872ba63fe5bd6fa02c7f790dfb59a2945d8fd7507dce5f
|
|
| MD5 |
9deb8a327261c993156ff17bb99ef10a
|
|
| BLAKE2b-256 |
1c59296bc135853b8cf5715b84e7d8ee0778c3d6346d385d17e37e09d42b7eef
|