Skip to main content
The Guard engine processes every security event through a linear 4-agent chain called the DARE pipeline: Detect, Analyze, Respond, Report. Each agent has a single responsibility and produces a typed output consumed by the next agent.

Pipeline Flow

If the DetectAgent returns null (no rules matched, no threat intel hit), the event is considered benign and skipped. Otherwise, the full pipeline executes.

DetectAgent

Source: packages/panguard-guard/src/agent/detect-agent.ts

Responsibilities

  1. ATR rule matching — runs the event against all loaded rules via the RuleEngine
  2. Threat intelligence lookup — checks source/destination IPs against 5 feed sources plus Threat Cloud blocklists (supports IPv4 and IPv6)
  3. Deduplication — skips identical detections within a 60-second window (max 500 entries in the dedup map)
  4. Event correlation — both legacy IP-based correlation (3+ events from same source IP in 5 minutes) and advanced pattern-based correlation via the EventCorrelator (7 attack patterns)

Internal State


AnalyzeAgent

Source: packages/panguard-guard/src/agent/analyze-agent.ts

Evidence Sources and Weights

The AnalyzeAgent collects evidence from multiple sources and calculates a weighted confidence score (0—100): Weight distribution adapts to available sources:

Feedback Loop

The AnalyzeAgent maintains a per-rule feedback history:
  • High false-positive rate — confidence reduced by up to 30%
  • High true-positive rate — confidence increased by up to 10%

Contradiction Detection

If a high-severity rule fires but the baseline shows no deviation, confidence is reduced by 10 points. This prevents over-alerting on events that match a rule pattern but are normal for the specific environment.

RespondAgent

Source: packages/panguard-guard/src/agent/respond-agent.ts

Confidence-Based Actions

Available Actions

Full details on safety rules and escalation are covered in Auto-Response.

ReportAgent

Source: packages/panguard-guard/src/agent/report-agent.ts

Responsibilities

  1. JSONL Logging — writes complete event records with log rotation (50 MB per file, 10 rotated files, 90-day retention)
  2. Baseline Updates — during learning mode, continuously updates the behavioral baseline with observed patterns
  3. Anonymization — IP addresses are /16-anonymized (last two octets zeroed) before Threat Cloud upload
  4. Summary Generation — produces daily (24h) and weekly (7d) summaries with top attack sources, action breakdown, and verdict distribution

Log Format

Each log entry is a JSON line containing: