Skip to main content

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. Phase 0 (scaffold, logging schema, storage, simulator) in progress. See ROADMAP.md.

Install

pip install -e .          # core: zero ML dependencies
pip install -e ".[embeddings]"   # + semantic signatures (sentence-transformers)
pip install -e ".[judge]"        # + LLM-judge tier
pip install -e ".[dev]"          # development tooling

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

dedrift-0.0.2.tar.gz (53.3 kB view details)

Uploaded Source

Built Distribution

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

dedrift-0.0.2-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file dedrift-0.0.2.tar.gz.

File metadata

  • Download URL: dedrift-0.0.2.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

Hashes for dedrift-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e3b44038992ce99148d18893b38d4a626b1b12380cb0d903f0cfd766b21a652a
MD5 55f311593b8d2974d072316a38c6cd28
BLAKE2b-256 2bd94720b3efce59c13e0ad24daa5d86ae124e2a81b04e7b6038f7fc53018bd1

See more details on using hashes here.

File details

Details for the file dedrift-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: dedrift-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dedrift-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 562b5765f9263d3033b2d0b5b45ce982e43c2172e50c3fc18a53795832cbc24b
MD5 de920b23983556ef5a35e75332e6755e
BLAKE2b-256 1d4c02c993b787616cbb28ba20eb704c5f3948fd1a0e0365f80823cc6a295a87

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