A self-observing AI agent SDK
Know when your agent starts behaving differently.
DriftWatch traces every tool call and model step as OpenTelemetry, runs a model over that telemetry to detect behavioral drift, and closes the loop with a policy-driven autopilot to notify, pause, rollback, or throttle with a human in the loop for anything destructive.
npm install @driftwatch/sdk ai zodnpm install @ai-sdk/openai # or any AI SDK provider you already useimport { runAgentTask } from '@driftwatch/sdk';import { openai } from '@ai-sdk/openai';import { tool } from 'ai';import { z } from 'zod';const tools = { get_repo: tool({ description: 'Get public information about a GitHub repository', inputSchema: z.object({ owner: z.string(), repo: z.string() }), execute: async ({ owner, repo }) => { const res = await fetch(`https://api.github.com/repos/${owner}/${repo}`); const data = await res.json(); return { stars: data.stargazers_count, language: data.language }; }, }),};const result = await runAgentTask({ prompt: 'How many stars does vercel/next.js have?', modelClient: openai('gpt-4o-mini'), tools,});console.log(result.responseText);// → "vercel/next.js has 129,304 stars."// Add bootstrapTelemetry (a one-line preload) to send this to SigNoz.// Full walkthrough: /docs/sdkThe packages
@driftwatch/sdkThe productTelemetry, drift detection, guardrails, and the full Autopilot orchestration engine. Zero provider SDKs, zero required dependencies.
@driftwatch/autopilotCompanionConcrete Slack, Telegram, and webhook notifiers, plus inbound-webhook verification. Bring it in only if you use those channels.
@driftwatch/serverReferenceA ready-to-run Fastify service built on @driftwatch/sdk and @driftwatch/autopilot - the fastest way to see DriftWatch working.
@driftwatch/consoleReferenceThe operator web console for the reference server: approvals, drift feed, action log, agent health.