Architecting Agentic Workflows: Transitioning from Spreadsheet-Centric Accounting to Automated Database-Driven Reconciliation via Kylon
In the modern enterprise, particularly within highly regulated sectors like accountancy, the "spreadsheet trap" remains a significant bottleneck to scalability. For firms like Thomas & Co, a rapidly growing UK-based practice, the reliance on manual "working papers"—the granular verification of every transaction against bank statements—resulted in 25 accountants dedicating over 20 hours per week to repetitive data entry and reconciliation. This post explores the technical implementation of an agentic workflow designed to automate these high-frequency, low-complexity tasks using the Kylon orchestration platform.
The Problem: Manual Verification at Scale
The core challenge in accounting automation is not merely "reading numbers," but the verification of truth across disparate data sources. A "working paper" serves as the evidentiary trail for a client's accounts. For example, if a ledger indicates a payment of £4,800, an accountant must manually locate the corresponding bank line to validate the entry.
When scaled across 17 different types of working papers (including VAT, month-end management accounts, year-end accounts, and self-assessments), this creates a massive operational overhead. The technical objective was to identify which of these 17 workflows were candidates for automation (removing the human) versus augmentation (using AI to flag discrepancies for human review).
Phase 1: Data Engineering—From Spreadsheets to Structured Databases
A critical realization during the implementation phase was that "the spreadsheet is dead, and the database is king." LLMs and autonomous agents struggle with the unstructured, fragmented nature of Excel-based workflows. To build a reliable AI pipeline, the first technical requirement was migrating firm data from disconnected spreadsheets into a centralized, structured database.
This migration provided the necessary "rails" for AI integration. By centralizing the data, we established a single source of truth that could be queried via API, allowing agents to access real-time financial figures without manual file parsing.
Phase 2: Agentic Orchestration with Kylon
The solution leverages Kylon, an agentic workspace designed to orchestrate specialized agents through complex workflows. The implementation followed a structured onboarding flow for each new agent:
- Identity & Personality Definition: Assigning specific roles (e.g., "VAT Specialist") and personas to ensure consistent output formats.
- Context Ingestion: Using web-scraping and URL ingestion to feed the firm's foundational knowledge (website, service descriptions) into the agent’s context window.
- Workflow Mapping: Defining the specific logic for repetitive tasks, such as VAT reconciliation.
The Knowledge Transfer Problem: Voice-to-Context
One of the most significant technical hurdles was capturing "tacit knowledge"—the undocumented expertise residing in the minds of senior accountants. To solve this without manual documentation, we implemented a voice agent interface.
By conducting voice calls with subject matter experts (SMEs), we utilized LLM-driven transcription and summarization to extract complex business logic—such as status flows and blocker definitions—and inject that context directly into the Kylon workspace. This allowed for rapid knowledge transfer from human expertise to machine-executable instructions.
Phase 3: Implementing RAG for Tax Law Compliance
To ensure the agents could handle regulatory complexity, we implemented a retrieval mechanism inspired by Retrieval-Augmented Generation (RAG). Rather than attempting to feed entire tax law volumes into a single prompt—which would exceed context window limits and introduce noise—the system "chunks" the tax legislation.
When an agent encounters a specific transaction type, it queries the chunked database to retrieve only the relevant regulatory rules. This precision reduces hallucinations and ensures that the automated reconciliation adheres strictly to current UK tax law.
Phase 4: The State Machine of Reconciliation
The automation is governed by a rigorous state machine designed to manage the lifecycle of a working paper. The workflow follows this logic:
- Trigger:
Bank Rec Complete - Process:
Reconciliation Starts - Error Handling (Blockers): The agent identifies three specific blocker types:
- Source Discrepancy: Mismatched data between the ledger and bank feed.
- Data Mismatch: Inconsistencies in transaction metadata.
- Missing Client Info: Required documentation not present in the database.
- Recovery:
Auto-Retrieval Attempted(The agent attempts to find missing info via API or secondary sources). - Escalation: If auto-retrieval fails, the task is escalated to a human specialist via the tracker app.
- Terminal State:
Reconciliation Complete$\rightarrow$Adjustments in Zero/Filing.
Phase 5: Monitoring and UI/UX Integration
An autonomous system is only as good as its observability. We developed a Tracker App using Core Design principles to provide human supervisors with a "window" into the agentic workforce. This dashboard provides real-time visibility into:
- Board View: A high-level overview of all active working papers.
- Pending Reviews: A queue of tasks flagged by agents for human sign-off (addressing the legal requirement that a human must ultimately take responsibility for the work).
- Client Requests: Tracking incoming data requests and agent responses.
Conclusion: The Path to 60x Efficiency
The end-to-end test—running a VAT reconciliation through the pipeline and comparing it against historical manual results—confirmed successful parity. By moving from manual, spreadsheet-based processes to an API-driven, agentic architecture, the firm is positioned to achieve up to 50–60x efficiency gains. The goal is not the replacement of the accountant, but the elimination of "death by a million cuts," allowing human professionals to focus on high-value advisory roles while the Kylon-orchestrated agents handle the computational heavy lifting.