Detect when your AI agents get dumber. Open-source quality drift monitoring.
Project description
AgentDrift
Detect when your AI agents get dumber.
Open-source quality drift monitoring for AI agents. Track agent outputs over time, detect quality degradation, and get alerts before your agents go off the rails.
Live Demo | API Docs | Roadmap | Contributing
The Problem
AI agents degrade over time. Context pollution, error accumulation, prompt drift, and model updates silently erode output quality. By the time you notice, your users already have.
Quick Start
pip install agentdrift
from agentdrift import track_agent
@track_agent("my-agent")
def my_agent(query: str) -> str:
return llm.call(query)
Check drift status:
agentdrift status
┌──────────────────────────────────────┐
│ Agent Drift Status │
├──────────┬──────────┬───────┬───────┤
│ Agent │ Status │ Score │ Change│
├──────────┼──────────┼───────┼───────┤
│ my-agent │ STABLE │ 0.847 │ +2.1% │
│ qa-bot │ DRIFTING │ 0.612 │-18.3% │
└──────────┴──────────┴───────┴───────┘
How It Works
Agent Call → Log Trace → Score Quality → Detect Drift → Alert
↓
Dashboard / OTel Export
- Track — Log every agent input/output with the SDK
- Score — LLM-as-Judge rates output quality (0.0 - 1.0)
- Compare — Recent scores vs baseline period
- Alert — Notify when quality drops below threshold
Key Features
- 1-line integration —
@track_agentdecorator or manualtracker.log() - Web dashboard — Real-time quality trends, trace trees, golden tests management
- Golden tests — Regression testing from your best agent outputs
- Alert webhooks — Slack, Discord, Email on drift detection
- Multi-agent tracing — Parent/child trace relationships
- OpenTelemetry export — Jaeger, Zipkin, any OTLP backend
- REST API — Language-agnostic trace ingestion (
POST /api/traces) - TypeScript SDK —
@agentdrift/sdkfor Node.js agents - PostgreSQL — Production-ready storage (
pip install agentdrift[postgres]) - Docker + Helm — Kubernetes deployment ready
Usage
Web Dashboard
pip install agentdrift[dashboard]
agentdrift serve # API server on :8888
cd web && npm run dev # Dashboard on :3000
Manual Logging
from agentdrift import AgentTracker
tracker = AgentTracker("my-agent")
tracker.log(input=query, output=result, latency_ms=1200)
Multi-Agent Tracing
orchestrator = AgentTracker("orchestrator")
worker = AgentTracker("worker")
parent = orchestrator.log(input="plan task", output="delegating")
worker.log(input="subtask", output="result", parent_trace_id=parent.trace_id)
HTTP API
curl -X POST http://localhost:8888/api/traces \
-H "Content-Type: application/json" \
-d '{"agent_name": "my-agent", "input": "hello", "output": "world"}'
TypeScript SDK
import { AgentDriftClient, AgentTracker } from "@agentdrift/sdk";
const client = new AgentDriftClient({ baseUrl: "http://localhost:8888" });
const tracker = new AgentTracker("my-agent", client);
await tracker.log({ input: "hello", output: "world" });
Golden Tests
agentdrift test init my-agent --count 10 --min-score 0.8
agentdrift test run my-agent --module my_app:my_agent --threshold 0.7
Configuration
agentdrift init --config # Generate agentdrift.toml
See examples/ for more integration patterns.
Deployment
# Docker
docker compose up
# Kubernetes
helm install agentdrift chart/agentdrift/
# Vercel (dashboard only)
cd web && vercel
Documentation
| Resource | Description |
|---|---|
| API Reference | REST API endpoints |
| Roadmap | Completed features & future plans |
| Contributing | Development setup & guidelines |
| Changelog | Release notes |
License
MIT
Project details
Release history Release notifications | RSS feed
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 agentdrift-0.4.3.tar.gz.
File metadata
- Download URL: agentdrift-0.4.3.tar.gz
- Upload date:
- Size: 284.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
513ed57b7535e7516da06f3198494a24c1cc007ef1cea067367829cc3ffe55bf
|
|
| MD5 |
c09319ccf6d989ae8ba822eab335688c
|
|
| BLAKE2b-256 |
f9a6cabc16fb35e9fd357a8369d65653b6999915e5fa1967a3f46ad011777a05
|
Provenance
The following attestation bundles were made for agentdrift-0.4.3.tar.gz:
Publisher:
publish.yml on agentdrift-ai/agentdrift
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentdrift-0.4.3.tar.gz -
Subject digest:
513ed57b7535e7516da06f3198494a24c1cc007ef1cea067367829cc3ffe55bf - Sigstore transparency entry: 944185977
- Sigstore integration time:
-
Permalink:
agentdrift-ai/agentdrift@d75e58ad51309903ad30c348b5fa96c07c8f215a -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/agentdrift-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d75e58ad51309903ad30c348b5fa96c07c8f215a -
Trigger Event:
release
-
Statement type:
File details
Details for the file agentdrift-0.4.3-py3-none-any.whl.
File metadata
- Download URL: agentdrift-0.4.3-py3-none-any.whl
- Upload date:
- Size: 42.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
defe3658eb0c6211f610aecc404da804aee20b97705ff72e645ffdc14fac9e9a
|
|
| MD5 |
d0731ddafc4d30fa87bbea4f2d8753e3
|
|
| BLAKE2b-256 |
79868d480088f5230efbe051d39f67b9a174a26a1b483262ffe45db0f72f9807
|
Provenance
The following attestation bundles were made for agentdrift-0.4.3-py3-none-any.whl:
Publisher:
publish.yml on agentdrift-ai/agentdrift
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentdrift-0.4.3-py3-none-any.whl -
Subject digest:
defe3658eb0c6211f610aecc404da804aee20b97705ff72e645ffdc14fac9e9a - Sigstore transparency entry: 944185857
- Sigstore integration time:
-
Permalink:
agentdrift-ai/agentdrift@d75e58ad51309903ad30c348b5fa96c07c8f215a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/agentdrift-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d75e58ad51309903ad30c348b5fa96c07c8f215a -
Trigger Event:
release
-
Statement type: