OPERATIONS

Slow queries found and fixed before users notice

Agents connect to your production database to monitor performance — identifying slow queries, suggesting index optimizations, flagging anomalies, and tracking storage trends. Proactive database health management, fully automated.

What you get

Slow query detection

Queries exceeding your threshold identified and profiled — with execution plans, frequency, and impact on overall performance.

Index optimization suggestions

Specific CREATE INDEX statements with expected impact — not vague advice, but ready-to-run SQL you can apply immediately.

Table health monitoring

Bloat percentages, dead tuple counts, and vacuum frequency — keeping your tables lean and queries fast.

Connection pool tracking

Utilization trends, peak usage patterns, and leak detection — so you never hit your connection limit unexpectedly.

Storage forecasting

Growth trends and capacity planning alerts — know exactly when you'll hit thresholds, months before it becomes an emergency.

Done by an agent. Zero human effort.

Schedule it daily. The agent connects to your database, runs a full health check, and drops the report in Slack — catching problems before your users ever notice.

Operations Agent · DB Health Check Complete
> Connecting to production PostgreSQL
> Analyzing slow query log
47 queries exceeding 100ms threshold

Top 5 offenders
1. SELECT * FROM orders JOIN line_items ON... — avg 2.3s
2. SELECT COUNT(*) FROM events WHERE created_at >... — avg 1.8s
3. UPDATE users SET last_seen_at... (full table scan) — avg 1.1s
> Suggesting 3 index optimizations with expected impact

Table health
> Checking table bloat
users table: 12% bloat — recommend VACUUM
> Monitoring connection pool
42/100 connections in use · No leaks detected
> Checking disk usage
67% used · ~3 months until 80% threshold
> Generating health report

✓ Full health report generated
✓ 3 index optimization suggestions ready
✓ Alerts posted to #ops on Slack
Duration: ~14 minutes · Next scheduled run: Tomorrow 3:00 AM
HOW TO SET IT UP

For CRHQ clients

1

Enable the required skills

Make sure these skills are active on your satellite:

2

Tell the agent what to monitor

Example prompt:

"Connect to our production PostgreSQL database and run a full health check. Analyze the slow query log for anything over 100ms, identify the top offenders, and suggest index optimizations. Check table bloat, connection pool usage, and disk space. Generate a health report and post any critical alerts to #ops on Slack."
3

Schedule daily checks (recommended)

Use the schedule skill to run this health check every day at a low-traffic hour. The agent catches slow queries, bloat, and capacity issues before they impact users — and you get a report in Slack every morning.

ADVANCED TIPS

Get more out of this workflow

Schedule daily for continuous monitoring

A single health check is useful. Daily health checks are transformational. Schedule the agent to run every night and you'll have a complete history of your database's performance trends — catching degradation early and validating the impact of your optimizations.

schedule

Combine with Sentry to correlate DB performance with app errors

Wire the agent to check Sentry alongside your database. When a slow query spikes, the agent cross-references it with application errors and timeouts — giving you the full picture of how database performance impacts your users.

sentry

Store historical metrics in project documents for trend analysis

Tell the agent to log each health check's key metrics to project documents. Over weeks and months, this builds a performance history that makes it easy to spot gradual degradation, seasonal patterns, and the real impact of schema changes.

manage-project-documents

Use manage-external-servers for deeper investigation

When the agent finds something that needs more than a query to diagnose, the manage-external-servers skill gives it direct server access. Check OS-level metrics, review PostgreSQL configs, inspect log files, or run pg_stat_statements analysis — all without you SSHing in.

manage-external-servers
Keep your database healthy.
$299/month per satellite. Bring your own AI model. Deploy in 90 seconds.