Inspiration
In every software company, when a production system breaks at 2 AM, an engineer has to manually check logs, metrics, and deployments — taking 60 to 90 minutes every single time. The same incidents repeat because there is no institutional memory. We built OpsPilot AI to eliminate this completely.
What it does
OpsPilot AI is a self-learning autonomous incident commander. When a production alert fires:
- Recalls past incidents from Elasticsearch memory using semantic search
- Analyzes live logs using ES|QL queries via Elastic Agent Builder MCP tools
- Correlates CPU, memory, and latency metrics using ES|QL
- Investigates recent deployments as potential root causes
- Reasons over all evidence using Gemini 2.5 Flash to identify root cause
- Executes remediation automatically — rollback, scale-up, or restart
- Notifies the team via real Slack alert with full incident details
- Creates a Jira ticket automatically with root cause and actions taken
- Stores learnings back into Elasticsearch so future incidents resolve faster
What takes an engineer 60-90 minutes manually, OpsPilot completes autonomously in under 2 minutes — with zero human intervention.
How we built it
Frontend: Next.js 14 + TailwindCSS — live reasoning trace dashboard with WebSocket streaming
Backend: FastAPI (Python) — orchestration, REST API, and WebSocket server
AI Engine: Gemini 2.5 Flash with function calling — autonomous multi-step reasoning
MCP Integration: Elastic Agent Builder MCP Server — all data retrieval goes through verified MCP tools:
platform_core_search— semantic search using ELSERplatform_core_generate_esql— converts plain English to ES|QLplatform_core_execute_esql— runs queries against live Elasticsearch data
Database + Memory: Elasticsearch Serverless — stores logs, metrics, incidents, and agent learnings
Real Integrations: Slack webhooks for real-time alerts, Jira REST API for automatic ticket creation
Challenges we ran into
- Elastic Cloud Serverless rejects
number_of_shardsandnumber_of_replicasin index mappings — had to remove all index settings - MCP server requires
Accept: application/jsonheader specifically —text/event-streamalone returns 406 - Ensuring all decisions come from Gemini reasoning rather than hardcoded if/else logic — rewrote all agents to return raw data and let Gemini interpret it
- Gemini free tier rate limits — switched to
models/gemini-2.5-flashwith proper model path format
Accomplishments that we're proud of
- Truly autonomous — zero human input from alert to resolution
- Self-learning memory — every resolved incident stored in Elasticsearch, recalled by future incidents
- All retrieval through MCP — agents never query Elasticsearch directly, always through Elastic Agent Builder MCP tools
- Real integrations — Slack messages and Jira tickets created automatically, not simulated
- Live reasoning trace — dashboard streams every Gemini thought and tool call in real time via WebSocket
- Decision transparency — every root cause and remediation choice is made by Gemini, visible on dashboard
What we learned
- How to build truly autonomous agents using Gemini function calling
- How Elastic Agent Builder MCP server exposes enterprise data to AI agents
- How ES|QL enables AI agents to query structured data using natural language
- How Elasticsearch serves as persistent agent memory, not just a log store
- The difference between a chatbot that answers questions and an agent that takes actions
What's next
- Connect to real Kubernetes cluster for actual rollback execution
- Add Security Agent and Cost Optimization Agent as additional subagents
- Deploy on Google Cloud Run for production use
- Integration with PagerDuty for automated on-call escalation
- Multi-tenant support for enterprise deployments
Built With
- elastic-agent-builder
- elastic-mcp-server
- elasticsearch-serverless
- es|ql
- fastapi
- gemini-2.5-flash
- google-ai-studio
- jira-rest-api
- next.js
- python
- slack-api
- tailwindcss
- typescript
- websocket
Log in or sign up for Devpost to join the conversation.