How Archon separates model-assisted document processing from deterministic checks and keeps the evidence reviewable.
Guest post by Efthimios Fousekis The winner of Best Enterprise Agent: Archon — https://github.com/upgradedev/archon_azure
Within the document-processing pipeline, model assistance is used at the unstructured edge and for optional narration. Classification, computation and checks are deterministic. Human review is available, but it is not an enforced approval gate in the current prototype.
Archon was built as an Agentic Financial Intelligence prototype for SMBs for Microsoft’s Agents League at AI Skills Fest, where it was selected as the Enterprise Agents winner. While building it, I kept returning to one question: when should an AI model stop?
A payroll register, a bank confirmation, and a set of payslips may each look correct in isolation. Together, however, they can still describe an incomplete or inconsistent financial event. One record describes employer cost. Another records a transfer. The payslips allocate net pay to employees. If a system treats those views as interchangeable, it can count the same period twice, omit a cost, or hide missing evidence behind a fluent summary.
Archon remains a competition prototype. The more useful story is the engineering boundary between model-assisted interpretation, deterministic software and human review, and two gaps that made that boundary concrete: a visible review step is not an approval gate, and a check that cannot run is not a pass.
The business problem behind Archon
Financial work rarely depends on a single document. It depends on reconstructing an event from records created by different systems, at different times, for different purposes. A convincing narrative is not enough. A trustworthy workflow also needs to identify its source records, retain relevant intermediate artifacts, show which checks ran, and state what could not be established.
That led to a bounded workflow. Archon preserves normalized records and intermediate artifacts. Within the document-processing pipeline, model assistance is used at the unstructured edge and, optionally, after deterministic analysis for narration. Explicit Python functions handle classification, grouping, arithmetic, consistency checks and reporting. The review screen exposes normalized documents before analysis.
In this article, "controls" refers to deterministic software checks in a prototype, not audited accounting controls or a formal internal-control framework. Archon does not prove savings, accounting accuracy, production scale, regulatory compliance or measurable business impact. It demonstrates a design pattern and exposes where the prototype falls short.
What Archon does today
The core document-processing path has three distinct tiers: extraction, review and analysis.
At the interaction layer, the repository includes a Microsoft 365 Copilot declarative-agent package configured to connect Copilot Chat and Teams to the FastAPI backend through an OpenAPI plugin. Its manifests and API contract are available in the public repository. The authenticated Microsoft 365 tenant path was not independently rerun for this article revision.
The term agent covers two layers here. The Microsoft 365 declarative agent is the user-facing integration. Within the analysis service, six of the seven named stages are deterministic Python functions; only the optional narrator invokes a model.
Archon accepts PDF, DOCX and common image formats. A FastAPI orchestration service stores the raw files in Azure Blob Storage and can submit an Azure Container Apps Job. Model-assisted extractors turn text or images into a common document schema.
The extraction job then performs deterministic classification refinement, groups payroll records by company and issue-date period, and applies four extraction-time consistency checks. It writes three batch artifacts: documents.json, events.json and validation.json.
The visible review step happens after that job. The document view is classified for the review screen, where a user can change a type or exclude a document. If changes are saved, a reviewed documents.json replaces the earlier document files for that period. The stored events and extraction validation are not rewritten, so they can become stale after review.
The separate analysis service deliberately loads only documents.json. It does not consume the extraction job’s stored events or validation results, and it does not rerun the original EventLinker stage. Instead, it classifies the documents again, builds P&L-style and cash-flow-proxy views, reruns period-level checks, performs vendor reconciliation, creates report evidence, and finally attempts an optional narrative.
The optional narration stage follows one of two configured paths. With a project connection string, it attempts the classic Threads, Messages and Runs implementation of Microsoft Foundry Agent Service with Azure AI Search; if that attempt fails, the service returns a deterministic numeric summary rather than retrying through Azure OpenAI. Without a project connection string, it uses Azure OpenAI Chat Completions, grounded by Search only when the separate Search settings are configured.
Where the model stops
Models are useful where layouts, labels, languages and scan quality vary. Archon constrains that work with accepted formats, a document-type enumeration, bounded text and image inputs, and a normalized output schema.
Once a value enters that schema, a model no longer decides the arithmetic. Classification refinement, extraction-time event grouping, both sets of consistency checks, monthly aggregation, reconciliation, and the cash-flow proxy are deterministic functions. They can be inspected with fixtures and rerun without asking a model to reach the same conclusion twice.
This does not make an extracted value correct. It makes the deterministic calculations and checks easier to inspect and rerun. The prototype does not, however, retain a complete field-level transformation history.
The payroll example: cost is not cash flow
Payroll exposed the most important design choice. Employer cost and the amount transferred to employees answer different questions. A payroll register can include gross pay, employer contributions and a total employer cost. A bank confirmation records a transfer. Payslips provide employee-level allocations.
The extraction EventLinker groups the three implemented payroll document types by company and period. Completeness records whether a bank confirmation, register and at least one payslip are present. It is not audited relationship-level matching, and tax-authority records are not linked by the current implementation.
The analysis tier is coarser. If any payroll register is present in the requested period, its P&L calculation excludes every bank confirmation and payslip in that period from expenses. The register contributes employer_cost_total when that field exists, otherwise it falls back to total_amount. This avoids obvious double counting in the synthetic example, but it is a period-level prototype rule, not event-scoped deduplication.
The cash-flow proxy uses a different set of assumptions. It treats every bank confirmation as an outflow, assumes every sales document represents collected cash, and assumes invoice and expense documents represent paid cash. Investing and financing are zero. The result is useful for illustrating cost versus cash, but it is not a cash-flow statement and does not reconstruct a cash ledger.
From upload to reviewable evidence
Only documents.json continues. Stored events and validation may become stale after review.
The review screen shows a limited summary of each normalized document, where a user can change its type or exclude it. Analysis later classifies the current documents.json again, so invoice and sales-document types may be reclassified independently of the saved review choice.
Analysis rebuilds its views from the current documents.json—reviewed only if changes were saved—and does not consume stored events.json or validation.json. “Report evidence” means limited report output, not a complete audit trail.
But visibility is not enforcement. If fetching the review data fails, the client proceeds to analysis. If saving review changes fails, it also proceeds. A direct API or MCP call can bypass the screen, and there is no persisted approval token, reviewer identity, reason for change, or atomic approval transaction. The prototype supports review; it does not autonomously approve records.
Why absence is not success
Archon implements four payroll consistency checks. They compare a bank total with payslip totals, examine an employer-cost ratio, compare payment timing with the reporting period, and compare the register’s employee count with the number of payslips.
When a payroll check is emitted but required inputs are absent, the current implementation records an informational skipped result with passed=True. If no payroll documents are present, no payroll validation result is emitted.
The target state separates Pass, Fail and Not evaluated; the lower panel shows the current implementation gap.
Why this design matters to a business
For finance and technology leaders, governed automation becomes concrete through a small set of questions:
- Which source evidence supports this result?
- Which transformations and checks actually ran?
- Which checks failed, and which were not evaluated?
- Who is allowed to continue or approve?
- Can the decision and its inputs be reconstructed later?
These questions connect software design to operational risk. Finance leadership needs to know whether a number represents cost, cash, or a proxy. Architects need to know where probabilistic interpretation ends. Reviewers need evidence specific enough to challenge. Auditability depends on retained decisions, not on the confidence of generated prose.
Evidence and current limitations
- Live extraction coverage. The live extraction prompt and shared document builder populate none of the dedicated payroll or account-statement fields used by the deeper analysis. Richer payroll and statement demonstrations use pre-structured synthetic records.
- Legacy Word files. The upload route accepts
.doc, but the extractor passes it topython-docx, which is not a reliable parser for binary Word files. The article therefore limits its supported-format claim to PDF, DOCX and common images. - Failure handling. When extraction fails, the raw upload remains in Blob Storage. The job logs the per-file failure and omits that file from normalized output, but writes no dedicated exception record.
- Control depth. P&L deduplication and analysis validation are period-level.
- Production controls. The repository lacks aggregate model-spend budgets, tenant quotas, application rate limits, complete decision history and production-grade tenant isolation.
Technical validation note
Against public commit 230ee70, the pinned CI run passed 36 extraction-layer unit tests and eight CashFlowAgent unit tests, including a regression case for Greek final-sigma classification, and completed the seeded analysis HTTP smoke path. The upload/extraction/job-poll path was intentionally skipped in that CI run. Authenticated Playwright, credentialed live extraction, Foundry, Search and authenticated Microsoft 365 tenant paths were not independently rerun for this revision.
What comes next
The most useful evaluation would compare this bounded design with an end-to-end model-driven workflow. I would use a versioned document corpus, explicit expected outcomes, missing-evidence cases, and separate measurements for extraction, classification, linking, validation and reviewer correction. The goal would be to test traceability, error attribution and reviewer confidence, not to infer accounting accuracy from synthetic fixtures.
To move this pattern toward production, a future implementation would need explicit tri-state validation, stronger entity resolution, dedicated payroll and statement extraction fields, event-scoped deduplication, and a persisted exception ledger. Risk-sensitive flows would need an authorized approval gate. Model calls would need cost accounting and enforceable budgets. Processing should be idempotent, and telemetry should retain retries, exceptions and check outcomes.
Grounded narration should remain optional and downstream. Migrating the optional narration path to the current, Responses API-based Microsoft Foundry Agent Service is future work.
Conclusion
Building Archon changed how I think about enterprise agents. The most valuable intelligence often comes from deciding where a model should stop. In consequential workflows, that boundary should preserve evidence, expose missing inputs, and keep the explanation tied to results that can be recomputed.
This is a target design principle, not a current-state control claim. In the current prototype, the review path is visible but fail-open, while narration remains optional and downstream.
If you are designing an agent for a consequential workflow, start by defining what evidence must exist, which checks must run, and what the system should do when a check cannot be evaluated. You can explore the public Archon repository inspect the implementation and challenge the boundary for yourself.
About the author
Efthimios Fousekis leads Enterprise Architecture and DevOps, focusing on cloud-native engineering and AI-Native Enterprise Transformation. He writes about building governed, reliable agentic systems and the engineering practices that make AI adoption practical in the enterprise.