Inspiration

Modern businesses don’t lack data — they lack immediate execution.
When a critical operational or business anomaly occurs (such as a customer churn spike or a broken data pipeline), engineering and operations teams lose valuable hours or even days analyzing logs, querying history, and manually writing fixes.

We built OpsMind to bridge this execution gap. We wanted to move past passive AI chatbots that only provide generic advice, and build a true Autonomous COO Agent (Chief Operating Officer). An agent that continuously monitors business metrics, consults organizational memory, synthesizes bulletproof strategic decisions, and takes real-world corrective action under human supervision.

Our guiding vision was simple:

What if AI didn’t just write advice reports, but actually ran and safeguarded your business operations in real-time?


What it Does

OpsMind is an Autonomous Operational & Business Intelligence Agent that closes the loop between anomaly detection and technical remediation.

When a business metric diverges:

  1. Autonomous Investigation: OpsMind triggers an 8-step reasoning pipeline (Context, Decomposition, Planning, Tool Execution, Synthesis, Reflection, Persistence).
  2. Semantic Memory Retrieval: It queries MongoDB Atlas using a powerful Hybrid Search Pipeline ($vectorSearch + Lucene Text Search) to retrieve similar historical incidents.
  3. High-Precision Reranking: It integrates Voyage AI (rerank-2) to sémantically rerank context matches, ensuring surgical accuracy in decision-making.
  4. Structured Reasoning (RAG): Powered by Google Gemini 2.5 Pro, it synthesizes a structured decision and dynamically generates a Zod-validated, interactive Remediation Playbook.
  5. Real-World Execution:
    • GitLab Duo MCP Server: The agent automatically spawns a trackable engineering ticket directly on GitLab to alert developers.
    • Google Cloud Pub/Sub: It publishes structured event payloads to downstream Cloud Functions to immediately halt broken campaigns or roll back configurations.
  6. Self-Reflection & Persistence: An independent Gemini-based critic reflects on the decision's confidence before storing it back into MongoDB Atlas as a persistent memory node.

How We Built It

OpsMind is engineered as a clean, enterprise-grade Monorepo (Turborepo, pnpm workspaces):

  • AI Reasoning Engine: Google Gemini 2.5 Pro orchestrates the reasoning, planning, and self-reflection loops.
  • Semantic Hub: MongoDB Atlas serves as our organizational memory, utilizing vector embeddings and dynamic Lucene search highlights.
  • Precision Booster: Voyage AI Reranker for semantic score optimization.
  • Integrations & MCP: Spawns the official GitLab Duo MCP Server to perform secure Git actions.
  • Event Broker: Google Cloud Pub/Sub handles asynchronous remediation message dispatching.
  • Cloud Infrastructure: Fully containerized and deployed on Google Cloud Run, with critical API tokens securely mounted via GCP Secret Manager.
  • Dashboard Console: A modern, glassmorphic Next.js 15 and React 19 interface displaying live Atlas Store Stats, glowing search highlight cards, and an interactive playbook progress tracker.

Challenges We Faced

  • Mitigating LLM Non-Determinism: Generating strictly-typed, Zod-compliant JSON remediation steps from Gemini without API validation crashes. We solved this by designing robust, structured prompt templates passing the full JSON structural schema.
  • Integrating Real-World APIs Securely: Handling secure handshakes with Google Cloud Pub/Sub and GitLab MCP at runtime. Utilizing GCP Secret Manager mapped to environment variables allowed us to build a secure-by-default architecture on Cloud Run.
  • Designing the SSE Live Stream: Streaming the 8-step reasoning progress in real-time from the Express backend to the Next.js frontend via Server-Sent Events (SSE) required precise event dispatching.

What We Learned

  • System Design over Prompt Engineering: True autonomous agents are not built on clever prompts, but on robust software architectures, type safety, and clean boundaries between reasoning and tool execution.
  • The Power of Open Protocols: Leveraging the Model Context Protocol (MCP) allowed us to integrate enterprise-grade partners like GitLab and MongoDB Atlas seamlessly.
  • Memory is the Key to Growth: By storing every decision and action outcome back in MongoDB Atlas, the agent creates a feedback loop that naturally improves its intelligence over time without retraining.

Impact & What's Next

OpsMind proves that AI is moving from passive co-pilots to active, reliable operational partners.

By automating the detection-to-remediation loop, OpsMind empowers operators, founders, and engineers to eliminate budget waste and resolve pipeline bugs in seconds rather than days. Next, we plan to extend the agent's capabilities to support multi-cloud remediation actions and deep system log parsing.

Built With

  • express.js
  • gitlab-duo
  • google-cloud-pub/sub
  • google-cloud-run
  • google-cloud-secret-manager
  • google-gemini-2.5-pro
  • model-context-protocol-(mcp)
  • mongodb-atlas
  • mongodb-atlas-search
  • mongodb-atlas-vector-search
  • next.js-15
  • node.js
  • pnpm
  • react-19
  • tailwind-css
  • turborepo
  • typescript
  • vertex-ai
  • voyage-ai-reranker
  • zod
Share this project:

Updates