Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    ap invoice agent

    1

    Extract, validate, and match supplier invoices with deterministic OCR, arithmetic checks, and audit-ready routing.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    ap invoice agent

    Example session with this skill installed

    Process batch-2024-05-12 containing invoice_001.pdf and match it against our supplier master and open PO list. Ensure all line items are validated for arithmetic.

    • Read your context and instructions
    • Compiled the ap invoice agent

    Batch processing for 'batch-2024-05-12' is complete. 'invoice_001.pdf' was routed to HUMAN_REVIEW due to a price variance, while all other documents reached COMPLETED status.

    Bill Record: invoice_001.json

    {
      "document_identity": {
        "batch_id": "batch-2024-05-12",
        "document_id": "doc-8f2e1a",
        "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
      },
      "workflow_status": "HUMAN_REVIEW",
      "review_reasons": ["UNIT_PRICE_VARIANCE_EXCEEDS_TOLERANCE"],
      "extracted_fields": [
        {
          "field_name": "total_amount",
          "raw_value": "1,250.00",
          "normalized_value": "1250.00",
          "confidence": 98.5,
          "evidence_references": ["ev-9921"]
        },
        {
          "field_name": "invoice_date",
          "raw_value": "May 10, 2024",
          "normalized_value": "2024-05-10",
          "confidence": 95.0,
          "evidence_references": ["ev-9922"]
        }
      ],
      "line_items": [
        {
          "line_number": 1,
          "description": "Widget Type A",
          "quantity": 10,
          "unit_price": "125.00",
          "amount": "1250.00"
        }
      ],
      "validation_checks": {
        "line_items_subtotal_match": "PASSED",
        "invoice_total_match": "PASSED",
        "po_matching": {
          "status": "FAILED",
          "reason": "Unit price 125.00 exceeds PO price 115.00"
        }
      },
      "audit_trail": [
        {"event": "INTAKE_COMPLETE", "timestamp": "2024-05-12T10:00:01Z"},
        {"event": "OCR_SUCCESS", "engine": "PaddleOCR", "confidence": 92.4}
      ]
    }
    

    Next steps

    1. Open the review interface to resolve the UNIT_PRICE_VARIANCE_EXCEEDS_TOLERANCE on doc-8f2e1a.
    2. Run scripts/check_bill_record.py to verify the integrity of the generated JSON files.
    3. Update the supplier master if the price variance in invoice_001.pdf reflects a negotiated change.
    processing for 'batch-2024-05-12' is complete. 'invoice_001.pdf

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Manual invoice entry is slow and prone to errors that cost companies thousands in overpayments. This skill transforms raw PDFs and images into structured, audit-ready bill records using a deterministic pipeline that prioritizes evidence over guesswork.

    What it does

    • Multi-stage processing runs intake, preprocessing, OCR, extraction, validation, and matching in a strict sequence.
    • Deterministic extraction uses labels, regex, and coordinate-based evidence to pull header fields and line items.
    • Financial validation executes eight exact-decimal arithmetic checks on subtotals, taxes, shipping, and grand totals.
    • Reference matching performs two-way or three-way matching against supplier master data, purchase orders, and goods receipts.
    • Fail-closed routing automatically sends invoices to human review if any confidence threshold, business rule, or arithmetic check fails.
    • Audit trail generation records every candidate, check, and correction in an append-only log for full traceability.

    How it works

    1. Intake and Clean reads files, validates magic bytes, computes SHA-256 hashes, and applies image preprocessing like deskewing and denoising.
    2. OCR and Extract runs primary and fallback engines to build tokens and lines, then scores candidates based on visual evidence.
    3. Validate and Match runs financial integrity checks and matches data against provided PO and supplier records.
    4. Route or Review finalizes the bill record or routes to a human operator with specific reason codes for every discrepancy.

    Frameworks & tools

    This skill is built for Python 3.11+ environments. It utilizes OpenCV for image manipulation, PaddleOCR and Tesseract 5 for text extraction, and PostgreSQL for state management. It requires a PDF rasterizer and supports exact-decimal arithmetic libraries.

    Why this beats prompting it yourself

    Prompting alone often leads to "hallucinated" totals and inconsistent data structures. This skill uses a multi-engine fallback strategy and strict arithmetic gates to ensure that every value returned is backed by physical coordinates on the document. It prevents silent errors by failing to a human reviewer rather than guessing missing values.

    Use cases

    • AP automation building a high-volume intake pipeline for supplier bills.
    • Audit preparation creating a traceable record of every extraction and manual correction.
    • Discrepancy detection flagging price variances between invoices and purchase orders.
    • Batch scanning processing 1000s of legacy invoice images into a unified JSON format.

    Known limitations

    Does not support executing payments or posting directly to ERPs. Not for receipts or bank statements. Indian number grouping and credit notes require custom logic. Primary implementation is Python-based.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Python 3.11+ required. Does not support payments or ERP posting. Unverified for credit notes and Indian number grouping. Restricted to USD, GBP, and EUR by default.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 17 days ago

    Accounts
    Amazon
    Software
    Invoice filesPrimary OCR engineFallback OCR enginePython 3.11+PDF rasteriserOpenCVPillowTenant-scoped private storageSupplier master dataOpen purchase ordersGoods receiptsHuman reviewerLabelled invoices

    Invoices can be PDF, PNG, JPEG or TIFF, up to 25 MiB each. The reference uses PaddleOCR and Tesseract 5 with models downloaded in advance. Labelled invoices calibrate thresholds.

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Browser

    Allowed Hosts

    aws.amazon.com
    Listed17 days ago

    What's inside

    Frequently Asked Questions

    This skill replaces manual data entry by extracting invoice data using a deterministic pipeline that validates totals through strict arithmetic checks, preventing the 'hallucinations' common in standard AI prompting.

    The skill provides the logic for intake, OCR, validation, and matching; however, it does not include direct ERP integrations or payment execution capabilities.

    The skill requires a Python 3.11+ environment and includes all necessary logic for image preprocessing, multi-engine OCR, and financial validation modules.

    If any arithmetic check fails or a confidence threshold isn't met, the agent triggers a 'fail-closed' route, flagging the specific error for human review rather than guessing.

    The skill is optimized for standard supplier invoices; it currently does not support receipts, bank statements, or Indian number grouping conventions without custom logic.

    Yes, the agent generates an append-only log that records every candidate value, arithmetic check, and manual correction to ensure your records are fully audit-ready.

    New in APIs & Backend