Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SwarmFL

SwarmFL is an experimental federated multi-agent learning research framework for specialist registration, selected-only Flower consultations, cost-aware routing, dynamic fusion, signed delayed feedback, and version-controlled federated updates.

Alpha research software: SwarmFL is not a medical device, clinical decision system, privacy guarantee, or secure multi-hospital deployment.

Distribution: swarmfl · Python package: fed_med_agents · Version: 0.1.0a1

Architecture overview

origin specialist
      │
      ├─ registry + authorization + availability/cost contracts
      ├─ router ──> STOP
      │       └──> one selected peer ── Flower request/reply
      ├─ dynamic fusion of actually observed predictions
      └─ signed prediction ── delayed verified outcome
                              └─ shared router/fusion update
                                  └─ validate → activate/reject → rollback

Private specialists retain their own preprocessing and checkpoints. Consultations do not send private training rows or specialist weights. Shared Flower updates optimize compatible router/fusion parameters, not private specialist models. Logical registry membership is distinct from physical Flower federation membership. Read the full technical architecture.

Key capabilities

  • Typed external specialist declarations and compatibility checks.
  • Logical registration, availability, authorization, and consultation budgets.
  • Fixed, contextual MLP, and graph-inspired cost-aware routing.
  • Genuine selected-only Flower communication with STOP support.
  • Dynamic mean, reliability-weighted, and DeepSets fusion.
  • Signed prediction/outcome separation and delayed verified feedback.
  • Federated shared-parameter optimization with immutable versions and rollback.
  • CPU-only synthetic onboarding without CDC data, GPU, Ollama, or private weights.

Installation

From a source checkout:

python -m pip install .

From a built wheel:

python -m pip install dist/swarmfl-0.1.0a1-py3-none-any.whl

After the package is actually published to PyPI, installation will be:

python -m pip install swarmfl

The PyPI command is a post-publication instruction; swarmfl has not yet been uploaded. Supported Python versions are 3.11–3.13. Optional historical research dependencies are available through .[research]; Qwen HTTP integration is .[qwen]; contributor tooling is .[dev].

Release process

PyPI publication is configured through GitHub OIDC Trusted Publishing. The release workflow runs only when an explicit v* tag is pushed, requires that the tag exactly equals v plus the version in pyproject.toml, builds and checks a wheel and sdist, and publishes those same-run artifacts through the protected pypi environment. Ordinary branch pushes and pull requests cannot invoke it.

For version 0.1.0a1, the release tag would be v0.1.0a1. Do not create or push that tag until the release contents, current CI, and publication decision have been explicitly approved. The workflow uses no long-lived PyPI API token.

Five-minute CPU quickstart

Run from a directory outside the source checkout:

swarmfl-quickstart --output demo --feedback

The command generates synthetic records, creates three independent NumPy specialists, starts three real CPU Flower clients, registers their contracts, selects at most one peer per case, transfers only authorized synthetic fields, fuses observed predictions, verifies one signed delayed outcome, activates a candidate version, and rolls back. Results are written to demo/result.json. The synthetic task has no clinical meaning.

Flower warns that its Python run_simulation launcher is deprecated. SwarmFL pins the tested Flower 1.40.0 path while a CLI migration remains separate work. Ray on Windows is experimental. Ubuntu GitHub Actions passed tests, build, Twine checks, and installed-wheel smoke validation on 2026-10-16.

Custom specialist integration

from fed_med_agents import SpecialistRegistry
from fed_med_agents.collaboration.registry import Specialist

registry = SpecialistRegistry()
specialist: Specialist = build_your_declaration()  # application-defined
registry.register(specialist)

A declaration binds task, output, feature, adapter, checkpoint, capability, cost, and availability metadata. Registration does not physically join Flower. The application must separately run a compatible ClientApp, discover its node ID, and bind that transport identity.

See examples/custom_specialist.py for a complete declaration and fed_med_agents.quickstart for an end-to-end synthetic transport implementation.

Research results

The consolidated verified results report covers CDC diabetes development research, routing and fusion comparisons, continual feedback cycles, Step 8A external specialists, and installed-wheel validation. The research index explains what is public and what remains intentionally private.

Key findings remain narrow. At 160,000 CDC development routing records, fixed/MLP/graph objectives were 0.350173/0.350110/0.350173, while MLP utility R² was 0.000003; learned-routing superiority was not established. Dynamic fusion results are promising development diagnostics, not matched-protocol clinical evidence. Sequential validation populations differ and do not demonstrate sustained continual improvement.

Documentation

Resource Purpose
Architecture Technical components, contracts, and data flow
Limitations Scientific, privacy, security, and operational boundaries
Feedback learning Delayed-outcome and shared-update semantics
Current status Verified milestone and release state
Research index Public research organization and evidence policy
Verified results Numerical findings and provenance
Milestone reports Detailed historical methodology
Contributing Development and evidence requirements
Security Reporting route and known boundaries

Generated artifacts, CDC datasets, private checkpoints, frozen evaluation files, Qwen weights, caches, and local run logs are excluded from Git and distributions. Historical artifact paths provide provenance, not a promise that private evidence is downloadable.

Security and limitations

SwarmFL currently operates as a trusted local simulation. Predictions, identifiers, timing, metadata, logs, and shared updates can disclose information. It provides no formal differential privacy, secure aggregation, malicious-client resistance, transport isolation, HIPAA/GDPR compliance, or confidentiality guarantee.

Flower 1.40.0's simulation extra pins Ray 2.55.1, which has a high-severity unsafe deserialization advisory in ray.data.read_webdataset. SwarmFL does not use Ray Data and accepts no WebDataset/TAR input. The owner accepts this residual dependency risk for this trusted-local alpha only. See SECURITY.md.

The frozen CDC test container and ID file have not been opened, loaded, hashed, modified, or evaluated in the relevant research sequence. There is no independent multi-hospital validation, established clinical utility, general predictive superiority, or physical dynamic Flower membership. Read limitations before interpreting results.

Citation and license

Citation metadata is provided in CITATION.cff. Do not describe an unarchived alpha as a peer-reviewed publication or assign it a DOI unless one is actually issued.

SwarmFL is licensed under the Apache License 2.0. Dependencies, datasets, and separately obtained model weights remain subject to their own terms. See NOTICE.

Metadata

Release files for swarmfl 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmfl 0.1.0a1
File Size Uploaded Provenance Actions
swarmfl-0.1.0a1.tar.gz 278.5 kB With provenance Details for swarmfl-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swarmfl 0.1.0a1
File Interpreter ABI Platform Actions
swarmfl-0.1.0a1-py3-none-any.whl Python 3 none any Details for swarmfl-0.1.0a1-py3-none-any.whl

Total release size: 505.5 kB

Release files / swarmfl-0.1.0a1.tar.gz

Download URL swarmfl-0.1.0a1.tar.gz
Size 278.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a7fbc61daf3a29327b67c70ed605d89d03789fecc9c2361e15062a6df0cec0d2
BLAKE2b-256 checksum
How to use checksums
bad4969b522dafe2607f0ee7608663cba5af674eb8e2f875e9111a50223dca22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / swarmfl-0.1.0a1-py3-none-any.whl

Download URL swarmfl-0.1.0a1-py3-none-any.whl
Size 227.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10d8b2413772b0db8dea18602376c94997c9726b18ddd71d549cdc3faf164566
BLAKE2b-256 checksum
How to use checksums
721cec3bb5c6add02f3a9de4aa0aed75007c86e46a7a2cf56581d1863a28205b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for swarmfl 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for swarmfl-0.1.0a1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page