Insolvency Invoice Assistant

AI-assisted invoice triage built with and for insolvency administrators (Sachwalter).

Role: Engineer & design partner Year: 2026 Domain: Desktop tool · AI extraction · Legal tech · Document processing

Problem

When an insolvency case opens, the administrator (Sachwalter) has to classify every incoming invoice. Was the underlying service delivered before or after the insolvency opening date? The answer determines whether the claim is an Insolvenzforderung (paid through the proceeding) or a Masseverbindlichkeit (must be paid from the estate). Doing this by hand across hundreds of PDFs, in multiple languages, with the relevant date often buried in line items, is slow and error-prone. Getting it wrong has real legal consequences.

Constraints

  • Legal decisions cannot be automated away. The tool must speed up the human, not replace them. Every classification is reviewed and confirmed by the Sachwalter.
  • Invoices arrive in German, English and Polish, sometimes as clean PDFs, sometimes as scans.
  • The legally relevant date is the Leistungsdatum (service date), which often takes priority over the invoice date and is not always cleanly labelled.
  • Edge case: services spanning the insolvency opening date need a pro-rata split, not a binary answer.
  • The data is sensitive client material. The tool runs on the team's own machine, not as a third-party SaaS.
  • Built in a tight feedback loop with one Sachwalter office as design partner, with the goal of generalising to other offices doing the same workflow.

Architecture

  • PyQt desktop application. Runs locally on the user's machine, no cloud hosting required.
  • PDF text extraction pipeline (pdfplumber / PyMuPDF) with OCR fallback (Tesseract) for scanned documents.
  • Claude API for structured extraction of dates, amounts, vendor and document type, across the languages the team actually receives.
  • Classification engine that applies the legal rule (before / after / spanning the insolvency opening date) on top of the extracted facts, including pro-rata split for edge cases.
  • Review-and-confirm UI. Every result is shown to the Sachwalter to approve, override, or split. Nothing is filed automatically.
  • Renames and re-organises the original PDFs so the on-disk archive matches the decisions.
  • CSV export so results plug into the team's existing downstream workflow.

Outcome

  • In active production use with a Sachwalter team, with each iteration shaped by their feedback.
  • Replaces a manual read-classify-rename process across hundreds of invoices per case.
  • AI extraction handles the tedious read-and-structure step, leaving the human to focus on the cases that actually need judgment.
  • Designed from day one to generalise. Other Sachwalter offices doing the same workflow are welcome to reach out.

Stack

Python, PyQt · Anthropic Claude API · pdfplumber, PyMuPDF, Tesseract OCR · Local desktop deployment

Why semi-automatic, on purpose

The interesting design choice in this tool is what it deliberately does not do. The legal classification of an invoice in an insolvency case is a decision the Sachwalter is professionally and legally responsible for. It is not a decision an AI should be making. So the tool is structured around that boundary. AI does the tedious part (read the PDF, find the dates, identify the vendor, recognise the document type, propose a category), and the human does the part that has to stay human (confirm, override, or split).

That split is also why the tool is useful in practice. Pure automation would be unsafe, and pure manual review is what the team is already doing. The value sits in the middle. The system collects and structures the information so the Sachwalter spends their time on the decision, not on data entry.

Built with a real client, designed to generalise

This started as a focused build for one Sachwalter office, with weekly feedback driving the next iteration. Which categories the team actually uses, which edge cases keep showing up, what the rename convention should be, where the AI is over-confident and where it is under-confident. That close collaboration is what makes the tool fit the workflow instead of fighting it.

The same workflow exists in other Sachwalter offices. If you handle insolvency cases and recognise this problem (invoices piling up, manual classification, the Leistungsdatum question, the pro-rata edge cases), I would be glad to talk about adapting this tool for your team.