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.
Metadata
Release files for swerl 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swerl-0.0.1.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swerl-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.4 kB
Release files / swerl-0.0.1.tar.gz
| Download URL | swerl-0.0.1.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15073daa44652d828fc2b709cc7cc414156edb77d7a14747645d740f3fd22e01
|
|
BLAKE2b-256 checksum How to use checksums |
2f3abb92af94ba38f076c2f7b512b06ee43156493f0b5052471f6bcd2fd5fb61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / swerl-0.0.1-py3-none-any.whl
| Download URL | swerl-0.0.1-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7815739d42621cc85b872ba63fe5bd6fa02c7f790dfb59a2945d8fd7507dce5f
|
|
BLAKE2b-256 checksum How to use checksums |
1c59296bc135853b8cf5715b84e7d8ee0778c3d6346d385d17e37e09d42b7eef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|