From 4730e3a640ca7e037e04549f7d961a75b7f3856d Mon Sep 17 00:00:00 2001
From: Steven Eubank <47563310+smeubank@users.noreply.github.com>
Date: Wed, 23 Sep 2026 15:31:35 +0200
Subject: [PATCH] docs: remove Generalist monitoring agent (#50784)
The Generalist is too broad and doesn't do any one thing well. Removing
it to focus on dogfooding the four targeted agents (Health, Security,
Performance, Capacity) before revisiting a combined agent.
https://github.com/supabase/supabase/pull/50396 new PR since this one
became messy with many upstream changes
## Problem
I don't like the generalist
## Solution
I am removing the generalist
## Review instructions
Simply removing generalist:
https://supabase.com/docs/guides/observability/automate-with-agents
So generalist will be no mas
## Checklist
Check all before review:
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which references
[WORD_LIST](https://github.com/supabase/supabase/blob/master/apps/docs/WORD_LIST.md)
and the docs
[CONTRIBUTING](https://github.com/supabase/supabase/blob/master/apps/docs/CONTRIBUTING.md)
guide
## Summary by CodeRabbit
* **Documentation**
* Removed the combined Generalist monitoring guide and its navigation
entry. Separate guides for health, security, performance, and usage
monitoring remain.
* The Generalist agent card and combined monitoring prompt are no longer
available.
Co-authored-by: Claude Sonnet 4.6
---
.../NavigationMenu.constants.ts | 1 -
.../automate-with-agents/all.mdx | 40 ------
apps/docs/data/ai-prompts.data.ts | 125 ------------------
.../data/content-listings/telemetry.data.ts | 7 -
apps/docs/data/monitoring-agents.data.ts | 12 --
5 files changed, 185 deletions(-)
delete mode 100644 apps/docs/content/guides/observability/automate-with-agents/all.mdx
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 737385a7989..d45e0cd51bc 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -3096,7 +3096,6 @@ export const telemetry: NavMenuConstant = {
name: 'Hire an agent',
items: [
{ name: 'Set up an agent', url: '/guides/observability/automate-with-agents' },
- { name: 'Generalist', url: '/guides/observability/automate-with-agents/all' },
{ name: 'Health monitor', url: '/guides/observability/automate-with-agents/health' },
{ name: 'Security monitor', url: '/guides/observability/automate-with-agents/security' },
{
diff --git a/apps/docs/content/guides/observability/automate-with-agents/all.mdx b/apps/docs/content/guides/observability/automate-with-agents/all.mdx
deleted file mode 100644
index cca409477ee..00000000000
--- a/apps/docs/content/guides/observability/automate-with-agents/all.mdx
+++ /dev/null
@@ -1,40 +0,0 @@
----
-id: 'automate-with-agents-all'
-title: 'Generalist'
-subtitle: 'Generalist is a read-only daily agent. It runs all four checks — health, security, performance, and usage — and reports only findings that need attention.'
-description: 'A once-daily agent that checks all signal sources and reports across health, security, performance, and usage.'
----
-
-```mermaid
-flowchart TD
- Schedule([Once per day]) --> Health[query_logs: health]
- Schedule --> Security[get_advisors: security]
- Schedule --> Performance[get_advisors + pg_stat_activity]
- Schedule --> Usage[execute_sql: sizes and growth]
- Health & Security & Performance & Usage --> Filter{Anything to report?}
- Filter -->|Yes| Report[Daily summary]
- Filter -->|No| Silent[Stay silent]
-```
-
-## What it watches
-
-- **Health** — API 5xx, Auth failures, error-rate spikes in the last 24 hours
-- **Security** — Security Advisor findings, authorization failure spikes
-- **Performance** — slow queries, lock waits, Performance Advisor findings
-- **Usage** — database size, connection counts, API request growth, approaching limits
-
-It uses `query_logs`, `get_advisors`, and read-only `execute_sql` on project-scoped [Supabase MCP](/docs/guides/ai-tools/mcp). It does not change the project.
-
-## When it watches
-
-
-
-## What it will output
-
-Generalist reports only checks that turn up a finding. If health is clear, that section is omitted. If all checks are clear, the agent stays silent. When it does report, each section follows the same format as the specialist agent: a grouped finding, a likely cause, and a next step for a person to act on.
-
-<$Partial path="monitoring_agent_output.mdx" />
-
-## Set up the agent
-
-
diff --git a/apps/docs/data/ai-prompts.data.ts b/apps/docs/data/ai-prompts.data.ts
index fc2deeb96ff..e012e83c730 100644
--- a/apps/docs/data/ai-prompts.data.ts
+++ b/apps/docs/data/ai-prompts.data.ts
@@ -330,131 +330,6 @@ https://supabase.com/docs/guides/getting-started/quickstarts/vue.md`,
'monitoring-agent-security': createMonitoringPrompt('Security monitor', ['security']),
'monitoring-agent-performance': createMonitoringPrompt('Performance monitor', ['performance']),
'monitoring-agent-usage': createMonitoringPrompt('Capacity monitor', ['usage']),
- 'monitoring-agent-all': `You are "Generalist", a daily read-only agent for a Supabase project.
-
-TOOLS AVAILABLE
-- query_logs: query ClickHouse logs (edge_logs, auth_logs, postgres_logs,
- function_edge_logs, function_logs, storage_logs, realtime_logs, supavisor_logs)
-- get_advisors: pull Splinter lint findings (security and performance categories)
-- execute_sql: run read-only SQL against the live Postgres database
-If you are running inside Claude Code with the Supabase plugin or skills installed,
-those provide the same tools plus richer context from the local project.
-
-Reach the project only through Supabase MCP with read_only=true.
-Run once per day. Work through all four checks in order.
-
-HEALTH
-1. Call query_logs with this SQL to count errors across all log sources in 1-hour
- buckets over the last 24 hours:
-
- SELECT toStartOfHour(timestamp) AS hour,
- source,
- count() AS events
- FROM logs
- WHERE timestamp >= now() - interval 24 hour
- AND (
- (source = 'edge_logs'
- AND toInt32OrZero(log_attributes['response.status_code']) >= 500)
- OR (source = 'postgres_logs'
- AND log_attributes['parsed.error_severity'] IN ('ERROR', 'FATAL'))
- OR (source = 'auth_logs'
- AND event_message ILIKE '%failed%')
- )
- GROUP BY hour, source
- ORDER BY hour DESC, events DESC
-
- Declare an incident for any source/hour bucket with more than 20 events.
- For each incident, collect up to 5 example event_messages to identify the cause.
-
-SECURITY
-2. Call get_advisors with type=security. Collect ALL findings (error, warn, info).
- For each finding, include the documentation link from the MCP response if one
- is provided.
-3. Call query_logs for authorization and authentication failures in the last
- 24 hours. Group by status code or error code, not by user, email, or IP.
- Report a spike only when the count is at least twice the recent baseline
- and at least 20 events. Do not change policies, grants, or keys.
-
-PERFORMANCE
-4. Call get_advisors with type=performance. Collect ALL findings (error, warn, info).
- For each finding, include the documentation link from the MCP response if one
- is provided.
-5. Call execute_sql to find long-running or blocking sessions:
- SELECT pid, usename, state, now()-query_start AS duration, wait_event_type,
- left(query,120) AS query FROM pg_stat_activity
- WHERE state IN ('active','idle in transaction')
- AND now()-query_start > interval '30 seconds'
- AND pid <> pg_backend_pid() ORDER BY duration DESC LIMIT 10;
-6. Call execute_sql for cache hit rate. Flag any table below 0.99:
- SELECT relname, heap_blks_hit::float/(heap_blks_hit+heap_blks_read+1) AS hit_rate
- FROM pg_statio_user_tables ORDER BY hit_rate ASC LIMIT 10;
-
-USAGE
-7. Call execute_sql for database size, top 10 table sizes, and connection counts
- by role. Compare to the 7-day trend if earlier results are in context.
-8. Call query_logs to count edge_logs requests by path for the last 24 hours.
- Compare to the prior 24-hour window if available.
- Flag if growth looks likely to hit a limit within 14 days.
-
-OUTPUT FORMAT
-Produce a markdown report. Group advisor findings by severity (error, warn, info).
-Omit a section entirely if its checks found nothing to act on.
-If all checks are clear, output only: "All clear."
-
----
-
-## Daily report
-
-### Health
-**[source] — [hour]** · [N] errors
-Cause: [one sentence from example event_messages]
-Fix:
-\`\`\`sql
--- investigation or remediation query
-\`\`\`
-
-### Security
-**[finding title]** · [severity]
-Docs: [link from MCP response, if provided]
-Fix:
-\`\`\`sql
--- remediation SQL
-\`\`\`
-
-**[status/error code] spike** · [N] events (baseline: [N])
-Fix: [one sentence — e.g. check this RLS policy, rotate this key]
-
-### Performance
-**[advisor finding title]** · [severity]
-Docs: [link from MCP response, if provided]
-Fix:
-\`\`\`sql
--- remediation SQL
-\`\`\`
-
-**Session [pid]** · [duration] · [state] · role: [usename]
-Query: \`[excerpt]\`
-Fix — confirm it is safe to cancel, then run in SQL editor:
-\`\`\`sql
-SELECT pg_cancel_backend([pid]);
-\`\`\`
-
-**Cache hit rate: [table]** · [hit_rate]
-Fix: [one sentence — e.g. investigate sequential scans on this table]
-
-### Usage
-**[metric]**: [current] · 7-day trend: [direction]
-[If limit risk:] Projected to reach limit by [date].
-See: https://supabase.com/docs/guides/platform/compute-and-disk
-
----
-
-Do not suggest new features, schema changes unrelated to a detected issue,
-or improvements beyond fixing what you found. Only report detected problems
-and the specific SQL, CLI command, or Studio step to fix each one.
-
-REFERENCE
-https://supabase.com/docs/guides/observability/automate-with-agents/all.md`,
} as const
export type AiPromptId = keyof typeof aiPrompts
diff --git a/apps/docs/data/content-listings/telemetry.data.ts b/apps/docs/data/content-listings/telemetry.data.ts
index ba54cba9690..17da14aa0b9 100644
--- a/apps/docs/data/content-listings/telemetry.data.ts
+++ b/apps/docs/data/content-listings/telemetry.data.ts
@@ -76,13 +76,6 @@ export const telemetryHireAgent: ContentListingGroup = {
type: 'grid',
columns: 2,
items: [
- {
- title: 'Generalist',
- href: '/guides/observability/automate-with-agents/all',
- subtitle: getScheduleLabel(monitoringAgents.all),
- description:
- 'Run all four checks — health, security, performance, and capacity — in one daily pass.',
- },
{
title: monitoringAgents.health.name,
href: '/guides/observability/automate-with-agents/health',
diff --git a/apps/docs/data/monitoring-agents.data.ts b/apps/docs/data/monitoring-agents.data.ts
index ca7a6d2b84c..3f1f4d4a4cf 100644
--- a/apps/docs/data/monitoring-agents.data.ts
+++ b/apps/docs/data/monitoring-agents.data.ts
@@ -46,18 +46,6 @@ export const monitoringAgents = {
onDemand: 'Run it on demand after an unexpected traffic change.',
},
},
- all: {
- id: 'all',
- name: 'Generalist',
- promptId: 'monitoring-agent-all' as AiPromptId,
- schedule: {
- cadence: 'once per day',
- intervalMinutes: 1440,
- scheduled: 'Run it once per day at the start of your day or shift.',
- onDemand:
- 'Run it on demand after a deployment or whenever you want a full project health check.',
- },
- },
} as const
export type MonitoringAgentId = keyof typeof monitoringAgents