Inspiration

Small teams drown in invoice reconciliation, boring, error-prone bookkeeping that eats hours a human could spend on real work. Most "AI agents" are just chatbots with recall: they can talk about your invoices but never actually reconcile them. We wanted an agent that does the task end-to-end, stops to ask before touching money, and can prove every decision it made.

What it does

Grand Micromanager is an autonomous invoice-reconciliation worker, not a chatbot. Every Monday it wakes on a cron, pulls PDF invoices from Gmail, reads them with Gemini, cross-checks every line item against your bank statement, categorizes against your chart of accounts, and resolves or escalates discrepancies. It catches duplicate charges, wrong amounts, wrong vendors, and date anomalies, recovering real dollars. It sends a digest, but the one thing it never does alone is touch money: disputes pause for your explicit approval. And because it keeps a full audit trail, you can ask it "what did you flag this week?" and get a grounded answer.

How we built it

Google ADK (Python) with a supervisor + 7 specialist agents (intake, extraction, verification, resolution, categorization, reconciliation, reporting) on Cloud Run. Gemini 3.5 Flash on Vertex AI does multimodal extraction at temperature 0.0 with native structured-output enforcement. Verification uses Chain-of-Verification to independently cross-check the bank CSV. Firestore is the shared memory + audit trail. Cloud Scheduler → Pub/Sub → Cloud Run is the trigger spine, with a dead-letter queue, idempotency, checkpointing, retry/backoff/circuit-breaker, and a two-tier human-in-the-loop gate. Secrets live in Secret Manager; PII is redacted before it reaches the model.

Challenges we ran into

Gemini 3.5 wasn't on the regional Vertex endpoint. It 404'd on 9 regions before we found the global endpoint. ADK 2.7 is early-stage: callbacks are invoked by keyword, so a wrong parameter name crashes silently in production. We caught it by reading the framework source. Making "resolved" trustworthy meant forcing independent re-verification, because the agent would otherwise rubber-stamp its own draft. And a planted $1M decoy line forced our null-not-guess schema design.

Accomplishments that we're proud of

The $2,400 duplicate-payment catch: the agent found two identical charges for one invoice, disputed it, and recovered the money only after the human clicked "approve." A closed loop that re-verifies before resolving. It escalated a vendor-typo fix rather than self-certify. 100% extraction accuracy, 5/5 injected discrepancies caught, zero hallucinated entities, zero false positives.

What we learned

"Agentic" isn't a chatbot with memory, it's a worker with a verification loop. Deterministic invariants belong in code, not prompts, when money is involved. temp=0.0 is near-deterministic, not guaranteed. Reading the framework source beats trusting the docs. And honesty in an eval beats a forced 5/5: we documented the one miss instead of fudging it.

What's next for Grand Micromanager

A2A federation to reconcile across org boundaries, a 50-invoice scale eval, native MCP exposure, and a self-serve portal for approving disputes from Slack or mobile. The goal: graduate from weekly invoices to a full multi-ledger close.

Built With

Share this project:

Updates

posted an update —

Firestore output in text. Will reference a screenshot in the README:

firestore project=reconciler-mohammed-emad db=(default)

run demo_mm_1788214351: status=completed job=weekly_reconcile completed=2 failed=0 invoice duplicate_invoice_sample: status=completed stages=['intake', 'extraction', 'verification', 'resolution', 'categorization', 'reconciliation'] verdict=discrepancy total=2400.0 invariants_passed=True provenance: ---- duplicate_invoice_sample ---- discrepancy : duplicate_payment lane : dispute rule fired : fuzzy_match(vendor, bank_row) @ 1.0 memory : vendor:Acme Cloud Services LLC, prior_invoice:INV-2026-0421 rationale : Two bank charges of $2400.00 were identified on 2026-08-18 and 2026-08-20 for invoice INV-2026-0421, indicating a duplicate payment. A dispute draft has been prepared to recover the duplicate amount of $2400.00. verification : CoVe — 4 independent check(s) Q1: Does any bank row description contain the invoice vendor name 'Acme Cloud Services LLC' and invoice number 'INV-2026-0421'? A1: Yes, two bank rows contain 'ACME CLOUD SERVICES LLC' and 'INV-2026-0421' (on 2026-08-18 and 2026-08-20). Q2: Does the bank row amount equal the invoice total of 2400.00? A2: Yes, both matching bank rows have an amount of -2400.00, which corresponds to a positive magnitude of 2400.00. Q3: Does the date of the first matching bank row match the invoice date of 2026-08-18? A3: Yes, the bank row on 2026-08-18 matches the invoice date of 2026-08-18. Q4: Is the matched bank row unique (no duplicate-payment)? A4: No, there is a duplicate charge of -2400.00 on 2026-08-20 with the exact same description. recheck : (not run — no correction was applied) human : pending approval recorded : 2026-08-31T22:13:13.848525+00:00 invoice invoice_sample: status=completed stages=['intake', 'extraction', 'verification', 'resolution', 'categorization', 'reconciliation'] verdict=matched total=467.5 invariants_passed=True

run pubsub_21638318168720367: status=completed job=weekly_reconcile completed=0 failed=0

run pubsub_21637405188902605: status=completed job=weekly_reconcile completed=0 failed=0

run fault_inject_demo_clean: status=completed job=weekly_reconcile completed=1 failed=0 invoice invoice_sample: status=completed stages=['intake', 'extraction', 'verification', 'resolution', 'categorization', 'reconciliation'] verdict=matched total=467.5 invariants_passed=True

run fault_inject_demo: status=completed_with_errors job=weekly_reconcile completed=0 failed=1 invoice invoice_sample: status=failed stages=['intake', 'extraction']

shared epistemic memory: [prior_invoice] INV-2026-0421: {'resolved': True, 'total': 2400.0, 'vendor': 'Acme Cloud Services LLC'} [vendor] Nimbus Cloud Solutions LLC: {'account_codes': ['5000', '6000'], 'invoice_numbers_seen': ['INV-2026-0847']} [vendor] Stellar Analytics Ltd: {'account_codes': ['5000'], 'invoice_numbers_seen': ['INV-2026-0531']} [vendor] Acme Cloud Services LLC: {'approved_invoices': ['INV-2026-0421'], 'account_codes': ['5000', '5010', '6000'], 'invoice_numbers_seen': ['INV-2026-0421', 'INV-2026-0417']} [vendor] Quantum Robotics Corp: {'account_codes': ['9000'], 'invoice_numbers_seen': ['INV-2026-0642']}

show_firestore OK

Log in or sign up for Devpost to join the conversation.

Submission history