Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

1.6 KB
Raw Blame
import type { AiPromptId } from './ai-prompts.data'

export const monitoringAgents = {
  health: {
    id: 'health',
    name: 'Health',
    promptId: 'monitoring-agent-health' as AiPromptId,
    schedule: {
      cadence: 'once per hour',
      intervalMinutes: 60,
      scheduled: 'Run it once per hour on a schedule.',
      onDemand:
        'Run it on demand after a deployment, or whenever you need a health check outside that interval.',
    },
  },
  security: {
    id: 'security',
    name: 'Security',
    promptId: 'monitoring-agent-security' as AiPromptId,
    schedule: {
      cadence: 'once per day',
      intervalMinutes: 1440,
      scheduled: 'Run it once per day on a schedule.',
      onDemand: 'Run it on demand after you change Auth, RLS, or other access controls.',
    },
  },
  performance: {
    id: 'performance',
    name: 'Performance',
    promptId: 'monitoring-agent-performance' as AiPromptId,
    schedule: {
      cadence: 'once per hour',
      intervalMinutes: 60,
      scheduled: 'Run it once per hour on a schedule.',
      onDemand: 'Run it on demand after a latency regression or a schema change.',
    },
  },
  usage: {
    id: 'usage',
    name: 'Resources',
    promptId: 'monitoring-agent-usage' as AiPromptId,
    schedule: {
      cadence: 'once each morning',
      intervalMinutes: 1440,
      scheduled: 'Run it once per day on a schedule.',
      onDemand: 'Run it on demand after an unexpected traffic change.',
    },
  },
} as const

export type MonitoringAgentId = keyof typeof monitoringAgents
export type MonitoringAgent = (typeof monitoringAgents)[MonitoringAgentId]