Predictive Collections Agent
Agent Description:
The Predictive Collections Agent automates accounts receivable follow-ups by analyzing historical invoice payment patterns and classifying customers into payment risk categories. It proactively triggers reminders or escalation workflows based on the likelihood of late payment, helping finance teams improve cash flow and reduce collection delays.
- Purpose: To predict payment risk based on historical invoice behavior and initiate proactive collection actions (reminders or escalations).
- Components:
- A document parser to extract payment data from ERP or invoice PDFs.
- A risk predictor to calculate lateness metrics and classify customers
- An action engine that determines and initiates the appropriate follow-up.
- Parsing PDFs or ERP exports to extract payment records.
- Calculating average payment delay and late invoice ratios per customer.
- Risk-based classification into Low, Medium, or High categories.
- Triggering automatic reminders or flagging for manual escalation.
- Generating structured outputs for integration into collections systems.
- Google VertexNote: To learn more about the LLM and to modify its behavior, refer to the Configuring LLM settings section.
Sub-Agents
1. Late Payment Predictor Agent
- Role:Data Extractor.
- Scope:Processes uploaded PDFs (invoices or ERP exports) and structures invoice-level data for risk analysis.
- Description: This sub-agent reads documents and extracts:
-
Customer ID, Invoice ID, Invoice Date, Due Date, Paid Date, and Amount.
-
Calculates Days Late = Paid Date - Due Date.
-
For each customer:
-
AvgDaysLate
-
Late Ratio = (Number of Late Invoices / Total Invoices) × 100%
-
-
- LLM Used: Google Vertex (inherits from parent).
- Tool Used: MCP Client Tool
2. Collection Action Agent
- Role:Action Taker.
- Scope:Analyzes customer metrics and performs rule-based decision-making for collection actions.
- Description: This sub-agent receives output from the Late Payment
Predictor and classifies customers:
-
High Risk: AvgDaysLate > 7 OR Late Ratio > 50%
-
Medium Risk: AvgDaysLate 4–7 OR Late Ratio 20–50%
-
Low Risk: AvgDaysLate < 4 AND Late Ratio < 20%
-
Based on the risk:
-
Low/Medium → Reminder Sent
-
High → Escalated
-
-
- LLM Used: Google Vertex (inherits from parent).
- MCP Client Tool – Used by the Late Payment Predictor to extract and structure invoice payment records from PDFs or ERP exports.
- The Late Payment Predictor Agent ingests invoice payment records from PDF or ERP exports.
- It extracts and computes key metrics:
- Days Late per invoice
- Customer-level average delay
- Late Ratio (frequency of late payments)
- The output is passed to the Collection Action Agent.
- The Collection Action Agent classifies each customer into:
- High Risk → Escalation triggered with follow-up note
- Medium/Low Risk → Reminder sent
- The final output includes:
- Risk level
- Action taken (Reminder or Escalated)
- A note or message tailored to the situation
- Calculate the late payment ratio for CUST001.
- Which customers had both AvgDaysLate > 7 and Late Ratio > 50%, and what message was sent?