Agent systems · Document operations
OpsNexus
A supervisor agent that routes business documents to the right specialist tool, then shows its work.
- Role
- Agent architecture, tools, UI
- Client
- Document operations team
- Status
- Completed · 2025
- Delivery
- Web application
Input
Invoice · log · questionnaire
pdf / docx / csv / txt
Supervisor
Classifies, then routes
structured output · strict schema
- Purchase-order lookup
- Policy retrieval
- Line-item reconciliation
Execution trace
- 01
Supervisor classified the document
route: invoice_reconciliation
- 02
get_open_purchase_orders
PO-1078 · limit $25,000
- 03
submit_invoice_reconciliation
5 discrepancies · pending review
Output — discrepancies found · payment pending review · audit payload stored
01Context
Documents arrive without a routing slip.
An operations team receives invoices, security logs and questionnaires into the same inbox. Each needs a different process, a different set of checks and a different system of record.
The first job is not extraction. It is classification: which process does this document belong to, and what should happen to it next?
02Problem
Four failures worth designing for.
Routing
The wrong pipeline on the right document is still a failure.
Reconciliation
An invoice line must be checked against a purchase order and an approval limit, not just parsed.
Auditability
A decision that cannot be reconstructed is not usable in an audit.
Mixed inputs
PDF, DOCX, CSV, text and logs in one queue, with different structure and different confidence.
03Architecture
Supervisor, specialists, structured output.
The supervisor classifies the document and selects a route. Specialist tools do the deterministic work: purchase-order lookup, policy retrieval, line-item reconciliation. The model chooses and reads; it does not invent the numbers.
Input
Invoice · log · questionnaire
pdf / docx / csv / txt
Supervisor
Classifies, then routes
structured output · strict schema
- Purchase-order lookup
- Policy retrieval
- Line-item reconciliation
Execution trace
- 01
Supervisor classified the document
route: invoice_reconciliation
- 02
get_open_purchase_orders
PO-1078 · limit $25,000
- 03
submit_invoice_reconciliation
5 discrepancies · pending review
Output — discrepancies found · payment pending review · audit payload stored
04Reconciliation
Line items, limits, discrepancies.
Invoices are checked line by line against open purchase orders and approval limits. The result is a structured report: extracted total, matched lines, unmatched lines, and the reason each discrepancy was flagged.
Payment status is set to pending review, not approved. Nothing that moves money happens without a person confirming it.
05Trace
Every step keeps its payload.
Each step records its input and its output, including the supervisor's route and reasoning. The trace is attached to the document, so a reviewer can see what the system did and why before confirming anything.
That trace is also the debugging surface. When a document is routed incorrectly, the failed step is visible instead of buried in a prompt.
06Delivery
Delivered end to end.
The interface supports drag-and-drop ingestion for the supported formats and shows the workflow trace per document. Invoice reconciliation and compliance audit shipped as separate routes behind the same supervisor, with every step's payload retained for audit.
Stack
- Python
- LLM orchestration
- Tool calling
- Structured output
- FastAPI
- React
Role — Agent architecture, tool design, ingestion UI
Next study
SPECTER
Document intelligence · Legal
Have a corpus that
refuses to behave?
Describe the documents, the volume and what a correct answer looks like. We will tell you whether retrieval is the right tool before proposing a build.
Start a project