Live demo: Streamlit app · Stack: Python, Neo4j, Pydantic, Gemini, Streamlit
Enterprise-grade financial ingestion and governance engine. Ingests corporate transaction feeds, enforces Pydantic validation, cross-references anomalies against a Neo4j knowledge graph (GraphRAG), and produces typed executive risk briefings via Gemini.
Distinguishes clerical anomalies (routine data-entry mistakes) from active fraud risks (unmapped billing injection attacks).
[ Raw Invoices JSON ]
│
▼
┌──────────────────────────┐
│ 1. Ingestion Engine │ ──► Validated clean ledger
│ (Pydantic validation) │
└──────────────────────────┘
│ (anomalies)
▼
┌──────────────────────────┐
│ 2. Quarantine Registry │ ──► quarantined_invoices.json
└──────────────────────────┘
│
▼
┌──────────────────────────┐
│ 3. Neo4j GraphRAG │ ──► Vendor/contract context
└──────────────────────────┘
│
▼
┌──────────────────────────┐
│ 4. Gemini AI Agent │ ──► Typed executive briefing
└──────────────────────────┘
│
▼
┌──────────────────────────┐
│ 5. Streamlit Dashboard │ ──► Live audit telemetry
└──────────────────────────┘
- Ingestion — Pydantic-gated invoice parsing; valid rows → clean ledger, failures → quarantine.
- GraphRAG (Neo4j) — Maps quarantined entities to contract nodes, vendor risk scores, and rogue-entity detection.
- AI Agent (Gemini) — Low-temperature, schema-constrained executive briefings (risk score, fraud exposure, remediation steps).
- Dashboard (Streamlit) — Cached telemetry UI with async audit triggers.
AEVAR/
├── config/settings.py # Paths & constants
├── data/{raw,processed,quarantine}/
├── src/
│ ├── ingestion/ # Parser + Pydantic schemas
│ ├── analytics/ # Neo4j graph store + reporter
│ ├── agents/auditor.py # Gemini structured-output agent
│ └── app/dashboard.py # Streamlit UI
├── seed.py # Neo4j seed data
├── requirements.txt
└── .env.example
- Python 3.11+
- Neo4j (local or Aura)
- Google Gemini API key
git clone https://github.com/hansitvarshney/AEVAR.git
cd AEVAR
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # add GEMINI_API_KEY + Neo4j credentials
python seed.py # populate knowledge graph
streamlit run src/app/dashboard.pyThe auditor agent returns a strictly typed ExecutiveBriefingSchema:
class ExecutiveBriefingSchema(BaseModel):
risk_assessment_score: float # 0.0 (safe) → 1.0 (critical)
executive_summary: str
fraud_exposure_usd: float
critical_action_items: list[str]
requires_immediate_freeze: boolMIT — see LICENSE.