Skip to main content

swerl

Swarm Engine RL — a reinforcement learning framework for training LLM agent swarms.

PyPI Python License

⚠️ 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).

  1. Bump __version__ in src/swerl/__init__.py and add a CHANGELOG.md entry.
  2. Tag and push: git tag v0.0.1 && git push --tags.
  3. 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

swerl-0.0.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swerl-0.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

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

Hashes for swerl-0.0.1.tar.gz
Algorithm Hash digest
SHA256 15073daa44652d828fc2b709cc7cc414156edb77d7a14747645d740f3fd22e01
MD5 b0a2548ddca0b54284c99e21996b4d83
BLAKE2b-256 2f3abb92af94ba38f076c2f7b512b06ee43156493f0b5052471f6bcd2fd5fb61

See more details on using hashes here.

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

Hashes for swerl-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7815739d42621cc85b872ba63fe5bd6fa02c7f790dfb59a2945d8fd7507dce5f
MD5 9deb8a327261c993156ff17bb99ef10a
BLAKE2b-256 1c59296bc135853b8cf5715b84e7d8ee0778c3d6346d385d17e37e09d42b7eef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page