Statistically rigorous behavioral drift detection for AI agents. Agents don't throw errors when they degrade — dedrift catches it.
Project description
dedrift
Agents don't throw errors when they degrade. They keep confidently producing worse outputs. dedrift catches it.
dedrift is an open-source Python package that detects silent behavioral drift in AI agents. It logs agent interactions, runs a frozen canary suite repeatedly, extracts behavioral signatures, and applies statistically rigorous drift detection with config-change attribution ("behavior shifted within 6h of the model version change").
Why dedrift
Model updates, prompt edits, tool-schema changes, RAG index refreshes, and provider-side silent updates all shift agent behavior without throwing a single error. Existing monitoring catches crashes, not character changes.
dedrift's differentiation is statistical correctness:
- Every detector controls its documented false-alarm rate — validated by simulation tests in CI.
- All alerting passes through FDR control (Benjamini–Hochberg). No raw per-test p-values dressed up as alerts.
- Every alert requires both statistical significance and a configurable effect-size (materiality) threshold. Fewer, higher-confidence alerts.
- LLM outputs are stochastic: canaries run N times per cycle and we compare distributions, never single outputs.
- Dual baselines: every check runs against a rolling recent window (sudden breaks) and a frozen golden baseline (boiling-frog drift).
- Honest about power: small N means low detection power, and the docs show you the math instead of hiding it.
Status
Pre-alpha, under active development. Working today: logging schema + store, canary runner (N repetitions per cycle), Tier-1 structural signatures, the full detector battery (KS/AD/Welch/Levene/bootstrap-P95/two-proportion z, PSI, Page–Hinkley) with BH-FDR and materiality gating, dual baselines, config-change attribution, and deterministic markdown reports — all with calibration and power tests enforced in CI. Coming for v0.1.0: embedding signatures (MMD), the 10-minute README demo, and a PyPI release.
Install
pip install dedrift # core: zero ML dependencies
pip install "dedrift[embeddings]" # + semantic signatures (sentence-transformers)
pip install "dedrift[judge]" # + LLM-judge tier
For development: pip install -e ".[dev]".
Quickstart (target v0 walkthrough)
dedrift init # create a project
# ... log agent interactions, run canaries ...
dedrift check # drift detection with FDR + materiality gating
dedrift report # deterministic markdown report with attribution
A full simulated demo (synthetic agent, mid-log model swap, detection + attribution) ships with v0.1.0.
dedrift Pro
Anytime-valid sequential inference (e-processes), conditional production-traffic drift, and importance weighting are part of a separate commercial tier and are not in this repository.
License
AGPL-3.0-only. See LICENSE.
Project details
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 dedrift-0.0.3.tar.gz.
File metadata
- Download URL: dedrift-0.0.3.tar.gz
- Upload date:
- Size: 53.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2705fc418e2bf6a9f7616f1dfdb3830baca8b1285a3721cb2b4ba7b041149f0
|
|
| MD5 |
0594b6cbf582e89ab16d654eec90b3d8
|
|
| BLAKE2b-256 |
d20fae4963f805a5cf949880b765aae49dfc7e4df5745e9fc03155eb57837051
|
File details
Details for the file dedrift-0.0.3-py3-none-any.whl.
File metadata
- Download URL: dedrift-0.0.3-py3-none-any.whl
- Upload date:
- Size: 52.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d1a10ccf6b6d16f00564c977677d3159f810925cf05fabdff883840fec915e1
|
|
| MD5 |
93d184cbde7d3a8b82a9b2231f9cf275
|
|
| BLAKE2b-256 |
069e7a4eae4fda9111818b10a7dce84238edd4422c3d0e5339300a8f9c234ce3
|