<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Analyzing Phishing Trends and Metrics

## Agent Script

### Commands

| Command | Description |
|---|---|
| `node agent.js collect --gateway-log <csv> --siem-log <csv> --simulation-log <csv> --output <file>` | Aggregate metrics |
| `node agent.js calculate-kpis --metrics <json> --period <period>` | Calculate KPIs |
| `node agent.js compare-periods --metrics <json> --period1 <p1> --period2 <p2>` | Compare periods |
| `node agent.js trend-analysis --metrics <json> --dimension <dim> --window <window>` | Trend analysis |
| `node agent.js risk-score --metrics <json> --dimension <dim>` | Risk scoring |
| `node agent.js executive-report --metrics <json> --period <period> --output <file>` | Executive report |
| `node agent.js board-metrics --metrics <json>` | Board-level metrics |

### Examples

```bash
node agent.js collect --gateway-log /tmp/seg.csv --siem-log /tmp/siem.csv --simulation-log /tmp/gophish.csv --output /tmp/metrics.json
node agent.js calculate-kpis --metrics /tmp/metrics.json --period 2026-Q1
node agent.js executive-report --metrics /tmp/metrics.json --period 2026-Q1 --output /tmp/report.json
```
