Xpersona
L

LLM Regression Monitor

CLAWHUB · Unverified

Use this skill when the user wants to monitor LLM behavior over time and get alerted when outputs change unexpectedly. Triggers on requests like "set up LLM regression monitoring", "alert me when my prompts start behaving differently", "watch my LLM for regressions", "run behavioral tests on my AI outputs on a schedule", or "detect when my model starts drifting". Handles first-time setup, baseline capture, scheduled monitoring, and alert configuration via WhatsApp, Slack, Discord, or email.

62
Rank
84
Safety
956
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 956 downloads reported by the source. Last updated 10/12/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1728mq7ycvwbh6tsa4zw19jk983qb9f:llm-regression-monitor
  1. Install using `clawhub skill install s1728mq7ycvwbh6tsa4zw19jk983qb9f:llm-regression-monitor` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/swanand33/llm-regression-monitor before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-swanand33-llm-regression-monitor/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

67,750 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: llm-regression-monitor
description: Use this skill when the user wants to monitor LLM behavior over time and get alerted when outputs change unexpectedly. Triggers on requests like "set up LLM regression monitoring", "alert me when my prompts start behaving differently", "watch my LLM for regressions", "run behavioral tests on my AI outputs on a schedule", or "detect when my model starts drifting". Handles first-time setup, baseline capture, scheduled monitoring, and alert configuration via WhatsApp, Slack, Discord, or email.
metadata:
  {
    "openclaw":
      {
        "emoji": "🔍",
        "optionalEnv":
          [
            "OPENAI_API_KEY",
            "ANTHROPIC_API_KEY",
            "OLLAMA_BASE_URL",
            "CUSTOM_LLM_BASE_URL",
            "CUSTOM_LLM_API_KEY",
            "ALERT_WHATSAPP_TO",
            "ALERT_SLACK_WEBHOOK",
            "ALERT_DISCORD_WEBHOOK",
            "ALERT_EMAIL_TO",
            "ALERT_EMAIL_FROM",
            "ALERT_EMAIL_PASSWORD",
            "ALERT_EMAIL_SMTP",
            "ALERT_EMAIL_PORT",
          ],
        "primaryEnv": "OPENAI_API_KEY",
      },
  }
---

# LLM Regression Monitor

## Overview

Automated behavioral regression monitoring for LLM apps. Captures baseline outputs, detects drift on a schedule, and fires WhatsApp or Slack alerts the moment something regresses.

---

## Workflow Decision Tree

```
User request
├── "set up monitoring" / first time    → Full Setup (steps 1–5)
├── "run the monitor now"               → Step 4 only
├── "I changed my prompt/model"         → Step 3b (update baseline)
└── "configure alerts"                  → Step 5
```

---

## Step 1 — Install

```bash
pip install llm-behave[semantic] pyyaml requests python-dotenv
```

---

## Step 2 — Create test_suite.yaml

Create in the project root. Minimal example:

```yaml
tests:
  - name: support_response
    prompt: "A customer says they never received their order. How do you respond?"
    provider: openai        # openai | anthropic | ollama | custom
    model: gpt-4o-mini
    assertions:
      - type: tone
        expected: "empathetic"
    drift:
      enabled: true
      threshold: 0.80
```

Set the API key for the chosen provider:
```bash
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...   # if using anthropic
# ollama needs no key
```

Read `references/test-suite-format.md` for the full field spec.
Read `references/providers.md` for env vars and Ollama setup.

---

## Step 3 — Capture Baselines

```bash
python scripts/capture_baseline.py
```

Saves ground-truth outputs to `.llm_behave_baselines/`. Run once before monitoring begins.

For more reliable baselines on important tests, set `baseline_samples: 3` in `test_suite.yaml` — the script will call the LLM 3 times and save the most representative response, eliminating outliers.

To test real production behavior, add a `system_prompt` field to your test — it gets sent to the LLM exactly as in your app.

### 3b — Update after intentio

_meta.json

{
  "ownerId": "kn780zyqkn6gyw5nz4n6w1qrxx83qt4a",
  "slug": "llm-regression-monitor",
  "version": "1.1.0",
  "publishedAt": 1788323220658
}

references/providers.md

# Providers — Setup Guide

This reference covers how to configure each LLM provider for use in `test_suite.yaml`.

---

## OpenAI

**Provider value in test_suite.yaml:** `openai`

### Required env var
```bash
export OPENAI_API_KEY=sk-...
```

### Supported models
| Model | Notes |
|---|---|
| `gpt-4o` | Most capable, higher cost |
| `gpt-4o-mini` | Recommended for monitoring (fast, cheap, reliable) |
| `gpt-3.5-turbo` | Legacy, available on older accounts |

### Verify setup
```bash
python -c "import llm_behave; p = llm_behave.get_provider('openai'); print(p.complete('Say hello'))"
```

---

## Anthropic

**Provider value in test_suite.yaml:** `anthropic`

### Required env var
```bash
export ANTHROPIC_API_KEY=sk-ant-...
```

### Supported models
| Model | Notes |
|---|---|
| `claude-opus-4-6` | Most capable |
| `claude-sonnet-4-6` | Balanced capability and cost |
| `claude-haiku-4-5` | Recommended for monitoring (fastest, cheapest) |

### Verify setup
```bash
python -c "import llm_behave; p = llm_behave.get_provider('anthropic'); print(p.complete('Say hello'))"
```

---

## Ollama (Local)

**Provider value in test_suite.yaml:** `ollama`

No API key required. Ollama runs locally on your machine.

### Setup
1. Install Ollama: https://ollama.com
2. Pull the model you want to test:
   ```bash
   ollama pull llama3
   ollama pull mistral
   ollama pull phi3
   ```
3. Confirm Ollama is running:
   ```bash
   ollama list
   ```

### Supported models
Any model available via `ollama list`. Common choices:

| Model | Notes |
|---|---|
| `llama3` | General purpose, good baseline |
| `mistral` | Strong at instruction following |
| `phi3` | Lightweight, fast on CPU |

### Default Ollama URL
`http://localhost:11434` — the scripts use this automatically. No configuration needed unless you changed the Ollama port.

### Override the URL (optional)
```bash
export OLLAMA_BASE_URL=http://localhost:11434
```

### Verify setup
```bash
python -c "import llm_behave; p = llm_behave.get_provider('ollama'); print(p.complete('Say hello', model='llama3'))"
```

---

## Custom Provider

**Provider value in test_suite.yaml:** `custom`

Use this when you have an internal LLM endpoint or a provider not natively supported by `llm-behave`.

### Required env vars
```bash
export CUSTOM_LLM_BASE_URL=https://your-internal-llm.example.com/v1
export CUSTOM_LLM_API_KEY=your-key-here    # omit if your endpoint has no auth
```

### Expected API format
The custom provider adapter expects an OpenAI-compatible `/chat/completions` endpoint. If your endpoint uses a different format, you will need to write a thin adapter — see the `llm-behave` documentation for the `BaseProvider` interface.

### Verify setup
```bash
python -c "import llm_behave; p = llm_behave.get_provider('custom'); print(p.complete('Say hello', model='your-model-name'))"
```

---

## Using Multiple Providers in One Suite

You can mix providers freely in a single `test_suite.yaml`. Each test specifies its own `provider` and `mo

references/test-suite-format.md

# test_suite.yaml — Field Reference

This file defines all the behavioral tests that `run_monitor.py` will execute on a schedule.
Place it in your project root (same directory where you run the scripts).

---

## Top-Level Structure

```yaml
tests:
  - name: <string>           # required
    prompt: <string>         # required
    provider: <string>       # required
    model: <string>          # required
    assertions:              # optional
      - type: <string>
        ...
    drift:                   # optional
      enabled: <bool>
      threshold: <float>
```

---

## Field Reference

### `name`
- **Type:** string
- **Required:** yes
- **Description:** Unique identifier for this test. Used as the baseline filename in `.llm_behave_baselines/`. Must be unique across the suite.
- **Example:** `refund_flow`, `json_output`, `safety_guardrail`

---

### `system_prompt`
- **Type:** string
- **Required:** no
- **Description:** An optional system prompt sent to the LLM before the user message. Use this to replicate the exact conditions of your production app. If omitted, only the user message is sent.
- **Example:**
  ```yaml
  system_prompt: "You are a friendly customer support agent for AcmeCo. Always be empathetic."
  ```

---

### `prompt`
- **Type:** string
- **Required:** yes
- **Description:** The exact input sent to the LLM. Multi-line prompts are supported using YAML block scalar syntax (`|`).
- **Example:**
  ```yaml
  prompt: "A customer says they never received their order. How do you respond?"
  ```
  Multi-line:
  ```yaml
  prompt: |
    You are a helpful support agent.
    A customer says they never received their order. Respond empathetically.
  ```

---

### `provider`
- **Type:** string
- **Required:** yes
- **Supported values:** `openai`, `anthropic`, `ollama`, `custom`
- **Description:** Which LLM provider to call. See `references/providers.md` for env var setup.

---

### `model`
- **Type:** string
- **Required:** yes
- **Description:** Model name string as accepted by the provider's API.
- **Examples by provider:**
  - `openai`: `gpt-4o`, `gpt-4o-mini`, `gpt-3.5-turbo`
  - `anthropic`: `claude-opus-4-6`, `claude-sonnet-4-6`, `claude-haiku-4-5`
  - `ollama`: `llama3`, `mistral`, `phi3`

---

### `baseline_samples`
- **Type:** integer
- **Required:** no
- **Default:** `1`
- **Description:** How many LLM responses to collect when capturing the baseline. If greater than 1, `capture_baseline.py` calls the LLM N times and saves the most representative (median) response. This eliminates outlier baselines caused by LLM non-determinism. Recommended: `3` for important tests.
- **Example:**
  ```yaml
  baseline_samples: 3
  ```

---

### `assertions`
- **Type:** list of assertion objects
- **Required:** no
- **Description:** Behavioral checks run against the LLM output. Each assertion has a `type` and type-specific fields. All run independently; any failure counts against the test.

#### Assertion types

**`mentions`** — output must se

skill-card.md

## Description:

Use this skill when the user wants to monitor LLM behavior over time and get alerted when outputs change unexpectedly.

This skill is ready for commercial/non-commercial use.

## Publisher:

[swanand33](https://clawhub.ai/user/swanand33)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineers use this skill to set up scheduled behavioral regression checks for LLM applications, capture baseline outputs, detect drift, and configure alerts when monitored prompts change unexpectedly.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Crafted test names may cause baseline cleanup to delete JSON files outside the intended baseline folder.

Mitigation: Use only trusted test_suite.yaml files, keep test names simple, run the skill with a low-privilege account, and execute it in a dedicated virtual environment or container.

Risk: Prompts, system prompts, outputs, and alert text may be sent to configured model providers and alert channels.

Mitigation: Do not include secrets, regulated data, or sensitive production prompts unless sharing that data with the selected provider and alert destinations is acceptable.

Risk: Unpinned dependencies, webhooks, email settings, and scheduled runs can change runtime behavior or expose alert data.

Mitigation: Pin dependencies before production use and review webhook URLs, email configuration, and scheduled command settings before enabling monitoring.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/swanand33/skills/llm-regression-monitor)
- [Provider Setup Guide](references/providers.md)
- [test_suite.yaml Field Reference](references/test-suite-format.md)

## Skill Output:

**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]

**Output Format:** [Markdown guidance with YAML configuration examples and shell command snippets]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [The skill guides creation of test_suite.yaml, baseline files, monitor_report.json, monitor_trend.jsonl, trend_warnings.json, and alert configuration.]

## Skill Version(s):

1.1.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to LLM Regression Monitor and adjacent AI workflows.