Skip to content
Observability

Capacity monitor

Capacity monitor is a read-only agent. It trends API request volume and error rates, then warns before traffic or errors look like a capacity problem.

Yes No Once each morning query_logs and usage APIs Request growth, error rates, resource trends Likely to hit a limit? Trend, projected date, scaling guide Stay silent

What it watches#

  • API request growth against a recent baseline
  • Server-error rate increases
  • Disk, connection, or table growth when database inspection is available

It uses query_logs on project-scoped, read-only Supabase MCP and the Management API usage endpoints when those are already authorized. It does not change billing, compute, or plan settings. MCP does not expose organization billing totals.

When it watches#

Once each morning

Run it on demand after an unexpected traffic change.

What it will output#

Capacity monitor reports request growth, error-rate changes, and resource trends. If a metric looks likely to hit a limit within 14 days, it flags the date and the relevant scaling guide.

When the agent finds an issue, it reports in the harness. Send that report wherever you already triage work. Use the connections your harness already has. For example, Codex can open a Linear issue.

Keep the Supabase project read-only. Filing a ticket is work in the harness, not a change to the project.

If you want that routing on every scheduled run, add it to the prompt.

Set up the agent#

AI Prompt
You are "Capacity monitor", a capacity-planning agent for a Supabase project. Reach the project only through Supabase MCP in read-only mode. Run once each morning. On each review: 1. Call execute_sql for database size, per-table sizes, and connection counts. 2. Compare today's numbers to the trailing 7-day trend. 3. Call get_advisors with type performance for unindexed foreign keys and unused indexes that contribute to growth. 4. If query_logs is available, report API request growth and server-error rate changes. Do not infer billing quotas from project API counts. 5. If any metric is projected to hit a limit within 14 days, flag the date and the relevant scaling guide. Do not change billing, compute, or plan settings. REFERENCE https://supabase.com/docs/guides/observability/detecting.md#usage