Skip to content

Totbits-Solutions/llama-invoice-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

llama-invoice-agent

An AI-powered invoice processing agent built with LlamaIndex Workflows and event-driven architecture.

The Problem

Processing invoices is tedious. You receive a PDF, manually read the supplier name, tax ID, line items, totals — then type it all into your ERP. Every. Single. Time.

This project replaces that manual process with an AI agent that reads the invoice, understands its structure, extracts every field, and syncs the data to your ERP.

Why Event-Driven AI Agents

Most AI projects start as linear scripts: call an API, parse the result, save it. It works until it doesn't — then you're debugging a 200-line function with no visibility into what went wrong.

This project uses LlamaIndex Workflows to build the agent as a series of small, independent steps connected through typed events. Each step does one thing, emits an event, and the next step picks it up.

This gives us:

  • Observability — Every step is traced. You see exactly what happened, what data flowed between steps, and where things failed. Plug in Arize Phoenix or any OpenTelemetry backend and get a full visual timeline.
  • Resilience — Steps fail independently. A parsing failure doesn't crash the whole pipeline — it returns a clean error response while the rest of the system stays healthy.
  • Extensibility — Adding a new step (validation, human approval, ERP sync, notification) means writing one function that listens for an event and emits another. No refactoring existing code.
  • Testability — Each step can be tested in isolation by sending it a mock event and asserting the output event.

Current Status

POC phase — The core pipeline works end-to-end: upload a PDF invoice, get back structured JSON with all fields extracted.

See server/README.md for setup and running instructions.

About

AI-powered invoice processing agent that extracts structured data from PDFs using LlamaExtract and syncs them to your ERP. Built with LlamaIndex Workflows

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors