← ProjectsNovember 1, 2026
$

Agent Pipelines for Enterprise Invoices

image
01 / Overview As a Solution Architect, I design and build multi-agent LLM workflows for enterprise accounts payable teams. Each pipeline takes incoming supplier invoices, works out what they are, extracts and codes every line, checks the result against the customer's own data, and either posts it straight into the ERP or routes it to a clear, explainable exception. My guiding rule is simple: the parts that need judgement go to the model, the parts that need exact numbers go to code. Client names, internal systems, and prompt text are left out on purpose. What follows is the shape of the work, not its confidential details.
Delivery
0
enterprise invoice pipelines designed and built, from discovery to production or pilot
Localization
0+
tax-code rules in a localized lookup for a multi-country rollout
Design principle
0
calculations left to the model: the numbers are handled by deterministic logic
02 / Architecture
01
Classify and isolate
Sort invoices, credit notes, and reminders, and find the real invoice inside long, multi-document files.
02
Extract and validate
Agents extract the data, then confirm it against trusted customer data instead of guessing.
03
Check, then post
Deterministic checks confirm the numbers. Compliant invoices post to the ERP; the rest get a clear exception.
03 / Engagements
rebuild / production
From broken to working
For an international contractor, the pipeline was not producing usable results when I took it over, and it cost 90% more per document. I rebuilt the 15-step workflow agent by agent, rewrote the prompts, merged PO and non-PO flows, and standardised the data contracts until it worked end to end.
touchless / sap
Touchless settlements
For a global fresh-produce exporter, I built a pipeline that reads structured e-invoices, pulls the matching settlement from SAP in real time, validates it against agreed business rules, and posts it with no add-on or middleware.
rollout / multi-country
A three-country pilot
For a building-materials group, I adapted a proven template to three new countries: language, tax treatment, a 2,300+ rule tax lookup, and routing that can never send an invoice to the wrong country.
template / reuse
PO matching as a template
Moved a full purchase-order matching chain (detection, retrieval, line and goods-receipt matching, finalisation) from one customer into a reusable company template driven by context variables.
ops / root cause
Daily root-cause analysis
Traced failing invoices through each agent, found the broken logic, simulated prompt fixes, and shipped them to test, every day.
automation / claude
Automating my own work
Packaged that daily investigation into reusable Claude skills and plugins, turning a manual analysis into a repeatable process.
international contractor — before / afterlive
$status --before
→pipeline: not producing usable results
→cost per document: 90% higher than today
$rebuild --agent-by-agent --prompts --data-contracts
✓15 steps standardised · PO and non-PO flows merged
✓pipeline: working end to end in production
✓cost per document: 90% premium removed
04 / Patterns From "LLM guesses" to "LLM validates". Wherever trusted data exists, the model confirms its answer against it rather than inventing one. Keep the numbers out of the model. The model handles what needs judgement; calculations and checks run as deterministic logic. The same input always gives the same, checkable output. Use a model only where judgement is needed. When the answer is already known, simple deterministic logic is cheaper and more reliable than asking an LLM. Rules with traceable error codes. Business requirements become a structured rule set that separates warnings from posting blockers, so every exception explains itself.
invoice pipeline — runlive
$pipeline run --document inbound-0427.pdf
→multi-page file received · invoice located
✓values confirmed against trusted data
✓lines: 11 candidates extracted · coding resolved
✓checks: totals consistent
✓rules: 0 blockers · 1 warning recorded
✓posted to ERP · exception path not needed
05 / Beyond the build Alongside the technical work, I wrote solution designs, ran delivery in Jira, prepared milestone decks and decision requests, and worked directly with customer finance and SAP teams. I also fixed a reporting bug that was understating accuracy metrics, drove the feedback loop with an invoice-network partner on per-line tax codes, and helped recover a delayed go-live. The cost side of this work, moving these pipelines to smaller and cheaper models, has its own case study: Smaller Models, Better Prompts. 06 / Stack
LLM agentsMulti-agent orchestrationPrompt engineeringJSON Schema outputsTypeScriptJSONataXSLTOpenSearchSAP S/4HANA
SAP ECCERP integrationSFTPPythonNode.jsClaude skillsJiraConfluence

Related projects

Smaller Models, Better Prompts

Cutting LLM cost per document by around 80% in an enterprise document-AI pipeline, by redesigning the prompts so smaller, cheaper models could match or beat the large ones.