OpsPilot — AI-Powered Production Incident Investigator

Inspiration

AI is changing how developers build software. With AI coding assistants and code-generation tools becoming increasingly common, developers can build and ship applications faster than ever. However, when these applications encounter production issues, identifying the actual root cause can still be difficult.

An increase in API latency, a database bottleneck, or an unexpected deployment regression can require developers to inspect multiple logs, metrics, deployment histories, and documentation sources before understanding what went wrong.

This inspired me to build OpsPilot: an AI-powered incident investigator that helps developers debug production issues more efficiently. My goal is to go beyond generating code and help developers understand, investigate, and resolve the problems that arise when software runs in the real world.

What it does

OpsPilot investigates production incidents by bringing together relevant operational evidence and using an AI agent to analyze it.

  • Incident investigation: Analyzes a reported issue and organizes the investigation into a structured report.
  • Metrics analysis: Examines service-health indicators to identify potential performance bottlenecks.
  • Log analysis: Searches for relevant errors and events that may explain the incident.
  • Deployment context: Considers recent deployments as potential contributors to production regressions.
  • Knowledge retrieval: Uses retrieval-augmented generation (RAG) to retrieve relevant operational documentation and runbooks.
  • Actionable recommendations: Presents likely root causes and suggested next steps to help developers continue debugging.

How I built it

I built OpsPilot using React for the frontend and Python with FastAPI for the backend. I integrated Google ADK and Gemini for agentic reasoning, allowing the AI agent to coordinate investigation tools and interpret collected evidence.

I also developed an MCP server to expose incident-investigation capabilities through the Model Context Protocol, creating a foundation for integrating incident investigation into AI-powered workflows.

For operational knowledge, I incorporated retrieval-augmented generation (RAG) to retrieve relevant documentation and runbooks. I deployed the frontend and backend as separate services so the frontend could communicate with the backend through a production API endpoint.

Challenges I faced

One of my key challenges was bringing different investigation sources into a coherent workflow. Metrics, logs, deployment information, and documentation each provide only part of the picture. I needed to connect this evidence and produce a useful explanation instead of simply returning disconnected data.

Deploying the application also required me to resolve API routing, production environment configuration, database connectivity, and database schema initialization issues.

These challenges reinforced an important lesson: building an AI agent is not only about prompting a model. It also requires reliable tools, well-structured data, robust backend infrastructure, and a clear way to present evidence to developers.

What I learned

Through OpsPilot, I explored agentic AI, tool orchestration, MCP integration, RAG, and production deployment. I also learned that useful incident investigation should distinguish observed evidence from hypotheses and recommendations, rather than treating every AI-generated explanation as a confirmed root cause.

What's next

I plan to extend OpsPilot with richer observability integrations, better evidence correlation, incident timelines, and more reliable root-cause analysis. My long-term vision is to help developers spend less time searching across tools and more time understanding and resolving production issues.

My vision: AI should help developers not only build software faster, but also understand and debug it when things go wrong.

Built With

  • agentic-ai
  • artificial-intelligence
  • docker
  • fastapi
  • gemini
  • generative
  • google-adk
  • model-context-protocol-(mcp)
  • postgresql
  • python
  • react
  • rest-api
  • retrieval-augmented-generation-(rag)
Share this project:

Updates

Submission history