Inspiration

Database issues and server crashes always seem to strike at the worst times—usually at 3:00 AM on a weekend. For small businesses, solo developers, and early-stage startups, a database slowdown or connection pool exhaustion means lost revenue, unhappy customers, and hours of stressful debugging. Yet, hiring a dedicated, round-the-clock Site Reliability Engineer (SRE) or DevOps team is financially impossible for most small businesses.

We were inspired to build Redcloud: an autonomous, 24/7 AI-operated SRE agent that empowers everyday businesses with enterprise-grade system resilience at a fraction of the cost, using Google Cloud and modern AI orchestration.

What it does

Redcloud is a self-healing monitoring and DevOps platform that keeps web applications healthy. It constantly watches database logs, server health metrics, and query execution speeds.

When a critical alert is triggered—such as a CPU spike, a database deadlock, or a slow query:

Detection: Redcloud telemetry triggers an automated pipeline. Diagnosis: System metrics and query logs are forwarded to a Google Cloud Vertex AI (Gemini Pro) agent. Remediation: The AI agent diagnoses the root cause, writes the recovery action (e.g., an optimized PostgreSQL index creation script or a query termination command), and executes the remediation. Audit: Every action taken by the AI agent is logged transparently in an interactive Audit Log dashboard, keeping the human operator fully informed.

How we built it

Redcloud is built on a modern, decoupled architecture:

Frontend: React, TypeScript, and Tailwind CSS bootstrapped with Vite. It features a responsive dashboard displaying telemetry graphs, server resource usage, active alerts, and an interactive AI Assistant interface. Database & Auth: Supabase handles secure user authentication, real-time alert logs, audit trails, and chat history storage. Agent Orchestration: n8n workflows coordinate the event pipeline, routing telemetry webhooks to the AI, and triggering database execution APIs. AI Engine: Google Cloud Vertex AI (Gemini) acts as the cognitive engine, generating structured recovery plans and analyzing query execution graphs. Backend Execution: A Python (FastAPI) agent runner hosted on Google Cloud Run securely interfaces with target databases to run system diagnostics and execute optimization queries.

Challenges we ran into

Our biggest challenge was ensuring safety and predictability in an autonomous execution environment. We could not let an AI agent run arbitrary or destructive SQL queries (like DROP TABLE).

To address this:

We constrained Vertex AI to return only structured JSON matching a strict schema. We restricted the database credentials used by the agent to execute only specific non-destructive operations (e.g., CREATE INDEX, ANALYZE, or terminating selected PID connections). We set up an isolated sandbox environment using simulated database locks to stress-test the agent's decisions without risking production data. Additionally, handling Supabase RLS policies and coordinating real-time updates between n8n webhooks and the React state required careful state machine management in our frontend.

Accomplishments that we're proud of

True Self-Healing Loop: We successfully simulated a database lock contention that froze application requests. The Redcloud agent detected the lock, identified the blocking process via Gemini, terminated the blocking connection, and restored app response times to normal—all in under 12 seconds with zero human intervention. Zero-config Telemetry Dashboard: Creating a gorgeous, responsive, themeable React interface that shows real-time resource usage in a simplified view tailored for business owners rather than DevOps experts.

What we learned

We learned that building autonomous agents requires a "defense-in-depth" security posture. Constraining LLM outputs using schema validation is not enough; the database itself must enforce hard execution limits. We also learned how to design n8n workflows that efficiently handle rate limits and retry logic during server instability.

What's next for Redcloud

Multi-Cloud and Container Support: Extending self-healing capabilities to Kubernetes, Docker containers, and Google Compute Engine instances (e.g., automatically scaling Cloud Run containers when traffic spikes). CDNs & Security: Integrating Cloudflare/CDN metrics to automatically block malicious IPs and mitigate DDoS attacks. Mobile Alerts: Building a Telegram/Slack bot integration to let business owners review, approve, or cancel recommended AI SRE tasks on the go.

Built With

Share this project:

Updates