Skip to main content
Pre-release

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

Dagents

Dagents is a framework for running analytics and machine learning across many data sources without moving the data. Each data source runs a local agent, a global agent combines their results, and typed planners decide what each request may see and whether a new model may be released.

It started as shared code from products such as Watchdog, and is meant to be reused by systems such as Datalytics.

Status: alpha. Dagents is in early development. Every version before 1.0.0 is a pre-release, and the Python APIs, settings, routes and package layout can change from one release to the next.

Install

The Python framework is released to PyPI as dagents, starting with 0.1.0a1. It needs Python 3.11 or later.

pip install dagents                # the Ethical Guard, federated rounds, extensions and the planner runner
pip install "dagents[lma,gma]"     # adds FastAPI, uvicorn and httpx, to serve an LMA or a GMA

The other extras are postgres (the Postgres audit chain, job log, model registry and source adapter), charts (the SVG chart renderer), compose (PyYAML, for the appliers that start a service from a Compose file) and all. While every release is a pre-release, pip install dagents installs the newest one. After 1.0.0, a pre-release needs pip install --pre dagents or an exact version.

The wheels for Linux x86_64, Linux aarch64 and macOS arm64 include the planner, dagentsc. On other systems, such as Windows and Intel Macs, pip builds the package from its source distribution, which has no planner. There the Ethical Guard denies every request until DAGENTSC_BIN names a planner binary. Each GitHub Release has the planner for the three platforms, and bindings/ocaml/ shows how to build it. python -m dagents prints the installed version and the planner it found.

dagents-lma and dagents-gma start an agent. An installed package reads its settings only from the process environment; the LMA and GMA READMEs list them. The services in services/, the Spring services and the demos are not in the package.

Framework site https://pradyunuydarp.github.io/Dagents/: the learning guide, the guide to building an application, the API reference and links to the demos
Stroke triage demo https://pradyunuydarp.github.io/Dagents/healthcare-demo/: governance, federated training and data entry across three hospitals
NL2SQL demo https://pradyunuydarp.github.io/Dagents/nl2sql-demo/: an ordinary app that uses the framework

The stroke triage demo uses real, de-identified records from the International Stroke Trial (IST-1, 1991-1996): 1,014 patients from three hospitals in the United Kingdom, Italy and Switzerland. Each hospital keeps its records in its own store, and the page has a view for each hospital, with a form to enter a new record. Each hospital is served by a Dagents LMA and the study by a Dagents GMA, and the demo calls them only through their HTTP APIs; the page lists the agent calls behind each answer. The published page calls the demo's deployed API, which runs the agents in its own process. The agents make every governance and federation decision with the OCaml planner in its image, and the page shows the data source the API reports. The API sleeps when idle, so the first request takes about 20 seconds, and the page shows a banner while it waits. If, when the site is built, the API does not answer, is not reading Postgres, has a hospital store without records, or refuses requests from the site, the page replays a recorded run instead and says so.

The NL2SQL demo has no deployed backend. It replays responses recorded from the real services and names the commit they came from. A question that was not recorded gets no answer.

apps/healthcare-demo/docs/deployment.md explains how the deployed parts fit together and where each credential is kept.

Learn

The learning guide explains federated learning, data governance, the Dagents architecture and the APIs, with diagrams, videos, papers and exercises. Read it on the framework site or in docs/learn/.

  1. Federated learning
  2. Privacy and data governance
  3. How Dagents is built
  4. Using the APIs
  5. Run it yourself

The slide decks and reports we used to teach the framework are on the site's Resources page, as PowerPoint files and PDFs. The list is docs/presentation/resources.json.

Build an application on Dagents

The guide to building an application shows, step by step, how to use Dagents in your own code: choose one of three ways to build on it, describe your data, give each source its own store, govern every read, run a federated round, call the framework services, deploy and test. Read it on the framework site or in docs/guide/. Its code comes from a small application in examples/getting-started/, and a test checks that the two match.

What is in the repository

Folder Contents
dagents/ The Python framework, packaged as dagents (pyproject.toml): the LMA (one per data source) and GMA (coordinator) services
dagents/common/extensions/ The interface applications use to extend the framework
bindings/ocaml/ The planners: validation, DAG planning, model routing, Kubernetes manifests and Docker Compose files, governance, federated rounds
services/core-service/ Service catalog, topology, workload compilation, Kubernetes manifests and Docker Compose files
services/pipeline-service/ Pipeline registry, validation and runs
services/model-service/ Model training, checks and jobs
services/spring-services/ Spring Boot versions of the control and core APIs
contracts/grpc/dagents/agents/v1/ Shared protobuf contract for the agents
apps/healthcare-demo/ Stroke triage demo: governance and federated learning
services/nl2sql-demo/ NL2SQL demo: validation, planning and service checks
examples/getting-started/ The worked example of the guide to building an application: two stores check a rule together
site/ The framework site
design/ The design system shared by the three frontends
docs/ The learning guide, the guide to building an application, architecture notes and the endpoint list
env/ Configuration for each service (no secrets)

Governance and federated rounds

These are the two parts an application would otherwise build itself:

  • Governance (GRAILS). A planner decides the protection each field of a request needs, from three inputs: how sensitive the field is, how much the requester is trusted, and how much data is requested. The Ethical Guard applies the decision and writes it to an audit log. The planner is OCaml, so adding a sensitivity level or a strategy does not compile until every combination is handled. If the planner cannot be reached, the Guard denies the request.
  • Federated rounds. Round manifests with a digest, site eligibility, quorum, aggregation readiness and release gates. Dagents decides who may take part and whether a result may be released. The training protocol itself belongs to a dedicated federated learning runtime behind an adapter. Aggregation produces a candidate model, never a release.

Applications use both through dagents/common/extensions, by registering feature contracts, data classifications, condition packs, model kinds, site sources, pipeline steps and model adapters, and call the LMA and GMA through their APIs. apps/healthcare-demo/ is a worked example.

Run it

Build the planner, then run the stroke triage demo locally (no Docker or database needed):

cd bindings/ocaml && opam exec -- dune build ./bin/dagentsc.exe && cd -
export DAGENTSC_BIN=$PWD/bindings/ocaml/_build/default/bin/dagentsc.exe
apps/healthcare-demo/scripts/run_frontend_demo.sh

Step 5 of the guide covers setup, tests and exercises.

To run the whole stack in containers, with the committed configuration:

docker compose --env-file env/.env.compose up --build

Each service reads env/.env.shared plus its own file under env/.

Further reading

The stroke triage demo's records come from the International Stroke Trial database (version 2), made available under the ODC Attribution License; see apps/healthcare-demo/data/ist/NOTICE.md. The demo's models are not clinically validated, and it is not a medical device.

Metadata

Release files for dagents 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 dagents 0.1.0a1
File Size Uploaded
dagents-0.1.0a1.tar.gz 245.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dagents 0.1.0a1
File Interpreter ABI Platform
dagents-0.1.0a1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64, Linux musl 1.1+ x86-64 Details
dagents-0.1.0a1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl Python 3 none Linux musl 1.1+ ARM64, Linux glibc 2.17+ ARM64 Details
dagents-0.1.0a1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 3.8 MB

Release files / dagents-0.1.0a1.tar.gz

Download URL dagents-0.1.0a1.tar.gz
Size 245.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c0d5c812a4d4b2b723453f34d469d304282a7b05ae28a257bb932f04fd7253b6
BLAKE2b-256 checksum
How to use checksums
0cc91c227ebee17b791421699d2573836a3cff824e2f5bcea8134a4128faa89c
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 / dagents-0.1.0a1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl

Download URL dagents-0.1.0a1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl
Size 1.3 MB
Tags Linux glibc 2.17+ x86-64 Linux musl 1.1+ x86-64 Python 3
SHA-256 checksum
How to use checksums
d034c17b17056f562ffae260e2831858c1472482c856eb99755798af0a4cf3b5
BLAKE2b-256 checksum
How to use checksums
0dcc82ae59f96df798df1e2e9869a7249a5f68c449e82230dcbe9a243bfd5442
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 / dagents-0.1.0a1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl

Download URL dagents-0.1.0a1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ ARM64 Linux musl 1.1+ ARM64 Python 3
SHA-256 checksum
How to use checksums
774678bd648ef3c0b5f96004cebaafefb5f859bf585bc052c8aa256b6543f32b
BLAKE2b-256 checksum
How to use checksums
f37a6a4c763bccbe3eda6e71d794c767d375343246af1598f101e6fed4128521
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 / dagents-0.1.0a1-py3-none-macosx_11_0_arm64.whl

Download URL dagents-0.1.0a1-py3-none-macosx_11_0_arm64.whl
Size 959.6 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
177421f1a0ce843d3d174e4b351cdeb1f855b46b0b671d75d50ae7b165e2c2ba
BLAKE2b-256 checksum
How to use checksums
c9d37450bddc980f6bd7c6a210ea6caef9a4873fdef7f9426d741996cadac59a
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 history Release notifications | RSS feed

This release

0.1.0a1 This release

4 release files

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