Inspiration

Companies lose money quietly, every month, through contracts no one is actively re-checking. A discount that was only supposed to apply for the first year keeps getting billed in year two. A 10% annual escalation clause sits in a PDF, unenforced, because no system ever reads the contract and compares it to what's actually being invoiced. None of this shows up as a single dramatic failure — it shows up as a slow, invisible drain on revenue that finance teams only catch during an audit, months or years later.

We wanted to build something that closes that gap automatically: read the contract, check it against the invoice, and the moment something doesn't match, put it in front of a human who can fix it — with the math already done for them.

UiPath's Maestro Case felt like the right tool the moment we understood it. Most of these contracts are fine. It's the exceptions — the ones with a missed clause — that matter, and Maestro Case is built exactly for that: dynamic, exception-driven case management rather than a rigid linear pipeline.

What it does

RevSure Sentinel AI turns every contract into a live case that moves through four stages:

  1. Intake — A Contract Analysis Agent reads the contract and extracts every commercial term that matters: base price, billing frequency, discount terms and expiry dates, escalation rate and effective date, renewal terms and notice periods. It returns structured JSON with per-field confidence scores, and it's built to never guess — missing fields come back empty rather than invented.
  2. Compliance Check — A Pricing Compliance Agent, running on Claude Sonnet 4.6, takes those extracted terms and compares them against the actual invoice. It checks discount expiry against the invoice date, checks whether a due escalation was applied, calculates the expected amount step by step, and flags the gap.
  3. Human Review — A Recommendation Agent turns the violation into a clear corrective-action report — urgency level, estimated annual impact, recommended next steps — and hands it to a Finance Manager for the final call. The system never auto-corrects billing; it surfaces the problem and the fix, and a person decides.
  4. Resolution — The case closes with the outcome logged.

In our demo scenario, a contract billing ₹100,000/month has a first-year 10% discount that expired December 31, 2025, and a 10% annual escalation that kicked in January 1, 2026. The February 2026 invoice still bills the old discounted rate of ₹90,000 — missing both the discount expiry and the escalation. RevSure catches both issues and calculates the correct amount: ₹1,10,000. That's ₹20,000/month, or ₹2,40,000/year, in silent leakage — on a single contract. At a few hundred contracts, that's crore-scale money nobody was watching.

How we built it

Everything was built live, in-browser, in UiPath Studio Web, on UiPath Automation Cloud — Maestro Case had launched only days before the hackathon, so a meaningful part of the build was simply exploring a brand-new product with no finished documentation yet.

The process for each agent was the same: describe the agent's job in plain English to Agent Builder's Autopilot, let it generate a first-pass system prompt and schema, then iteratively refine through conversational rounds — adding fields like per-field confidence scores, party names, and a flaggedForReview boolean as we discovered what the downstream agents actually needed.

We built and tested each agent standalone before wiring it into the case plan, using two realistic sample documents we generated ourselves — a contract PDF and an invoice PDF — deliberately engineered to contain the exact discrepancy our demo scenario describes. Once each agent passed standalone testing, we returned to the Case plan, added it as a task inside its stage, and ran a full debug pass across all four stages before moving to the next one.

We used Claude (Anthropic) as a build partner throughout — architecting the stage structure, authoring every agent prompt and schema, generating the test PDFs, and debugging configuration issues as they came up, since there often wasn't existing documentation to fall back on.

Challenges we ran into

  • The product was new enough that the UI itself was the documentation. There was no shortcut around clicking through Studio Web and confirming, screen by screen, what Maestro Case actually let us configure versus what we'd assumed from the product announcement.
  • Telling Maestro BPMN apart from Maestro Case. Early on we had a leftover BPMN process sitting in the solution that wasn't actually part of our case flow — sorting out which project type did what cost real time before the architecture settled.
  • Runtime data flow between stages wasn't always what we expected, and getting an agent's output correctly available as the next stage's input required confirming the mechanics directly rather than assuming they worked like a typical workflow variable.
  • Working solo, around a full course load, against a hard deadline — which meant ruthlessly cutting scope once the core 4-stage, 3-agent flow worked end-to-end, rather than chasing additional agents or features that wouldn't move the judging criteria.

What we learned

That "exception-heavy" isn't just a buzzword for this kind of case management — it's the actual design principle that should shape which stage gets a human in the loop and which gets an agent. We also learned a lot about how to scope an agent's job tightly: the first version of our Contract Analysis Agent tried to do too much, and it got more reliable once we narrowed what each field was responsible for and added explicit confidence scoring instead of letting the agent quietly guess.

What's next for RevSure Sentinel AI

  • Wiring in live PDF ingestion so contracts and invoices can be uploaded directly rather than using prepared sample data for the demo
  • A Renewal Risk Agent to flag upcoming or missed auto-renewal notice periods as their own case type
  • Portfolio-level reporting across all cases, so a Finance team can see total leakage recovered across every contract, not just one case at a time
  • Real connector integration so a confirmed violation can trigger an actual corrected invoice in the billing system, with the human approval step staying firmly in place

Built With

  • claude-sonnet-4-6
  • gpt-5.4
  • python
  • reportlab
  • uipath-agent-builder
  • uipath-automation-cloud
  • uipath-maestro-case
  • uipath-studio-web
Share this project:

Updates

Submission history