Skip to content

sayanim1/HackAI-2026-NexusFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NexusFlow β€” Real-Time Intelligence & Decision Signal Platform

"Don't just read the noise. Understand the signal."

Python FastAPI LangGraph Gemini


The Problem

Modern organizations are drowning in unstructured text β€” financial news, system logs, incident reports, procurement data, market feeds. The challenge is not collecting this data. The challenge is converting it into a reliable, actionable signal fast enough to matter.

  • A portfolio manager needs to know if a Fed announcement moves their position before the market opens.
  • An SRE needs to know if five login errors in three minutes mean a system-wide outage before customers start calling.
  • A procurement officer needs to know if port congestion in Shanghai affects their supply chain today, not next week.
  • An investor needs a sector-wide morning briefing without reading 200 articles.

NexusFlow solves this. It is a one-stop, real-time intelligence platform that ingests raw text from live data sources β€” news feeds, incident logs, procurement reports β€” and produces structured, quantified decision signals using a multi-agent AI pipeline. It also proactively pushes twice-daily sector intelligence alerts so decisions never wait for a human to go looking.


Track Relevance

"Can we convert text into a reliable signal that helps make better decisions?"

Track Requirement How NexusFlow Addresses It
Raw text as input Live news headlines, incident .txt files, procurement reports
Meaningful signal output BUY/SELL/HOLD, Severity Index, Index Score, Sector Score
Real-world decision support Trade recommendations, incident triage, supply chain alerts, sector digests
Full pipeline Ingest β†’ Classify β†’ Extract β†’ Decide β†’ Visualize β†’ Alert
Scale Multi-source, multi-domain, multi-sector simultaneously
Proactive intelligence Twice-daily automated alerts without user prompting

What NexusFlow Does

NexusFlow has four intelligent pipelines, each targeting a high-stakes real-world domain:


πŸ“ˆ 1. Market Intelligence Agent

Problem: Traders and analysts read hundreds of news articles daily to form a market view. Most signals are buried in noise.

Solution: A conversational AI agent that accepts natural language questions about any stock or sector. It fetches live news, analyzes sentiment like a Wall Street analyst, pulls real-time price data, and returns a structured BUY/SELL/HOLD signal with confidence score, risk level, and plain-English reasoning β€” all in one chat interaction.

Example:

"What is the outlook for NVDA this week?" β†’ SIGNAL: BUY | Confidence: 82% | Risk: MEDIUM β†’ Live 30-day price chart, sentiment breakdown, top 5 relevant headlines


🚨 2. Incident Analyst Agent

Problem: Large engineering teams deal with hundreds of incident reports simultaneously. Reading all of them wastes critical response time during outages.

Solution: The agent reads the raw text, identifies affected systems, identifies patterns, computes a Severity Index based on keyword density, and historical frequency β€” backed by a RAG knowledge base of real system incidents β€” and auto-drafts an engineering brief with ranked root causes and next actions.

Example:

β†’ SEVERITY INDEX: HIGH β†’ Root Cause: SSO Gateway Timeout (91% confidence) β†’ Historical match: Dec 2024 Auth Outage β†’ Auto-drafted engineering summary with ordered action items


🚒 3. Procurement & Port Risk Agent

Problem: Supply chain managers cannot monitor global port disruptions, trade news, and geopolitical events fast enough to act before they impact procurement.

Solution: The agent monitors live news for port disruptions, trade policy changes, and logistics events. It maps events to affected supply routes and generates a Risk Score (0–1) with recommended procurement actions and automated email alerts with recommended actions with human intervention.

Example:

"What is the current risk for procurement from Shanghai?" β†’ RISK SCORE: 74/100 | Action: Consider alternative sourcing β†’ Disruption events with confidence interval >= 70, affected trade routes, recommended timeline


πŸ“Š 4. Market Analysis & Automated Alert System

Problem: Investors and analysts need a daily sector-wide performance briefing but cannot manually scan every stock and headline across multiple sectors every morning and evening.

Solution: NexusFlow automatically runs a twice-daily sector sweep at market open and market close. For each major sector it fetches the top headlines, classifies stocks as top-performing or low-performing, and generates a structured sector summary with BUY/WATCH/AVOID recommendations. These digests are pushed as automated email alerts to subscribed users.

Sectors covered: Technology Β· Healthcare Β· Energy

Each sector digest includes:

  • Top 3 performing stocks with signal and reasoning
  • Bottom 3 underperforming stocks with risk flags
  • Sector-wide sentiment score
  • Key macro catalyst driving the sector
  • Recommended watchlist for the next session

Example Alert (9 AM digest):

NexusFlow Morning Sector Digest β€” March 8, 2026

πŸ“ˆ TECHNOLOGY β€” BULLISH (Score: 0.74)
  Top Performers:    NVDA ↑ BUY | MSFT ↑ BUY | META ↑ HOLD
  Underperformers:   AAPL ↓ SELL | INTC ↓ AVOID
  Key Catalyst:      Fed signals rate pause, AI infrastructure spending up
  Watchlist:         NVDA, MSFT

πŸ₯ HEALTHCARE β€” NEUTRAL (Score: 0.12)
  Top Performers:    LLY ↑ BUY | JNJ ↑ HOLD
  Underperformers:   PFE ↓ SELL
  Key Catalyst:      FDA approval pipeline mixed signals
  Watchlist:         LLY

⚑ ENERGY β€” BEARISH (Score: -0.41)
  Top Performers:    None
  Underperformers:   XOM ↓ SELL | CVX ↓ AVOID
  Key Catalyst:      Oil inventory build, demand concerns
  Watchlist:         Monitor for reversal

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          React Frontend                              β”‚
β”‚   Market Intel | Incident Analyst | Port Risk | Sector Dashboard     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚ REST API (HTTP/JSON)
                                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         FastAPI Backend                              β”‚
β”‚  /market/chat  /incident/analyze  /port/risk  /market-analysis/digest         β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚              β”‚                  β”‚              β”‚
       β–Ό              β–Ό                  β–Ό              β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Market   β”‚  β”‚  Incident    β”‚  β”‚  Port Risk  β”‚  β”‚ Market Analysisβ”‚
β”‚ Pipeline β”‚  β”‚  Pipeline    β”‚  β”‚  Pipeline   β”‚  β”‚ Pipeline       β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚                β”‚                 β”‚                  β”‚
     β–Ό                β–Ό                 β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Intent  β”‚   β”‚ Text         β”‚   β”‚ Input    β”‚   β”‚ Market Sweep   β”‚
β”‚         β”‚   | Parser Tool  β”‚   β”‚ location |   β”‚                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚                β”‚                 β”‚                  β”‚
     β–Ό                β–Ό                 β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚News +   β”‚   β”‚ Extraction   β”‚   β”‚  News    β”‚   β”‚ Per-Sector     β”‚
β”‚Price    β”‚   β”‚              β”‚   β”‚ Fetcher  β”‚   β”‚ News Fetcher   β”‚
β”‚Fetcher  β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚                 β”‚                  β”‚
     β”‚          β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”          β–Ό                  β–Ό
     β–Ό          β”‚ RAG Tool  β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚ (Chroma)  β”‚   β”‚  Risk    β”‚   β”‚ Performance    β”‚
β”‚Stock Risk     β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β”‚  Score   β”‚   β”‚ Classifier     β”‚
β”‚AnalysisAgent       β”‚          β”‚          β”‚   |    Agent       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β–Ό          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚                  β”‚
     β–Ό        β”‚ Root Cause   β”‚        β–Ό                  β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚   Analysis   β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Recomm. β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  Action  β”‚   β”‚Recommendation  β”‚
β”‚ Agent   β”‚          β”‚          β”‚  Agent   β”‚   β”‚                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β–Ό          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
                β”‚ Action       β”‚                          β–Ό
                β”‚ Planner      β”‚               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚ Alert Composer β”‚
                      β”‚                        β”‚                β”‚
                      β–Ό                        β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
                β”‚ Summarizer   |                       β–Ό
                β”‚              β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚ Email Dispatch β”‚
                                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚  Gemini 2.5 Flash LLM β”‚
          β”‚  (all agents)         β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Pipeline Flows

πŸ“ˆ Market Intelligence

User Question (natural language)
        β”‚
        β–Ό
[Intent extractor] β€” ticker, sector, time window
        β”‚
   β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
   β–Ό         β–Ό
[News      [Price
 Fetcher]   Fetcher]
 NewsAPI    yfinance
   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
        β–Ό
[Stock Risk Analysis Agent]
WHO/WHAT/WHY/HOW analysis per headline
        β”‚
        β–Ό
[Recommendation]
BUY / SELL / HOLD
Confidence + Risk level + Reasoning
        β”‚
        β–Ό
React UI β€” chat reply + price chart + signal card

🚨 Incident Analyst

Live Log Data (I/P from User)
        β”‚
        β–Ό
reads raw text
        β”‚
        β–Ό
[Extraction]
Affected systems, symptoms, timeline, severity
        β”‚
        β”‚
        β–Ό                   
    [RAG Tool]        
    Chroma vector       
search top 3 similar incidents with confidence score >= 70%
        β”‚
        β–Ό
Ranked causes + confidence %
Grounded by RAG historical context
        β”‚
        β–Ό
Ordered next steps
        β”‚
        β–Ό
 Engineering brief
        β”‚
        β–Ό
React UI β€” severity meter + root causes + summary

🚒 Port Risk

User Query (port / region / commodity)
        β”‚
        β–Ό
[Input] β€” port, region, trade route
        β”‚
        β–Ό
[News Fetcher] β€” live port/trade/geopolitical news
        β”‚
        β–Ό
[Risk Scoring Agent] β€” Signal = (LLM_Severity * Hub_Importance) + (Historical_Context)
        β”‚
        β–Ό
[Action] β€” switch supplier / delay / hedge
        β”‚
        β–Ό
React UI β€” risk score + affected routes + recommendations

πŸ“Š Sector Alert (Automated, Twice Daily)

Scheduler β€” 9 AM + 5 PM trigger
        β”‚
        β–Ό
[Sector Sweep]
Loops through 3 sectors
        β”‚ 
        β–Ό
[News Fetcher Tool]
Top headlines per sector β€” NewsAPI
        β”‚
        β–Ό
[Performance Classifier Agent]
TOP PERFORMING / LOW PERFORMING / NEUTRAL
per stock based on headline analysis
        β”‚
        β–Ό
[Recommendation Agent]
BUY / WATCH / AVOID per stock
Sector sentiment score + key macro catalyst
        β”‚
        β–Ό
[Alert Composer]
Formats structured sector digest
        β”‚
        β–Ό
[Email Dispatch]
Sent to all subscribed users

RAG Architecture

INGESTION β€” one-time setup
────────────────────────────────────────────────────
Sources:
  -  Historical Incidents     (incidents.txt)
  -  IOSCO Market Outage Reports (txt)
  -  AI Incident Database     (CSV β€” Kaggle)
  -  Past Port Disruption Events (txt)
        β”‚
        β–Ό
[TextLoader] β€” LangChain reads all .txt sources
        β”‚
        β–Ό
[RecursiveCharacterTextSplitter]
  chunk_size = 800
  chunk_overlap = 100
  separator = "---"
        β”‚
        β–Ό
[Gemini text-embedding-004]
  768-dimensional dense vectors
        β”‚
        β–Ό
[ChromaDB PersistentClient]
  Collection: "financial_incidents"
  Stored at: ./chroma_db


RETRIEVAL β€” at query time
────────────────────────────────────────────
Raw incident text (user input)
        β”‚
        β–Ό
[Gemini text-embedding-004] β€” embeds query into 768-dim vector
        β”‚
        β–Ό
[ChromaDB cosine similarity search]
Returns top 3 most similar historical incidents
        β”‚
  β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
  β–Ό            β–Ό
>= 0.70       < 0.70
MATCH         NEW INCIDENT
(pattern      (novel issue,
 confirmed)    estimated)
  β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
        β–Ό
Context passed to Gemini analyzer node
β†’ Root causes grounded in historical precedent
β†’ Confidence scores reflect match quality

Property Detail
Role Autonomous sector analyst & email alert publisher
Trigger Background threading.Timer β€” every 12 hours
Perceives Live sector news via NewsAPI (Technology, Finance, Energy)
Reasons Gemini 2.5 Flash batch-analyzes all sector headlines
Acts Dispatches HTML email report β€” no user prompt needed
Signal BUY / WATCH / SELL per sector + plain-English reasoning
Fallback Logs the full report to console if SMTP is not configured
Manual override POST /api/market/alerts/send-email from the frontend

Agent Summary

# Agent Trigger Signal Decision Gate
1 Market Intelligence User chat message BUY / SELL / HOLD Pydantic-validated Gemini enum
2 Incident Analyst User submits log text Severity + root causes (confidence %) RAG cosine similarity β‰₯ 0.70
3 Supply Chain Domino User queries a country Disruption Index 0.0–1.0 index > 0.75 β†’ email modal fires
4 Sector Intelligence Autonomous every 12 hours BUY / WATCH / SELL per sector Runs on timer β€” no human required

All agents powered by Gemini 2.5 Flash Β· Agents 1–3 orchestrated by LangGraph Β· Agent 4 runs on autonomous background scheduler

image
image (1) image (2) image (3) Screenshot 2026-03-08 at 07 12 06

Demo Video: https://youtu.be/OV4_fNzh594

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors