Skip to main content

Runtime verification for AI-built systems. Catch silent failures, contradictions, and stale data before they cost you.

Project description

watchdog-ai

PyPI version Python License: MIT

Runtime verification for AI-built systems. Catch silent failures, contradictions, and stale data before they cost you.

Your AI writes code fast. watchdog-ai checks if it's actually working.

The Problem

AI writes code fast. But bugs go undetected. APIs break silently. Bots trade against their own predictions. And nobody notices for days.

Code review tools catch bugs before merge. LLM observability tracks API calls. Nobody checks if the AI-built system is actually working correctly right now.

Install

pip install watchdog-ai

Quick Start

# Generate example config
wdog init

# Edit watchdog.yaml for your project, then:
wdog check

# Run continuously
wdog watch

What It Checks

Check Type What It Does Example
process Is your service running? Bot daemon crashed silently
freshness Is your data current? Database hasn't updated in 26h
log_scan Any errors in logs? 5 tracebacks in last 50 lines
assertion Is your data valid? Capital dropped below 50%
http Is your API healthy? Health endpoint returning 500
script Custom validation Your own check script

Example Config

project: my-trading-bot
interval: 5m

checks:
  - name: Bot is running
    type: process
    match: "python3 bot.py"
    severity: critical

  - name: Data is fresh
    type: freshness
    path: ./data/trades.json
    max_age: 2h

  - name: No crashes
    type: log_scan
    path: ./logs/bot.log
    patterns: ["traceback", "error"]
    threshold: 3
    severity: critical

  - name: Capital is safe
    type: assertion
    source: ./data/state.json
    conditions:
      - expr: "$.balance > 0"
        severity: critical
      - expr: "$.balance > $.initial * 0.5"
        message: "Balance below 50%!"

notify:
  - type: webhook
    url: ${SLACK_WEBHOOK_URL}
    on: [critical]

Commands

wdog init           # Generate example config
wdog check          # Run all checks once
wdog check --json   # Machine-readable output
wdog watch          # Run on schedule
wdog list           # List configured checks

Exit Codes

  • 0 — All healthy
  • 1 — Warnings present
  • 2 — Critical issues found

Works with CI/CD, cron, and monitoring systems.

Why Not Just Use...

Tool What It Does Gap watchdog-ai Fills
Datadog / Grafana Infrastructure metrics Doesn't check if your AI logic is correct
LangSmith / Helicone LLM API call tracing Doesn't verify the output is sane
Pre-commit / CI Catches bugs before merge Nothing runs after deploy
Cron + bash scripts Custom health checks No unified config, no severity levels, no alerting

watchdog-ai lives in the gap between "deployed" and "actually working."

Use Cases

  • Trading bots — Verify positions match predictions, capital stays above thresholds
  • Data pipelines — Catch stale files, broken scrapers, silent API failures
  • AI agents — Ensure outputs are fresh, processes are alive, logs are clean
  • Any automated system — If it runs unattended, it needs a watchdog

Born from Real Pain

This tool exists because:

  • Our stock bot traded LONG while predictions said DOWN — for days
  • Our exchange API broke silently and nobody noticed
  • A strategy looked great on 2 days of data but was a loser over 6 months

We built watchdog for ourselves first. Now it's yours.

Contributing

Issues and PRs welcome. See CONTRIBUTING.md if it exists, or just open an issue.

License

MIT

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

watchdog_ai-0.1.1.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

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

watchdog_ai-0.1.1-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file watchdog_ai-0.1.1.tar.gz.

File metadata

  • Download URL: watchdog_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.9

File hashes

Hashes for watchdog_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d81ee40eb2fa763355b8f768d9b52358b1b03b81592e027533341e5efad9261c
MD5 c8b527f8ac16d0340bcff4b2d0fde653
BLAKE2b-256 989f54d4861c6a50f71c3451ab87a4e5459873c252d3481799af30d829e41a4b

See more details on using hashes here.

File details

Details for the file watchdog_ai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: watchdog_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.9

File hashes

Hashes for watchdog_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b4d80635f9aa73ad0ce1407e7f630d85769c79ed6f3ea48e535523b0adafe60
MD5 1974a0f0c9072e37535cb0329c4d5f0d
BLAKE2b-256 d4a9a4b99d988ad736ade4f7f37632d7b046d3b7c252ecbc6c65c4270df7200a

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