PulseX AI - Next-Gen Procurement & FX Risk Copilot for SME Manufacturers

Phase 1 Submission for NeruX 1.0 (Idea Validation)
Team Name: ReConnect


💡 Inspiration

In 2026, Sri Lankan small and medium enterprises (SMEs) especially in apparel, construction, and manufacturing are facing severe macroeconomic strain. With a steadily depreciating Rupee, fluctuating customs regulations, and a massive national trade deficit ($997 million in Dec 2025 alone), these businesses are trapped in fixed-price contracts while import costs skyrocket.

Currently, procurement and finance teams waste hours manually reading central bank reports, gazettes, and news outlets to catch warning signs. Existing financial dashboards offer static charts that break easily if a website changes layouts, and they leave the hardest part deciding what actual steps to take completely up to an overworked human. We wanted to build a resilient, intelligent partner that transforms this chaotic data into actionable, justified strategy.


🛠️ What it does

PulseX AI replaces manual, slow, and error-prone risk monitoring with an autonomous system of AI agents built on an advanced agentic loop.

Unlike rigid dashboards, PulseX AI dynamically plans its own research, checks conflicting data sources against each other, and delivers plain-English strategic recommendations (e.g., "Hedge currency now," "Delay order," or "Switch to a local supplier") to finance and procurement leads.

Key Features:

  • Self-Healing Adaptability: If a target website changes structure or blocks a scraper, the agent loop dynamically switches to a backup data stream or search API instead of crashing.
  • Intelligent Risk Reasoning: Uses domain-specific NLP and machine learning to analyze central bank feeds, national news, and government gazettes.
  • Self-Questioning Engine (Anti-Hallucination): Before delivering a recommendation, the system deliberately plays devil's advocate, questioning its own conclusions to weed out market noise from genuine signals.
  • Human-in-the-Loop (HITL) Guardrails: High-stakes decisions are never automated. When risk thresholds are crossed, the system safely pauses, allowing managers to approve, edit, or redirect the AI using natural language.

🏗️ How we built it

We designed a decoupled, multi-layered architecture focused on real-time execution and deep semantic analysis:

  • Agent Orchestration: Powered by LangGraph and LangChain to handle complex, non-linear state management, agent hand-offs, and conditional human review pauses.
  • Data Ingestion: Built flexible scraping pipelines utilizing BeautifulSoup, Requests, and lxml to monitor real-time feeds.
  • Storage & Memory: Implemented PostgreSQL for foundational system state logs, alongside ChromaDB as a vector database to give the agents long-term episodic memory of past human decisions.
  • Backend & Frontend: Developed an asynchronous FastAPI backend that streams live agent updates via Server-Sent Events (SSE) to a responsive React + Vite dashboard built with Recharts for clean data visualization.

Domain NLP & Mathematical Framework

To power our risk reasoning engine, we combined financial sentiment analysis with statistical machine learning models.

Text data from financial reports is scored using FinBERT via Hugging Face Transformers, generating a raw sentiment vector. This score is combined with macroeconomic metrics to calculate an overall risk probability using Bayesian Inference:

$$P(\text{Risk} \mid \text{Evidence}) = \frac{P(\text{Evidence} \mid \text{Risk}) \cdot P(\text{Risk})}{P(\text{Evidence})}$$

Simultaneously, we run anomaly detection on incoming news volume and exchange rate velocity. We use scikit-learn's Isolation Forest, which calculates an anomaly score $s(x)$ for a given data point $x$:

$$s(x) = 2^{-\frac{E(h(x))}{c(n)}}$$

Where $E(h(x))$ is the average path length of $x$ across a collection of isolation trees, and $c(n)$ is the average path length of an unsuccessful search in a Binary Search Tree with $n$ nodes. If $s(x)$ approaches $1$, the data point is flagged as an outlier, triggering an immediate validation cycle.


🚧 Challenges we ran into

  • Handling Contradictory Data: Financial news and local reports often conflict (e.g., one outlet reporting a port strike is ending, while another says it's expanding). We had to design a specialized resolution node in LangGraph that flags these contradictions as "unclear" and routes them directly to a human reviewer rather than forcing the AI to guess.
  • Scraper Resiliency: Government and news sites frequently change their layouts or employ anti-bot measures. Overcoming this required building a strict retry policy (capped at 5 loops) and fallback configurations to alternative search APIs to avoid infinite loops.
  • Context Window Limits: Passing raw, dense financial text directly to NLP models quickly overloaded the context windows. We resolved this by text-chunking and summarizing intermediate inputs before running token-heavy sentiment analysis.

🎉 Accomplishments that we're proud of

  • Moving Beyond Linear Dashboards: Successfully moving away from passive, chart-only dashboards to a truly agentic system that thinks, critiques its own logic, and acts as a genuine decision copilot.
  • Robust HITL Flow: Creating a seamless "human-in-the-loop" environment where human intervention isn't just a basic pop-up notification, but a structural state-pause that allows a manager to rewrite the AI’s trajectory using plain language.
  • Contextual Memory Integration: Successfully wiring vector storage into the loop so the AI can learn from how a manager responded to a similar currency fluctuation three months ago.

📚 What we learned

  • The Power of Agentic State Management: We discovered how much more robust systems become when using LangGraph over rigid, sequential scripts; letting agents dynamically evaluate their next steps mirrors real-world human workflows perfectly.
  • Sentiment vs. Reality: We learned that market sentiment (tracked by FinBERT) must always be mathematically balanced with hard statistical anomalies (tracked by Isolation Forest) to prevent an AI from overreacting to single sensationalized headlines.

🚀 What's next for PulseX-AI

  • Phase 2 Development: Fully tying our individual FastAPI and React pieces into the core LangGraph loop and polishing the cross-agent state transfers.
  • ERP Integrations: Building direct connectors to popular SME resource planning software so the AI can automatically view a manufacturer's real-time raw material inventory levels.
  • Expanded Financial Instruments: Moving beyond basic suggestions to simulate precise currency hedging strategies and forward contract options directly inside the user dashboard.

👥 Team ReConnect

  • Sahabandu Kankanam Arachchige Kaveesha Madhushan
  • Hareen Manusha Liyanage
  • Abdullahil Cadhir Fathima Akeela
  • Hiyumi Dilmani Suriyapperuma

Tags

#AI #FinTech #Procurement #SupplyChain #SME #LangGraph #GenerativeAI #SriLanka #Python #FastAPI #React #Vite #JavaScript #PyTorch #Transformers #HuggingFace #FinBERT #BeautifulSoup #Requests #lxml #NumPy #Pandas #ScikitLearn #IsolationForest #BayesianInference #PostgreSQL #ServerSentEvents #RESTAPI #Recharts #GitHub #MachineLearning #ArtificialIntelligence #NLP

Built With

Share this project:

Updates