A CrewAI multi-agent system for processing Indiana Toll Road statement PDFs.
This project uses three specialized AI agents to:
- Extract transaction data from toll statement PDFs
- Analyze and group transactions by date
- Generate filtered PDF statements with redacted non-matching transactions
cd toll_statement_crew
uv syncCreate a .env file with your LLM provider credentials:
cp .env.example .env
# Edit .env with your OpenAI credentialsOPENAI_API_KEY=sk-your-key-here
OPENAI_MODEL_NAME=gpt-4o-miniFirst install Azure support:
uv add "crewai[azure-ai-inference]"Then configure .env:
AZURE_API_KEY=your-azure-key
AZURE_API_BASE=https://your-resource.openai.azure.com
AZURE_API_VERSION=2025-01-01-preview
OPENAI_MODEL_NAME=azure/your-deployment-name# Run with default settings
uv run toll_statement_crew path/to/statement.pdf
# Specify output directory
uv run toll_statement_crew path/to/statement.pdf --output-dir ./output
# Additional options
uv run toll_statement_crew path/to/statement.pdf \
--output-dir ./output \
--redaction-color grey \
--text-color black \
--date-field posted \
--types "Toll charge,Away toll charge"| Option | Description | Default |
|---|---|---|
--output-dir |
Output directory for generated PDFs | ./output |
--redaction-color |
Color for redaction bars (black, grey) | black |
--text-color |
Color for updated totals (red, black) | red |
--no-bold |
Disable bold font for updated text | False |
--date-field |
Group by transaction or posted date | transaction |
--types |
Transaction types to include (comma-separated) | "Toll charge,Away toll charge" |
Extracts and parses all transaction data from toll statement PDFs using pdfplumber.
Groups transactions by date, filters by type, and calculates totals for each date.
Creates professionally redacted PDF statements with accurate totals using pypdf and reportlab.
toll_statement_crew/
├── pyproject.toml
├── .env
└── src/
└── toll_statement_crew/
├── main.py # CLI entry point
├── crew.py # Crew orchestration
├── core/
│ └── pdf_processor.py # Core PDF processing logic
├── tools/
│ ├── extraction_tools.py
│ ├── analysis_tools.py
│ └── generation_tools.py
└── config/
├── agents.yaml
└── tasks.yaml