Context
In a small shop, invoices pile up on paper and in the inbox. Checking them by hand takes time, and mistakes such as a duplicate invoice, a price rise or a missed due date easily go unnoticed. This experiment aims for something that the non-technical owner of a neighborhood haberdashery could actually use.
Approach
- Extraction. An LLM reads each invoice, as a PDF or a photo, and turns the supplier, date, lines, VAT and total into a structure validated with Pydantic.
- Checks. Deterministic rules spot duplicates, price changes against previous orders and invoices, VAT totals that do not add up and upcoming due dates, so the arithmetic never depends on the model.
- Agent. LangGraph orchestrates the tools: reading an invoice, querying the ledger in SQLite and listing upcoming payments. That is how it can answer questions such as “How much have I paid this supplier this quarter?” or “Which invoices are due this week?”
- Oversight. Nothing is saved until the owner has confirmed it.
- Interface. A simple React and TypeScript web app for uploading invoices, reviewing them and chatting with the agent.
Outcome
It is an ongoing experiment, built and tested only with fictitious sample invoices and no real business data. It serves as a playground for learning how to combine an LLM agent with deterministic checks.