DriftWatch

Introduction

DriftWatch is a self-observing AI agent SDK — traces, drift detection, and a policy-driven autopilot with a human in the loop.

DriftWatch is a self-observing AI agent platform. Every tool call and model step an agent makes is traced as OpenTelemetry into a backend like SigNoz; an LLM watches that telemetry for behavioral drift, it detects shifts in tool-call mix, error rate, latency, or token spend, and a policy-driven autopilot turns drift into action (notify, pause, rollback, throttle) with a human in the loop for anything destructive.

In one line: instrument an agent's decisions as telemetry, run a model over that telemetry to notice when it starts behaving differently, and act on it - safely.

Why it matters

Agents fail quietly. A model update, a prompt tweak, or a shifting workload can change how an agent behaves, which tools it reaches for, how much it spends, how often it errors, and long before anything throws an exception. DriftWatch makes that behavior visible, tells you when it changes enough to care, and can step in before a quiet regression becomes an incident or a bill.

Start here

Two ways in:

  • Add the SDK to your agent@driftwatch/sdk is DriftWatch's main SDK. Install it, pass it your model and tools, and the agent traces itself, detects drift, and enforces guardrails.
  • Run the reference server — try the whole system with Docker in minutes: the /run and /drift endpoints, Autopilot, and the console.

Guides

GuideWhat it covers
How it worksThe big picture — request flow, what gets traced, and the perceive → reason → act loop.
SDK@driftwatch/sdk — add observability, drift detection, and guardrails to your own AI SDK agent.
ServerThe ready-to-run HTTP service — endpoints, model client, and your own tools.
SigNoz & OpenTelemetryConnect SigNoz (Cloud or self-hosted), what to look at, and the signals DriftWatch emits.
Alerts & ActionsAutopilot — policies, Slack/Telegram/webhook channels, and the approval flow.
ConsoleThe operator console — health, drift feed, approvals, audit log.
ConfigurationEvery environment variable and typed config field.
DeploymentProduction Docker, compose, Redis, and the go-live checklist.
SecurityAuth, rate limiting, webhook signatures, and payload capture.

The packages

PackageWhat it is
@driftwatch/sdkThe product. Telemetry, drift detection, inline guardrails, the pure policy engine, and the full Autopilot orchestration engine (ApprovalService, AutopilotScheduler, MemoryStateStore, executeControlAction) — all pure, no provider SDKs bundled. RedisStateStore lives at the isolated @driftwatch/sdk/redis subpath with ioredis as an optional peer dependency. Use it standalone in your own agent.
@driftwatch/autopilotConcrete Slack, Telegram, and generic-webhook Notifier implementations, plus framework-agnostic inbound-webhook signature verification. A companion to the SDK — bring it in only if you use those channels.
@driftwatch/serverThe reference Fastify service built on @driftwatch/sdk and @driftwatch/autopilot: the /run and /drift endpoints, the control-plane API, and shared state wiring. Deploy this to try DriftWatch immediately, or use it as a blueprint for your own service.
@driftwatch/consoleThe operator web console (approvals, drift feed, action log, health). Served by the server at /console/.

On this page