Labs experiment
Document intelligence: turns invoices and contracts into clean, validated data
An extraction pipeline that turns invoices and contracts into clean, validated data. Documents are classified by type, the fields that matter are extracted, totals, dates and formats are validated, and anything uncertain goes to a person before the rows are exported to the ERP.
Where this pattern fits
- Finance teams keying invoices into an ERP by hand
- Operations teams pulling terms out of contracts
- Any document flow where a wrong number is expensive
- Claude
- Gemini
- FastAPI
- PostgreSQL
How it works
Select any node to see what it does.
- 00.00upload42 invoices received
- 00.36classifier40 invoices, 2 credit notes
- 01.12validator39 passed, 3 sent to human review
- 01.30export39 rows written to the ERP
The architecture, step by step
Each part of the diagram, in the order a run moves through it.
- PDF uploadWhere every run starts.
- Extraction pipelineMoves each document from upload to clean data.
- ClassifierSorts documents by type.
- ExtractorPulls out the fields that matter.
- ValidatorChecks totals, dates and formats.
- Review queueSends anything uncertain to a person.
- ToolsThe agents act through the OCR, schema store and ERP export.
How it is built
The design choices that make the pattern hold up with real users.
- OCR plus Claude and Gemini for classification and extraction
- A schema store that defines every field and the checks it must pass
- A human review queue for anything the validator is unsure about
- FastAPI and PostgreSQL behind a direct ERP export
Related
Crewline
A platform that provisions digital employees.
Agentic Workflow
A multi-agent system that runs one business process end to end. From $5,000, 4 to 6 weeks.
Voice receptionist
An AI phone agent that answers, books and hands off to a human.
Knowledge assistant
Answers from company documents, with every claim cited.
CRM tool server
A Model Context Protocol server that gives Claude safe tools for a CRM.