ClearDue: Turn blocked invoices into verified next actions

A “done” delivery does not always mean a customer has accepted the work. When that gap is missed, invoices become blocked, finance investigates across disconnected systems, and teams lose time deciding what to do next.

ClearDue is an evidence-grounded payment-blocker agent. It reads a bounded snapshot from Gmail, Jira, and Razorpay, identifies the condition preventing payment, and proposes the smallest justified remediation.

For the demo scenario:

  • Jira shows the migration work as delivered.
  • Gmail contains evidence that the customer acceptance test failed.
  • Razorpay confirms the invoice and amount.
  • ClearDue keeps the invoice blocked, explains why, and proposes only the approved remediation.
  • After approval, it creates a Jira remediation, prepares the customer communication, and records a namespaced Razorpay case note.
  • Each effect is read back and verified.
  • Replaying the same event produces zero duplicate effects.
  • A simulated lost Jira response is reconciled without creating a second issue.

The agent never receives provider credentials or write tools. Gemini performs one structured reasoning call over the bounded evidence bundle. Deterministic code validates evidence spans, condition IDs, targets, approvals, idempotency, reconciliation, verification, and the READY_FOR_PAYMENT gate.

We built ClearDue because payment operations are a real cross-functional problem: the truth is distributed across customer communication, delivery tracking, and billing systems. The main challenge was making the agent useful while keeping business-critical decisions deterministic and auditable.

The result is a workflow that answers four questions clearly:

  1. What is blocking payment?
  2. Why do we know?
  3. What is the smallest action that clears it?
  4. What actually changed after execution?

Built With

  • fastapi
  • gemini-api
  • gmail-api
  • jira-cloud-api
  • pydantic
  • python
  • razorpay-api
  • sqlite
Share this project:

Updates

Submission history