AI Insights API

The AI insights API provides statistical anomaly detection, time-series forecasting, AI-generated action suggestions, and meeting summary capabilities. All procedures require organization-level authentication (orgProcedure).

aiInsights.detectAnomalies

Run anomaly detection on a KPI’s time series data using Z-score analysis with exponential weighted moving average.

Input Schema:

{
  kpiId: string;           // KPI definition ID
  windowSize?: number;     // Rolling window size (default: 30)
  threshold?: number;      // Z-score threshold (default: 2.5)
  startDate?: string;      // ISO date for analysis start
  endDate?: string;        // ISO date for analysis end
}

Output:

Array<{
  id: string;
  kpiId: string;
  timestamp: Date;
  value: number;
  expectedValue: number;
  deviation: number;          // Standard deviations from mean
  severity: "low" | "medium" | "high";
  acknowledged: boolean;
}>

aiInsights.getAnomalies

List previously detected anomalies for a KPI with pagination.

Input Schema:

{
  kpiId: string;
  page?: number;
  limit?: number;
  severity?: "low" | "medium" | "high";
  acknowledged?: boolean;
}

aiInsights.acknowledgeAnomaly

Mark an anomaly as acknowledged by the current user.

Input Schema:

{
  anomalyId: string;
  notes?: string;      // Optional acknowledgment notes
}

aiInsights.getForecast

Get time-series forecast for a KPI showing predicted values with confidence intervals.

Input Schema:

{
  kpiId: string;
  horizonDays?: number;   // Forecast horizon (default: 30)
}

Output:

{
  predictions: Array<{
    date: string;
    value: number;
    lowerBound: number;
    upperBound: number;
    confidence: number;    // 0-1 confidence score
  }>;
}

aiInsights.getSuggestions

Get AI-generated action suggestions based on anomaly patterns and historical resolution data.

Input Schema:

{
  boardId?: string;       // Scope to specific board
  limit?: number;         // Max suggestions (default: 5)
}

aiInsights.acceptSuggestion

Convert an AI suggestion into an action item.

Input Schema:

{
  suggestionId: string;
  boardId: string;        // Target board for the action
}

Output: Returns the created action item.

aiInsights.generateMeetingSummary

Generate an AI summary for a completed TIER meeting.

Input Schema:

{
  meetingId: string;
}

Output:

{
  summary: string;           // Structured meeting summary
  decisions: string[];       // Key decisions made
  actionItems: string[];     // Action items identified
  keyMetrics: Array<{ name: string; value: string; status: string }>;
}

Permissions

ProcedureRequired Role
aiInsights.detectAnomaliesAny authenticated member
aiInsights.getAnomaliesAny authenticated member
aiInsights.acknowledgeAnomalyAny authenticated member
aiInsights.getForecastAny authenticated member
aiInsights.getSuggestionsAny authenticated member
aiInsights.acceptSuggestionAny authenticated member
aiInsights.generateMeetingSummaryAny authenticated member