Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 TraceMind AI

Production incident root cause analysis powered by Cognee Knowledge Graphs, Vector Search, and LLM reasoning.

πŸ”— Live Demo: Try TraceMind AI Live Here

TraceMind AI helps engineers investigate production incidents by combining semantic memory, vector similarity search, and knowledge graphs to identify the most likely root cause of system failures. Instead of manually correlating logs, deployments, and alerts, TraceMind automatically builds a contextual timeline and explains why an incident occurred.


✨ Features


πŸ—οΈ Data Ingestion Pipeline

Before running any query, your raw infrastructure footprint must be loaded into the system. TraceMind AI processes this using a structured database seeding phase:

  1. Local Text Vector Generation: A standalone pipeline feeds a mock system history containing GitHub Pull Requests, Prometheus metrics, and Slack communications. A local FastEmbed model processes the descriptive text chunks into vector representations.
  2. Supabase Population: These records and their corresponding multi-dimensional vectors are loaded into a PostgreSQL database using pgvector.
  3. Cognee Cloud Graph Extraction: An extraction runner pipeline pulls records sequentially from Supabase, streaming them to Cognee Cloud. Backed by a Groq Llama 3 model, it creates links across application profiles, infrastructure layers, and service dependencies to yield a connected, searchable Knowledge Graph.

πŸ” Multi-Engine Incident Investigation

Runs two independent investigation engines in parallel:

  • Correlation Engine – Uses vector similarity and temporal analysis to identify related historical incidents.
  • Cognee Reasoning Engine – Traverses the knowledge graph to explain causal relationships between deployments, alerts, and services.

Both results are displayed side-by-side, allowing engineers to compare mathematical evidence with semantic reasoning.


πŸ“ˆ Vector-Driven Temporal Correlation

  • Fast similarity search using pgvector
  • Maps historical production incidents
  • Identifies related deployments and pull requests
  • Uses temporal decay scoring to prioritize likely root causes

🧠 Knowledge Graph Extraction

Production events are automatically transformed into a connected knowledge graph containing:

  • Application logs
  • Git commits
  • Deployments
  • Pull Requests
  • Incident timelines
  • Team discussions
  • Infrastructure relationships

This enables graph-based reasoning instead of traditional keyword searches.


⚠️ Proactive Risk Analysis

Beyond incident investigation, TraceMind continuously evaluates system health by analyzing:

  • Recent code mutations
  • Historical failures
  • Service dependencies
  • Architecture relationships

The platform predicts high-risk services before production failures occur.


πŸ›  AI-Powered Mitigation Suggestions

For every investigation, TraceMind provides:

  • Root cause explanation
  • Risk score
  • Related historical incidents
  • Suggested mitigation steps
  • Engineering recommendations

πŸ›  Tech Stack

Layer Technology
Frontend React + Tailwind CSS
Backend FastAPI
Vector Search PostgreSQL + pgvector
Knowledge Graph Cognee Cloud
Embeddings FastEmbed
LLM Groq (Llama 3.3 70B & Llama 3.1 8B)
Deployment Render

πŸš€ Getting Started

Prerequisites

Before running the project, install:

  • Python 3.11+
  • Node.js 18+
  • PostgreSQL (or Supabase PostgreSQL)
  • Git

βš™οΈ Backend Setup

1. Navigate to Backend

cd backend

2. Create Virtual Environment

Linux / macOS

python -m venv venv
source venv/bin/activate

Windows

python -m venv venv
venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure Environment Variables

Create a .env file inside the backend folder.

DATABASE_URL=your_postgresql_or_supabase_connection_string

GROQ_API_KEY=your_groq_api_key

COGNEE_SERVICE_URL=your_cognee_cloud_url

COGNEE_API_KEY=your_cognee_cloud_api_key

5. Build the Knowledge Graph

First, run the database seeding file to load historical alerts, Slack logs, and commits into Supabase with vector representations:

python seed_database.py

Run the ingestion script to load the events from Supabase into Cognee.

```bash
python cognee_ingestion.py

This process:

  • Reads production records
  • Creates vector embeddings
  • Stores semantic memories
  • Builds the knowledge graph

6. Start the Backend

uvicorn main:app --reload

Backend will be available at

http://localhost:8000

Swagger documentation:

http://localhost:8000/docs

🎨 Frontend Setup

1. Navigate to Frontend

cd frontend

2. Install Dependencies

npm install

3. Configure Environment Variables

Create a .env file.

VITE_API_BASE_URL=http://localhost:8000

4. Start the Development Server

npm run dev

Frontend will run at

http://localhost:5173

🌐 Production Deployment (Render)

TraceMind AI is designed as a Render Monorepo with independent frontend and backend deployments.


🎨 Frontend Service

Property Value
Service Type Static Site
Root Directory frontend
Build Command npm ci && npm run build
Publish Directory dist

⚑ Backend Service

Property Value
Service Type Web Service
Root Directory backend
Build Command pip install -r requirements.txt
Start Command uvicorn main:app --host 0.0.0.0 --port $PORT

πŸš€ Quick Start

Clone the repository and launch both services.

git clone <repository-url>

# Backend
cd backend

python -m venv venv

# Linux/macOS
source venv/bin/activate

# Windows
# venv\Scripts\activate

pip install -r requirements.txt

# Configure .env

python cognee_ingestion.py

uvicorn main:app --reload

# Frontend

cd ../frontend

npm install

# Configure .env

npm run dev

πŸ“– Future Improvements

  • Authentication & user management
  • Kubernetes deployment
  • Multi-tenant incident memory
  • Slack and Microsoft Teams integration
  • GitHub webhook automation
  • Real-time risk monitoring

Built with ❀️ using FastAPI, Cognee Cloud, PostgreSQL, pgvector, Groq LLMs, and React.


In compliance with The Hangover Part AI Hackathon rules, AI coding assistants (claude/gemini) were used during development to generate boilerplate code, format scripts, and accelerate UI development under our architectural guidance.

About

AI-powered root-cause analysis engine. Finds out which code change broke your microservices by combining timeline math with smart knowledge graphs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages