Aryan H.
Full Stack AI EngineerBuilding production AI systems
Back to Work
Nov 2026

ExpenseFlow – Autonomous AI-Powered Expense Management & Reimbursement System

An autonomous, AI-powered expense management and reimbursement platform that leverages multimodal document intelligence, LangGraph multi-agent orchestration, and RAG-based policy auditing to automate expense claims, detect fraudulent submissions, and streamline corporate reimbursements.

QUICK_SPECAT A GLANCE
YEAR2026
CLIENTPRACTICE PROJECT
CATEGORYAI + FullStack
DURATION3-4 WEEKS
CORE STACK
Next.jsTailwind CSSPythonFastAPIMulti-Agent AI SystemsGoogle Gemini Vision API+3
JUMP TO:
ExpenseFlow – Autonomous AI-Powered Expense Management & Reimbursement System – primary application dashboard overview, built by Aryan Hinglajia

[01] OBJECTIVE

PROBLEM_SCOPE

The primary objective of ExpenseFlow is to eliminate manual expense claim processing, reduce financial fraud, and accelerate employee reimbursements through intelligent automation. The system aims to: • Automate Document Extraction: Extract structured information from receipts and invoices using multimodal Vision AI. • Employee Verification: Verify employee identities and reimbursement eligibility against organizational records. • Dynamic Policy Enforcement: Enforce corporate spending policies using Retrieval-Augmented Generation (RAG) instead of hardcoded reimbursement limits. • Fraud Detection: Identify duplicate receipts, suspicious transactions, and abnormal spending patterns. • Autonomous Decision-Making: Orchestrate specialized AI agents to evaluate claims and make automated approval decisions. • Performance Optimization: Reduce processing latency and AI operational costs through asynchronous execution and token optimization. The ultimate goal is to transform traditional expense management into an intelligent, scalable, and autonomous financial workflow.

[02] OVERVIEW

SOLUTION_SUMMARY

ExpenseFlow is an enterprise-grade autonomous expense extraction and reimbursement platform designed to modernize how organizations process employee expense claims. Traditional expense management involves manual receipt verification, checking reimbursement policies, identifying duplicate submissions, and reviewing employee spending patterns. These processes are time-consuming, error-prone, and difficult to scale during high-volume submission periods. ExpenseFlow addresses these challenges through a LangGraph-powered multi-agent architecture consisting of four specialized AI agents: Document Agent, Verification Agent, Policy Agent, and Risk Agent. Employees can upload receipts, invoices, hotel bills, and travel documents in PDF and image formats. The Document Agent uses Google Gemini Vision AI to extract structured information, including merchant names, transaction dates, amounts, currencies, categories, and itemized expenses. The Verification Agent validates employee information and historical spending records against PostgreSQL. The Policy Agent retrieves relevant corporate reimbursement rules from a ChromaDB vector database using Retrieval-Augmented Generation (RAG), allowing administrators to dynamically manage policies without relying on hardcoded spending limits. The Risk Agent performs forensic analysis using duplicate detection, spending anomalies, unusual transaction patterns, and employee spending history to calculate a risk score between 0.0 and 1.0. Based on these evaluations, a Decision Approval Gate determines whether a claim should be approved, rejected, or escalated for finance administrator review. Approved claims proceed through the reimbursement workflow, which generates unique transaction references and records payout status. Beyond AI automation, ExpenseFlow incorporates a high-throughput asynchronous job queue, background worker pool, adaptive image compression, multi-model Gemini failover, and a five-layer token optimization architecture. The platform also includes separate employee and finance administrator workspaces, real-time notifications, interactive document previews, policy management, and detailed audit trails. Through its combination of autonomous agents, multimodal AI, vector-based policy retrieval, and asynchronous processing, ExpenseFlow demonstrates how complex enterprise financial workflows can be automated using modern AI engineering techniques.

ExpenseFlow – Autonomous AI-Powered Expense Management & Reimbursement System – secondary workflow and feature interface, built by Aryan Hinglajia

[03] TECH STACK

ARCHITECTURE

Frontend: Next.js 16, React 19, Tailwind CSS v4, Lucide Icons, HTML5 Canvas API. Backend: Python 3.11, FastAPI, Uvicorn, REST APIs, asyncio, ThreadPoolExecutor. AI & Multi-Agent Orchestration: LangGraph for agent workflow orchestration, Google Gemini Vision API for multimodal OCR and structured extraction, with cascading model failover. RAG & Vector Database: ChromaDB for persistent vector storage, Sentence Transformers (all-MiniLM-L6-v2) for semantic embeddings, and pypdf for PDF text extraction and document chunking. Database & Storage: PostgreSQL, psycopg2, Perceptual Difference Hashing (dHash), SHA-256 cryptographic hashing, and local disk storage with JSON fallback. Security: Bearer Token Authentication, Role-Based Access Control (RBAC), cryptographic file verification, and duplicate detection. Performance & Infrastructure: Asynchronous job queues, four-worker background processing pool, adaptive image compression, multi-model AI failover, rate limiting, Docker, and Docker Compose.

Next.jsTailwind CSSPythonFastAPIMulti-Agent AI SystemsGoogle Gemini Vision APIRetrieval-Augmented Generation (RAG)ChromaDBPostgreSQL

[04] ENGINEERING

EXECUTION

ExpenseFlow follows a modular, service-oriented architecture combining a Next.js frontend, FastAPI backend, LangGraph multi-agent orchestration, ChromaDB vector storage, and PostgreSQL persistence. 1. Presentation Layer - Next.js 16 with React 19 provides separate Employee and Finance Administrator dashboards. - Supports document uploads, claim tracking, policy management, approval workflows, and notifications. - HTML5 Canvas API performs client-side image compression before transmission. 2. API and Backend Layer - FastAPI handles document processing, employee verification, reimbursement workflows, and AI orchestration. - Asynchronous job endpoints return HTTP 202 Accepted with unique job identifiers. - Background workers process long-running document extraction tasks independently of HTTP requests. 3. AI and Agent Orchestration Layer - LangGraph manages a directed acyclic graph (DAG) of four specialized agents. - Document Agent: Performs OCR, structured extraction, and document hashing. - Verification Agent: Validates employee information and historical records. - Policy Agent: Retrieves applicable reimbursement policies using ChromaDB. - Risk Agent: Evaluates anomalies and generates forensic risk scores. - Decision Gate: Determines approval, rejection, or escalation. 4. RAG and Vector Database Layer - ChromaDB stores embedded corporate policy documents. - Sentence Transformers generate embeddings using all-MiniLM-L6-v2. - PDF ingestion extracts, chunks, and indexes policy content. - Semantic retrieval supplies relevant policy clauses and spending limits to the Policy Agent. 5. Data and Security Layer - PostgreSQL stores employee profiles, expense claims, policies, risk scores, and audit records. - SHA-256 and Perceptual Difference Hashing (dHash) provide multi-tier duplicate detection. - Bearer Token Authentication and Role-Based Access Control (RBAC) protect application resources. 6. Reimbursement and Monitoring Layer - Approved claims proceed through the reimbursement tool. - Unique transaction references and reimbursement statuses are generated. - Queue telemetry monitors processing jobs, throughput, failures, and latency. - Audit records maintain decision rationales for finance administrator review.

ExpenseFlow – Autonomous AI-Powered Expense Management & Reimbursement System – technical architecture and stack view, built by Aryan Hinglajia

[05] KEY FEATURES

CAPABILITIES
  • 01Multimodal AI Document Intelligence
  • 02Autonomous Multi-Agent Architecture
  • 03Dynamic RAG-Based Policy Engine
  • 04Three-Tier Forensic Fraud Detection
  • 05Asynchronous Processing & Worker Pool
  • 06AI Token Optimization
  • 07Enterprise Administration Dashboard
  • 08Performance Monitoring & Load Testing
ExpenseFlow – Autonomous AI-Powered Expense Management & Reimbursement System – engineering process and system module, built by Aryan Hinglajia
ExpenseFlow – Autonomous AI-Powered Expense Management & Reimbursement System – key product features and UI details, built by Aryan Hinglajia
RELATED//EXPLORE PROJECTS

MORE WORK

Take a look at other adjacent software engineering and system architecture builds.