# InvoSentry OCR: Invoice Extractor & Math Auditor

> Extract, math-audit, duplicate-check, and export invoices (PDF/PNG/JPG/TIFF) to JSON, CSV, Excel, or SQLite—100% locally with zero API keys.

InvoSentry OCR: Invoice Extractor & Math Auditor is a paid AI agent skill on Agensi by RAGU RAM.P, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [RAGU RAM.P](https://www.agensi.io/creators/ragu-ram-rrp)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-11-30
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/invosentry-ocr-invoice-extractor-math-auditor
- Tags: ai-agents, database, finance, python, ocr, tesseract, sqlite, invoice

## About this skill

Manual data entry for vendor bills is slow and error-prone. **InvoSentry OCR** provides a local, production-ready pipeline to extract, audit, and store invoice data from PDFs and images without relying on external API keys or per-call fees.

### What it does
- **Multi-format OCR:** Extracts text from PDF, PNG, JPG, and TIFF files using OpenCV preprocessing and Tesseract OCR.
- **Field parsing:** Identifies vendor names, invoice numbers, dates, PO numbers, currency, subtotal, tax, and line items via rule-based NLP.
- **Deterministic math auditing:** Validates `qty × unit_price`, line-item sums, subtotals, tax, and grand totals to catch discrepancies.
- **Duplicate detection:** Checks new extractions against existing SQLite records and within batches to prevent double-entry.
- **Structured persistence:** Saves validated invoices, line items, and audit trails to a local SQLite ledger.
- **Accounting exports:** Generates ready-to-use JSON, summary CSV, line-item CSV, and Excel (`.xlsx`) reports.

### How it works
1. Run `diagnostics --strict` to verify Tesseract OCR availability and local environment configuration.
2. Execute `extract` on a single file or `batch` on a directory to parse invoice fields and line items.
3. Pass `--save` to persist results to SQLite and trigger duplicate detection.
4. Inspect the `validation` object in the JSON output to confirm math integrity (`PASSED`) and OCR confidence.
5. Run `export` to generate JSON, CSV, or Excel reports for downstream accounting.

### Frameworks & tools
Built with Python 3.10+, Tesseract OCR, OpenCV, `pdfplumber`/`pypdf`, Pydantic, `openpyxl`, and SQLite for local persistence.

### Why this beats prompting it yourself
Generic LLM prompts often hallucinate invoice totals or misread multi-column tables. InvoSentry OCR enforces deterministic math audits, OpenCV preprocessing, and a persistent SQLite ledger that raw prompts lack.

### Use cases
- Automating accounts payable workflows by batch-processing vendor bill folders.
- Auditing financial records for math errors or duplicate invoice submissions.
- Building a local searchable archive of structured invoice data for small-business accounting.
- Exporting line-item data from scanned receipts into Excel (`.xlsx`) or CSV for tax preparation.

### Requirements & limitations
Requires **Python 3.10+** (`pip install -r requirements.txt`) and the **Tesseract OCR** binary installed on the host machine (`PATH` or `TESSERACT_CMD`). Extraction accuracy depends on scan resolution and standard invoice layouts.

## Requires

- python 3.10 +
- Tesseract OCR

Run pip install -r requirements.txt and ensure Tesseract OCR is installed on PATH (or set TESSERACT_CMD). Verify setup anytime with: python cli.py diagnostics --strict

## Known limitations

Requires local Tesseract OCR installation. Performance depends on image legibility. Processing is optimized for standard invoice structures.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the InvoSentry OCR: Invoice Extractor & Math Auditor skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does Invosentry OCR handle data accuracy compared to generic LLM prompts?

Unlike standard AI prompts that may hallucinate numbers, Invosentry OCR uses rule-based NLP and math auditing to verify that line items match grand totals, ensuring high data integrity for financial records.

### What are the technical requirements for running this skill locally?

The skill is designed for any Python-based AI agent environment and requires Tesseract OCR and OpenCV to be installed on the host machine to process images and PDFs.

### Can I process multiple invoices at once, or is it limited to one file at a time?

Yes, the skill includes a 'batch' command specifically designed to process entire directories of PDFs or images, automatically saving results to a local SQLite database for easy retrieval.

### Is my invoice data sent to an external server or cloud provider?

Invosentry OCR processes all data locally on your machine and stores it in a private SQLite database, meaning your sensitive financial documents are never sent to external cloud APIs.

### What is included in the Invosentry OCR package?

Your purchase includes the production-ready Python skill, SKILL.md documentation for CLI commands ('diagnostics', 'extract', 'batch', 'list', 'get', 'stats', and 'export'), and a pre-configured SQLite schema for local data persistence.

### Does this tool help identify if the same invoice is uploaded twice?

The skill includes a 'duplicate detection' engine that automatically cross-references new extractions against your local ledger to flag any vendor bills that have already been processed.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
