Skip to content

Repository files navigation

Enterprise AI Procurement Intelligence Agent

An enterprise-grade multi-agent AI system that automates procurement operations using LangGraph, FastAPI, PostgreSQL, ChromaDB, and Large Language Models.

The platform combines invoice intelligence, procurement analytics, vendor intelligence, approval workflows, procurement risk assessment, and Retrieval-Augmented Generation (RAG) into a single conversational interface.

Key Highlights

  • Multi-Agent Architecture using LangGraph
  • Retrieval-Augmented Generation (RAG) over 100+ procurement documents
  • Natural Language Invoice Search and Analysis
  • Procurement Spend Analytics
  • Vendor Intelligence and Spend Tracking
  • Procurement Risk Assessment
  • Approval Workflow Automation
  • Enterprise-Style Conversational Interface
  • Fully Deployed Frontend and Backend

Features

Invoice Intelligence (RAG)

  • Query procurement invoices using natural language
  • Semantic search across procurement documents
  • Business justification extraction
  • Invoice summary generation
  • Metadata-aware document retrieval

Example:

What is the business justification for invoice INV-1047?
Summarize invoice INV-1001.
Which invoices involve software licenses?

Procurement Analytics

  • Total procurement spend analysis
  • Approved invoice reporting
  • Pending payment tracking
  • Executive procurement summaries

Example:

What is the total procurement spend?
Generate a procurement summary.

Vendor Intelligence

  • Top vendor identification
  • Vendor spend analysis
  • Spend concentration insights
  • Supplier dependency analysis

Example:

Who is the top vendor by spend?
How much have we spent with MedSupply Inc?

Procurement Risk Assessment

  • Vendor concentration risk detection
  • Outstanding payment analysis
  • Procurement exposure monitoring
  • Actionable risk recommendations

Example:

Generate a procurement risk report.

Approval Workflow Automation

  • Approve invoices using natural language
  • Reject invoices using natural language
  • Database-backed workflow execution
  • Automated status updates

Example:

Approve invoice INV-1002.
Reject invoice INV-1003.

Enterprise Guardrails

  • Procurement-only assistant behavior
  • Out-of-scope query detection
  • Missing invoice handling
  • Structured business responses

Example:

Tell me about cricket.

Response:

I am an Enterprise Procurement Agent and can only assist with procurement-related questions.

System Architecture

User
 │
 ▼
React Frontend (Vercel)
 │
 ▼
FastAPI Backend (Railway)
 │
 ▼
LangGraph Workflow
 │
 ├── Intent Agent
 ├── Database Agent
 ├── Analytics Agent
 ├── Vendor Analytics Agent
 ├── Risk Agent
 ├── Approval Agent
 ├── Summary Agent
 ├── RAG Agent
 ├── Out-of-Scope Agent
 └── Response Agent
 │
 ▼
Data Layer
 │
 ├── PostgreSQL (Neon)
 ├── ChromaDB
 └── Procurement PDF Knowledge Base
 │
 ▼
OpenRouter + DeepSeek LLM

Tech Stack

Frontend

  • React
  • Vite
  • Tailwind CSS
  • Axios

Backend

  • FastAPI
  • LangGraph
  • SQLAlchemy

AI & RAG

  • OpenRouter
  • DeepSeek Chat V3
  • Sentence Transformers
  • ChromaDB

Database

  • PostgreSQL (Neon)

Deployment

  • Railway
  • Vercel
  • Docker

Project Structure

agents/
api/
database/
docs/
frontend/
models/
rag/
scripts/
workflows/

Dockerfile
docker-compose.yml
requirements.txt

Example Queries

Invoice Intelligence

What is the status of invoice INV-1001?
Summarize invoice INV-1047.
What is the business justification for invoice INV-1047?

Analytics

What is the total procurement spend?
Show unpaid invoices.
Generate a procurement summary.

Vendor Intelligence

Who is the top vendor by spend?
How much have we spent with MedSupply Inc?

Risk Assessment

Generate a procurement risk report.

Workflow Automation

Approve invoice INV-1002.
Reject invoice INV-1003.

Running Locally

Backend

pip install -r requirements.txt
uvicorn api.app:app --reload

Frontend

cd frontend
npm install
npm run dev

Screenshots

Dashboard

Dashboard

Procurement Analytics

Analytics

Invoice Intelligence

Invoice Query

Risk Assessment

Risk Report


Future Improvements

  • User Authentication
  • Role-Based Access Control
  • Supplier Performance Scoring
  • Procurement Forecasting
  • Contract Intelligence
  • Document Upload Interface
  • Real-Time Approval Notifications
  • Multi-Tenant Procurement Workspaces

Author

Ajay Armugam

B.Tech Graduate | AI/ML Engineer

Built using LangGraph, FastAPI, PostgreSQL, ChromaDB, OpenRouter, and DeepSeek.

Releases

Packages

Contributors

Languages