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 Downloads 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.

In Production

watchdog-ai monitors our own autonomous trading system 24/7:

  • 3 trading bots — FR/GOV/Grid strategies with live capital
  • 5 AI daemons — evolution engine, content engine, signal collectors
  • 129 downloads/month on PyPI

Every feature exists because we needed it first.

Featured / In the Wild

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.2.tar.gz (21.5 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.2-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: watchdog_ai-0.1.2.tar.gz
  • Upload date:
  • Size: 21.5 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.2.tar.gz
Algorithm Hash digest
SHA256 9b0505c0786d7c12c536802bacd5d29c76cea3e2457fac8a6f904a92a3eca8f6
MD5 d1f056656fd701801445d8071c83dabc
BLAKE2b-256 7c987180280df4275f11eba516e4c1a67c44d5956ea1c0bb3871747e5c086151

See more details on using hashes here.

File details

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

File metadata

  • Download URL: watchdog_ai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e880f8da5718bb31a6ba1a4141c4f544e01bec115497168e3e36ea9942ebf9d2
MD5 9995f8000ec3fde4a2e3ef3cf03de813
BLAKE2b-256 b45d87c8b89e975a837354745cec2449c0bb34c39dc59acad94120a220c0e6d5

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