A lightweight FNOL (First Notice of Loss) claims agent for the Synapx assessment. It reads TXT or text-based PDF FNOL documents, extracts key fields, identifies missing mandatory data, classifies the claim, and returns a routing decision as JSON.
- Extracts policy, incident, involved-party, asset, estimate, attachment, and claim-type fields.
- Detects missing mandatory fields.
- Routes claims using the assessment rules:
- Missing mandatory fields ->
Manual Review - Fraud indicators (
fraud,inconsistent,staged) ->Investigation Flag - Injury claim type ->
Specialist Queue - Estimated damage below
25,000->Fast-track - Otherwise ->
Standard Review
- Missing mandatory fields ->
- Explains the routing decision in plain English.
When more than one rule could match, the agent prioritizes missing mandatory data first, then investigation keywords, then injury, then fast-track.
.
├── README.md
├── pyproject.toml
├── samples/
│ ├── fnol_fast_track.txt
│ ├── fnol_injury.txt
│ ├── fnol_investigation.txt
│ └── fnol_manual_review.txt
├── src/fnol_agent/
│ ├── cli.py
│ ├── extractors.py
│ ├── models.py
│ ├── parser.py
│ ├── pipeline.py
│ └── router.py
└── tests/
└── test_pipeline.py
Requires Python 3.9 or newer.
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Process one sample:
fnol-agent samples/fnol_fast_track.txt --prettyProcess multiple documents:
fnol-agent samples/*.txt --prettyRun without installing:
PYTHONPATH=src python3 -m fnol_agent.cli samples/fnol_fast_track.txt --pretty{
"extractedFields": {
"policyNumber": "POL-100245",
"policyholderName": "Aisha Khan",
"effectiveDates": "2026-01-01 to 2026-12-31",
"incidentDate": "2026-04-18",
"incidentTime": "09:35",
"incidentLocation": "Dubai Marina, Dubai",
"description": "Rear bumper and parking sensor damaged in a low-speed collision.",
"claimant": "Aisha Khan",
"thirdParties": "Omar Ali, driver of vehicle DXB-77821",
"contactDetails": "aisha.khan@example.com, +971501234567",
"assetType": "Private vehicle",
"assetId": "VIN-1HGBH41JXMN109186",
"estimatedDamage": 8750.0,
"claimType": "Motor",
"attachments": ["police report", "damage photos"],
"initialEstimate": 8750.0
},
"missingFields": [],
"recommendedRoute": "Fast-track",
"reasoning": "Estimated damage is below 25,000 and all mandatory fields are present.",
"sourceDocument": "samples/fnol_fast_track.txt"
}PYTHONPATH=src python3 -m unittest discover -s tests- PDF support is intended for text-based PDFs. Scanned PDFs need OCR before processing.
- The extractor is intentionally deterministic and dependency-free so the project is easy to run and review.
- The parser is regex-based and works best with label/value FNOL documents, which matches the dummy assessment format.