Edison Watch

Insights Webhooks

Configure webhooks to receive automated security insights and anomaly alerts.

Edison Watch can automatically detect anomalies and security patterns in agent activity and push these insights to external webhook endpoints.

What Are Insights?

Insights are automated security findings generated by Edison Watch's detector plugins:

DetectorDescription
Loop DetectionIdentifies agents stuck in repetitive patterns
External Write DetectionFlags unusual spikes in external write operations
MCP DissatisfactionDetects sessions with high tool call failure rates

Configuration

Insights webhooks are configured via the insights_config.json file in your Edison Watch config directory.

Configuration File Location

The config file is located at:

  • Linux/macOS: ~/.config/edison-watch/insights_config.json
  • Windows: %APPDATA%\edison-watch\insights_config.json

Configuration Options

{
  "lookback_hours": 24,
  "detectors": {
    "loop": {
      "enabled": true,
      "window_minutes": 30,
      "min_repeats": 4,
      "max_sessions": 200,
      "max_attempts_per_session": 25
    },
    "external_write": {
      "enabled": true,
      "max_daily_writes": 5,
      "spike_ratio": 2.5
    },
    "mcp_dissatisfaction": {
      "enabled": true,
      "min_calls": 5,
      "failure_ratio": 0.6
    }
  },
  "ranker": {
    "max_results": 3,
    "dedupe_by_actor": true,
    "dedupe_by_detector": false
  },
  "publisher": {
    "enabled": true,
    "dump_path": null,
    "webhook_urls": [
      "https://your-webhook.example.com/insights"
    ]
  }
}

Publisher Settings

FieldDescriptionDefault
enabledEnable or disable insight publishingtrue
dump_pathLocal file path to write insights (null for default)~/.config/edison-watch/insights.log
webhook_urlsArray of HTTP/HTTPS URLs to send insights to[]

Webhook Payload Format

When insights are detected, they are sent as a POST request to each configured webhook URL:

{
  "source": "edison-watch",
  "event_type": "insights",
  "count": 2,
  "insights": [
    {
      "detector_slug": "loop_detection",
      "title": "Agent stuck in loop",
      "summary": "Agent 'code-assistant' repeated the same action 5 times",
      "severity": "high",
      "score": 0.85,
      "actor": "[email protected]",
      "session_id": "abc-123",
      "created_at": "2026-01-19T10:30:00.000Z",
      "recommended_action": "Review agent configuration and constraints",
      "evidence": {
        "repeated_tool": "filesystem.write_file",
        "repeat_count": 5
      }
    }
  ]
}

Insight Fields

FieldDescription
detector_slugIdentifier for the detector that generated the insight
titleHuman-readable title for the insight
summaryDetailed description of what was detected
severitySeverity level: low, medium, high, critical
scoreConfidence score between 0 and 1
actorUser or agent that triggered the insight
session_idAssociated session ID
created_atISO 8601 timestamp when the insight was generated
recommended_actionSuggested remediation steps
evidenceAdditional context and data specific to the detector

Running the Insight Detector

Insights are generated by running the insight detector:

# Run once with default settings
python -m src.insights.runner
 
# Override lookback window
python -m src.insights.runner --lookback-hours 48
 
# For multi-tenant deployments
python -m src.insights.runner --tenant-id acme-corp

For production deployments, schedule the detector to run periodically (e.g., via cron or a scheduled job).

Integration Examples

Slack Webhook

To send insights to Slack, use a Slack Incoming Webhook URL:

{
  "publisher": {
    "enabled": true,
    "webhook_urls": [
      "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK"
    ]
  }
}

You may need a middleware service to transform the Edison Watch payload into Slack's expected format.

PagerDuty

For PagerDuty integration, use the Events API v2 endpoint:

{
  "publisher": {
    "enabled": true,
    "webhook_urls": [
      "https://events.pagerduty.com/v2/enqueue"
    ]
  }
}

PagerDuty requires specific payload formatting. Consider using a webhook relay service or custom endpoint to transform the payload.

Troubleshooting

Webhooks Not Firing

  1. Check that publisher.enabled is true
  2. Verify webhook URLs are valid HTTP/HTTPS endpoints
  3. Check Edison Watch logs for webhook dispatch errors
  4. Ensure the endpoint is reachable from your Edison Watch server

No Insights Generated

  1. Verify detectors are enabled in the config
  2. Check that there is sufficient session data (lookback window)
  3. Adjust detector thresholds if they're too strict

Need help configuring insights webhooks? Email [email protected].

On this page