Skip to main content

Reports

Generate AI-powered executive briefs and compliance reports with automated scheduling and distribution.

Overview

The Executive Brief system provides automated security summaries, threat analysis, and actionable recommendations for stakeholders.

Source: ow-ai-backend/routes/executive_brief_routes.py (SEC-065)

Compliance: SOC 2 AU-6, SOC 2 AU-7, NIST AU-6, PCI-DSS 10.6

Executive Briefs

Brief Contents

Each executive brief includes:

SectionDescription
SummaryHigh-level threat overview
Key MetricsThreats detected, prevented, cost savings
RecommendationsPrioritized action items
Risk AssessmentOverall security posture
Distribution ListRecipients

Brief Response Structure

{
"brief_id": "brief_20250115_a1b2c3",
"generated_at": "2025-01-15T10:00:00Z",
"generated_by": "admin@company.com",
"expires_at": "2025-01-16T10:00:00Z",
"time_period": "24h",
"alert_count": 47,
"high_priority_count": 12,
"critical_count": 3,
"summary": "Security posture remains strong with 47 alerts processed...",
"key_metrics": {
"threats_detected": 47,
"threats_prevented": 44,
"cost_savings": "$150,000",
"system_accuracy": "93.6%"
},
"recommendations": [
{
"priority": "high",
"action": "Review elevated database access patterns",
"timeframe": "24 hours",
"owner": "Security Team"
}
],
"risk_assessment": "MEDIUM",
"generation_method": "ai_generated",
"is_current": true,
"version": 1
}

Getting Latest Brief

Retrieve the current cached executive brief:

curl https://pilot.owkai.app/api/executive-briefs/latest \
-H "Authorization: Bearer owkai_your_api_key"

Performance: <100ms (indexed query)

Behavior

  1. Returns cached brief if valid
  2. If no cached brief exists, generates new one
  3. Records view in audit trail

Regenerating Briefs

Force regeneration with fresh data:

curl -X POST https://pilot.owkai.app/api/executive-briefs/regenerate \
-H "Authorization: Bearer owkai_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"time_period": "24h",
"force": false
}'

Time Periods

PeriodDescription
24hLast 24 hours
7dLast 7 days
30dLast 30 days
90dLast 90 days

Rate Limiting

  • Cooldown: 5 minutes between regenerations
  • Force: Admin-only bypass for cooldown

Checking Cooldown

Before regenerating, check if allowed:

curl https://pilot.owkai.app/api/executive-briefs/cooldown \
-H "Authorization: Bearer owkai_your_api_key"

Response:

{
"can_regenerate": true,
"seconds_remaining": 0,
"message": "Regeneration available"
}

Or if rate limited:

{
"can_regenerate": false,
"seconds_remaining": 180,
"message": "Please wait 180 seconds before regenerating"
}

Brief History

Retrieve historical briefs for audit purposes:

curl "https://pilot.owkai.app/api/executive-briefs/history?limit=10&offset=0" \
-H "Authorization: Bearer owkai_your_api_key"

Response:

{
"briefs": [
{
"brief_id": "brief_20250115_a1b2c3",
"generated_at": "2025-01-15T10:00:00Z",
"time_period": "24h",
"alert_count": 47,
"is_current": true
},
{
"brief_id": "brief_20250114_d4e5f6",
"generated_at": "2025-01-14T10:00:00Z",
"time_period": "24h",
"alert_count": 52,
"is_current": false
}
],
"total": 2,
"limit": 10,
"offset": 0
}

Getting Specific Brief

Retrieve a brief by ID:

curl https://pilot.owkai.app/api/executive-briefs/{brief_id} \
-H "Authorization: Bearer owkai_your_api_key"

Use for:

  • Viewing historical briefs
  • Sharing specific briefings
  • Audit record access

Key Metrics (SEC-066)

All briefs use the Unified Metrics Engine for consistent calculations:

Threat Metrics

MetricDescriptionCalculation
threats_detectedTotal alerts in periodCOUNT(alerts)
threats_preventedAcknowledged alertsCOUNT(acknowledged)
threats_pendingUnacknowledged alertsCOUNT(pending)

Financial Metrics

MetricDescriptionFormula
cost_savingsEstimated savingsthreats_prevented × $50,000

Performance Metrics

MetricDescriptionFormula
accuracy_rateResolution rate(acknowledged / total) × 100
false_positive_rateDismissed alerts(dismissed / total) × 100

Recommendations

Briefs include prioritized recommendations:

Recommendation Structure

{
"priority": "high",
"action": "Review elevated database access patterns",
"timeframe": "24 hours",
"owner": "Security Team"
}

Priority Levels

PriorityResponse TimeDescription
CriticalImmediateActive threat requiring response
High< 24 hoursElevated risk needing attention
Medium< 7 daysShould be addressed soon
LowAs scheduledMonitor and review

Risk Assessment

Overall security posture evaluation:

LevelScore RangeDescription
Critical80-100Immediate action required
High60-79Elevated risk
Medium40-59Moderate risk
Low0-39Acceptable risk

Brief Metadata

Each brief includes metadata for audit:

FieldDescription
organization_idMulti-tenant isolation
has_activityWhether org has alerts
llm_modelAI model used
generation_time_msGeneration duration

API Reference

EndpointMethodDescription
/api/executive-briefs/latestGETGet latest brief
/api/executive-briefs/regeneratePOSTRegenerate brief
/api/executive-briefs/cooldownGETCheck cooldown
/api/executive-briefs/historyGETGet brief history
/api/executive-briefs/{id}GETGet specific brief
/api/executive-briefs/generatePOSTLegacy endpoint

Source: ow-ai-backend/routes/executive_brief_routes.py

Scheduled Reports

Creating a Report Schedule

curl -X POST https://pilot.owkai.app/api/users/reports/scheduled \
-H "Authorization: Bearer owkai_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Weekly Executive Summary",
"report_type": "executive_dashboard",
"schedule": "0 9 * * 1",
"format": "pdf",
"recipients": ["exec@company.com"],
"enabled": true
}'

Report Types

TypeDescription
executive_dashboardHigh-level KPIs and trends
risk_analysisDetailed risk breakdown
compliance_summaryCompliance scores and gaps
agent_performancePer-agent metrics
audit_summaryAudit log summary

Schedule Format (Cron)

0 9 * * 1  = Every Monday at 9 AM
0 9 * * * = Every day at 9 AM
0 9 1 * * = First of month at 9 AM

Best Practices

  1. Generate daily briefs: Keep stakeholders informed
  2. Review recommendations: Prioritize by urgency
  3. Track history: Maintain audit compliance
  4. Distribute appropriately: Use distribution list feature
  5. Monitor cost savings: Demonstrate ROI

Troubleshooting

Brief generation failing

Solution: Check organization has alert data; empty state returns minimal brief.

Rate limit errors (429)

Solution: Wait for cooldown period; check /cooldown endpoint.

Metrics showing zero

Solution: Verify alerts exist in time period; check organization_id filtering.

Brief not updating

Solution: Use /regenerate endpoint to force refresh.


Source: executive_brief_routes.py, executive_brief_service.py