agent hive

INVOICE PROCESSING

AI Adjudicator for Ambiguous Duplicate Invoices

When the fingerprint check returns a near-but-not-exact match, an AI agent compares the two invoices line by line.

CategoryInvoice Processing
EngineSim + Paperclip
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerAmbiguous near-match received (webhook)HTTP webhook
  • ActionAgent compares both invoices line by lineOpenAI
  • LogicBranch: duplicate, legit repeat, or escalate
  • ActionBlock or release the Stripe payoutStripeStripe
  • ActionEscalate uncertain cases to APSlack
  • OutputRecord verdict and rationale to audit logPostgreSQLPostgres

What it does

Exact fingerprints catch obvious duplicates; this workflow handles the gray zone. When a new invoice partially matches a paid one (same vendor and amount but a different number, or a recurring charge that looks like a repeat), an AI agent reads both documents, weighs the evidence, and adjudicates. Confident duplicates are blocked at the Stripe step; legitimate repeats are released. Every decision is written back with a rationale so AP keeps an audit trail.

When to use it

Use this when your duplicate guard produces too many ambiguous flags for humans to triage, or when recurring vendors (rent, retainers, subscriptions) generate look-alike invoices that should actually be paid.

How it works

  1. 1An ambiguous near-match from the guard triggers the flow with both invoice records.
  2. 2The agent compares line items, dates, references, and vendor context to classify the pair.
  3. 3It branches on the verdict: true duplicate, legitimate repeat, or needs human review.
  4. 4True duplicates halt the Stripe payout; legitimate repeats release it.
  5. 5Uncertain cases are escalated to AP in Slack with the agent's reasoning.
  6. 6The verdict and rationale are recorded to the Postgres audit log.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect StripeCustomers, subscriptions, payments.
  4. 4
    Connect SlackChannels, DMs, threads, mentions.
  5. 5
    Connect PostgresAny Postgres URL — query, write, migrate.
  6. 6
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  7. 7
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  8. 8
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.