The challenge
Expense reimbursement is repetitive, spread across email and spreadsheets, and frequently loses context between submission and approval.
My approach
Coordinate specialized AI agents for receipt OCR and validation, policy-aware reimbursement decisions, anomaly detection, admin review, and full audit logging across the expense-review lifecycle.
The solution
A multi-agent workflow where specialized agents handle ingestion, policy validation, routing, anomaly detection, and audit — with a clean review UI on top.
Key features
- Receipt ingestion from email attachments via the Gmail API.
- Policy validation agent with configurable rule sets.
- Approval routing with structured status tracking.
- Anomaly detection surfaced in the reviewer queue.
- Structured audit trail persisted in Firestore.
Technical decisions
- Firebase + Firestore for auth, storage, and structured records without standing up a separate backend.
- Vector database for retrieval when agents need contextual policy lookups.
- React + Vite for a responsive reviewer UI.
Architecture
01Presentation
Web UI for employees and admins.
02Business logic
Traditional backend workflow and validation.
03Agent layer
Expense, Document, Email, and Orchestrator agents coordinate OCR, policy checks, notifications, and routing.
04Data access
CRUD abstraction for Firestore, Cloud Storage, Gmail, and a vector database.
- Firestore
- Cloud Storage
- Gmail API
- Vector Database
Outcome
Automates receipt processing, policy rules (R1–R5), anomaly flagging, and admin approve/reject workflows with structured audit records.
Lessons learned
- A MAESTRO-aligned red-team suite (29 tests across 7 layers and 4 agents) surfaced 5 vulnerabilities, primarily RBAC-related, with documented mitigation recommendations.
- Policy retrieval via a vector database needs safeguard grounding to keep agent decisions auditable.