Inspiration

During an internship at an engineering firm, I watched the Accounts Payable (AP) team spend hours manually cross-checking invoices, tax forms, and change orders.

Standard AI and flat RAG tools fail here because they act as search engines—they retrieve, but they don't reason. We realized this was an agentic workflow problem. We needed an autonomous system to mimic a human compliance officer: take in a mess of documents, plan an audit, reason through discrepancies, and take action.

What it does

GATE is an autonomous, air-gapped AI agent acting as the final gatekeeper for enterprise payments. When handed a multi-file vendor package, it executes four behaviors:

  • Plan: Maps the incoming documents against the company's internal compliance policies.
  • Reason: Cross-references data across the entire package (e.g., catching an unapproved change order that invalidates a specific invoice line).
  • Act: Outputs a clear decision (HOLD, REVIEW, or APPROVE), charts errors in a Micro Report, and auto-drafts vendor response emails.
  • Explain: Provides a "Decision Trace," showing a step-by-step logic chain of its verdict.

Crucially, it operates autonomously to do the heavy lifting but strictly enforces a Human-in-the-Loop (HITL) protocol. The agent flags the errors, but a human auditor must make the final approval click.

How we built it

  • The Brain (Local GraphRAG): We used LightRAG backed by a local Llama 3.1 model via Ollama. It ingests compliance manuals to build an entity graph, giving the agent deterministic rules to reason against.
  • The Eyes (Vision): We used PyMuPDF to handle text extraction. When the agent flags a missing W-9 signature, it maps that finding to the exact X/Y coordinates on the PDF.
  • The Interface: A zero-dependency SPA (HTML/CSS/JS) powered by FastAPI for a dashboard-style UI.

Challenges we ran into

Building an agent that reasons requires strict engineering boundaries and comes with inherent limitations.

  • The Ingestion Bottleneck: GraphRAG ingestion is a severe limitation compared to flat vector indexing. We made a deliberate trade-off: accepting slower, one-time

Built With

Share this project:

Updates

Submission history