Eight months, six iterations, and one rewrite of the heartbeat: the story of ALOHA, our Agentic Lending Operations Harness.
Consider a home loan application on its sixth day. The voice agent qualified the borrower on day one. The borrower's spouse is the co-applicant, and they have missed two calls. At 11:40 p.m. the borrower uploads three months of bank statements on WhatsApp, and one of them is password-protected. The account aggregator consent is still pending with the vendor. The credit policy can't run until the co-applicant's bureau report arrives. And the relationship manager has just corrected the declared income on the dashboard, which changes what the credit memo should say.
None of these jobs is hard on its own. Each one is a call to an agent or a tool. The hard part is what happens between them. Six events from five sources arrive in any order and at any hour. Any of them can fail, arrive twice, or arrive while the system is already acting on an earlier one. Something has to notice each event, work out which part of the journey it unblocks, and move that part forward. It has to do this exactly once, inside the borrower's calling and messaging hours, and leave a record a regulator can read months later. Now multiply that by thousands of applications open at the same time, for several lenders, on one database.
But most agent frameworks are built around a single conversation or a single task loop. A loan is neither. It is a process that runs for weeks, and the agents in it spend most of their time waiting for the world. The engineering problem is not making each agent smarter. It is building the harness that knows when the world has changed and which agent should act next.
We learned this the hard way. On one afternoon in October, our harness had tens of thousands of runs that were due and not yet started, and the oldest had been due for almost two hours. Borrowers who finished a call or a form waited one to three hours for the next step. Every agent did its own job in under 100 milliseconds. The harness around them was looking at runs one at a time, on a 30-second tick, and each pass through the backlog took 15 minutes.
In this article, we'll explain why lending operations need a multi-agent harness rather than a single agent. We'll show how ALOHA, our Agentic Lending Operations Harness, runs many agents, tools and humans as one durable journey, and walk through the six iterations it took to get here. We'll finish with the production numbers from before and after the rewrite that made it react to the world in seconds.
The journey above involves six kinds of work:
Despite the advancements in LLMs, relying on a single agent with a large tool list for this in production is problematic. The journey outlives any context window. Half the work waits on the outside world: a borrower who has not picked up, an upload that has not happened, a vendor that answers in minutes. And every decision has to be explained to a regulator months later.
For a lending harness to be production-grade, it has to be:
ALOHA is the workflow engine at the heart of our lending platform. A journey is a graph written in a JSON DSL. Each node is a step, either an agent (an LLM loop, a voice call, a chat) or a tool (a vendor API, a form, a document check). Each edge is a pipe: a rule that decides when the run moves and where it goes.
Today ALOHA runs 57 step types and five pipe types (direct, conditional, timeout, retry and decision), with cadence and slot-aware gates on top. Journeys for home loans, personal loans, business loans, education loans and collections run on the same engine for many lenders.
Here's an overview of the architecture as it runs in production today:
None of this was the first design. Each component exists because an earlier version broke in production in a specific way.
ALOHA started as a rename of an internal prototype. The first runner was the simplest thing that could work: one loop per tenant that woke every 30 seconds, fetched runs that were due, evaluated each run's pipes, executed the next step and wrote an audit event.
It was correct, and for a pilot with a few hundred leads it was fast enough.
The first production journeys showed that the interesting logic lived on the edges, not in the steps. "Call again in four hours, at most three times, then send a WhatsApp" is not a step. In April we made pipes first-class: a retry pipe with bounded attempts and backoff that survives a suspended run re-entering itself, a timeout pipe with its own target, and a decision pipe that routes on a field in the context.
We also separated agents from tools in one step spec registry. An agent step can propose a write, but a proposal parks the run until a human approves it. A tool step runs deterministically. In our experience, this separation matters more than any prompt: it is the line that decides what needs a human signature.
Before our first campaign of more than 5,000 leads, we found three ways a run could be processed twice or not at all: two workers claiming the same row, a long batch outliving its claim, and a WhatsApp send that succeeded just before a crash and was retried after it. In July we added:
A home loan has co-applicants, and each co-applicant has their own documents, consent and KYC. In August we added fork/join across runs: a parent run spawns one child run per co-applicant and waits for all of them. A run stays a single-token state machine, and the parallelism lives across rows. This kept every existing guarantee intact.
At the same time we made every context merge go through one function that stamps provenance on each key and diverts writes to immutable outputs into a conflicts list. When an auditor asks why a loan was approved, the answer is a chain of records, not a log search.
By October the runner had grown many ways to move a run: the main loop, the suspended-run resume path, webhooks, manual advance from the dashboard, chat agents closing a journey. Each had slightly different logging and slightly different guards. We decided that all control flow, whether triggered by an agent, a tool or a human, goes through the same decide, write and transition functions. This was the precondition for the next rewrite: you cannot make a loop concurrent while five other code paths also move runs.
The afternoon described at the start of this article was a large campaign for a housing finance lender, and it exposed the tick loop's real cost. Runner cycles had stretched from 30 seconds to 15 minutes.
The surprising part was where the time went. The step bodies themselves were fast, with a median of 26 to 94 milliseconds. Each run still cost 400 to 1,500 milliseconds, because a step made about ten serial database round trips and every run waited behind every other run. The engine was not slow. It was serial and blind.
We looked at how others solve this: Pregel's vote-to-halt, GraphLab's asynchronous engine, and the Postgres-as-a-queue designs used by DBOS, Absurd and River. The answer was an asynchronous active set: only runs that something has woken are looked at, and they are looked at as soon as they are woken. Global supersteps, which is what our tick loop was, were the thing to remove.
The harness is built on five rules:
The second rule hides the subtle part. A run can be woken while it is being processed, for example when a call ends while the run is evaluating its pipes. If the release then wrote the next deadline unconditionally, it would overwrite that wake and the run would sleep through it. The release is a guarded write:
Wakes come from database triggers on the data that workflow rules actually read: a call reaching a final status, a form or document being submitted, a field on the borrower's record being edited. We scanned every workflow definition to build the list of watched fields, so a trigger never fires on changes that no rule reads.
We also fixed the event loop itself. A payment gateway call with no timeout, synchronous object-storage reads inside document steps and PDF rendering on the loop could each stall every lane at once. These moved to threads, the default executor went from 6 threads to 64, and a watchdog now logs the loop's stack whenever it is blocked for more than 500 milliseconds.
We shipped the harness switched off, byte-for-byte the old loop, and enabled it for one tenant at a time. Below are the numbers for the housing finance tenant, comparing the eight days before the switch with the days after it, on a single worker.
| Metric | Before | After |
|---|---|---|
| Median time from a finished call to the next step | 69–91 minutes | 2–5 seconds |
| Runs moved within one minute of a finished call | 0% | 65–76% |
| Peak steps per minute | 187–207 | 480–782 |
How we measured. "Time to next step" is the gap between a voice call reaching a terminal status and the next step starting on the same run, taken from the audit trail. The after-window excludes the first days of the rollout and a day when a second worker also ran the harness, which roughly doubled capacity and would have flattered the result.
Speed was the goal, but correctness was the bar. Over the same period we checked that:
The moves that still take more than a minute are not waiting on the design. They are bounded by how much concurrency we allow each lane, which we are raising gradually as we watch the shared database.
A multi-agent harness that delivers outcomes is less about the agents than about the harness. The voice agent, the chat agent and the underwriting agent were good months ago. What changed for the borrower is that the moment one of them finishes, the next one starts, inside the borrower's hours, exactly once, with a record of why. The time a borrower waits after a call has gone from more than an hour to a few seconds, and the rest of the journey has followed.
Harness conversational AI and Machine Learning to deliver faster business growth, higher recoveries, at lower costs.