Connic

Invoice Processor

Extract structured data from invoices with AI, validate totals via a deterministic tool agent, and output auditable JSON with retry support.

connic init my-project --templates=invoice

Overview

A sequential pipeline that extracts structured data from raw invoice text or images using an LLM agent with calculator tools, then validates totals with a deterministic tool agent at zero token cost. Middleware adds audit trails with request IDs and cost tracking. Supports retry on transient failures and parallel processing of multiple invoices.

Use cases

AP automation

Process incoming supplier invoices, extract line items and totals, and validate before posting to ERP.

Receipt ingestion

Parse receipts from photos or PDFs into structured data for expense reporting and reconciliation.

Invoice auditing

Batch-process invoices to flag discrepancies between stated and calculated totals with full audit trail.

Architecture

Webhook / S3 / Email
invoice-pipeline
invoice-extractor
invoice-validator

Scaffolded project structure

Running connic init my-project --templates=invoice creates this file tree.

invoice/
  agents/
    invoice-extractor.yaml
    invoice-validator.yaml
    invoice-pipeline.yaml
  tools/
    invoice_tools.py
  middleware/
    invoice-extractor.py
  schemas/
    invoice.json
  requirements.txt
  README.md

Get started

Install the template, create a Connic project, and deploy. Choose Git (automatic on push) or CLI (works with any provider).

Prerequisites

  • Python 3.10+
  • A Connic account (create a project first)
  • API key for your LLM provider (e.g. Gemini, OpenAI) to add in project variables
Create project
1

Install and scaffold

Install the SDK and create a project from this template.

terminal
pip install connic-composer-sdk
connic init my-project --templates=invoice

Then cd my-project

2

Deploy

Pick your deployment method. Git auto-deploys on push; CLI works with GitLab, Bitbucket, or no Git.

Git integration

  1. In Connic: Project Settings → Git Repository, connect your GitHub repo
  2. Settings → Environments: map branch (e.g. main) to Production
  3. Push your scaffolded project to that repo
terminal
git add .
git commit -m "Add Invoice Processor template"
git push origin main

CLI deploy

  1. In Connic: Project Settings → CLI, create an API key and copy project ID
  2. Run connic login in your project folder
  3. connic test to try with hot-reload, or connic deploy for production
terminal
connic login
connic test    # Ephemeral dev env with hot-reload
connic deploy # Deploy to production
3

Connect and configure

Add an HTTP Webhook (sync) connector for real-time invoice processing. POST invoice data to the webhook URL and receive the structured extraction result in the response. Add your LLM provider API key in Project Settings → LLM Provider API Keys.

Template source

Browse the full template, contribute improvements, or fork for your own use.

connic-org/connic-awesome-agents/tree/main/invoice