With Lewis Blackwood, Co-founder
Rex is an AI-native service for accounts receivable and order-to-cash teams. It identifies and works the exceptions that delay payment and escalates the cases that need human judgment, so the finance team stays in the loop.
Founders Merlin Kafka (CEO) and Lewis Blackwood (CTO) previously spent four years building software for CFOs, and saw the challenges enterprise finance teams face managing order-to-cash. This is why they're building Rex, focused on agents that work across a company's existing finance systems and escalate the exceptions that need an operator.
The first product Rex shipped handles the accounts receivable inbox, where hundreds of customer cases arrive each day. Rex's agents review each case and draft actions, which team members approve.
When the Rex team onboarded their first enterprise customer after founding, they made a deliberate investment to trace every agent's touchpoint using Braintrust.
Really early on we started to get value out of Braintrust just from being able to connect to the MCP, look through the traces, and pull out interesting data points and anomalies. A customer would give us feedback about something unexpected, and we could drill down into the trace and understand exactly the data the agent had gathered and why it had made a certain decision.
As Rex accumulated a bank of real examples from the product, the team wrote evals against them, which made iterating on their agent's harness measurable and improvable. They then applied this eval practice to model selection, allowing them to identify which models worked, and at what cost.
Now Rex can run cheaper, faster models in some parts of the system and more capable ones elsewhere, with evals establishing where each holds up.
The biggest value prop of evals for us is being able to swap a different model in and out with confidence, either different models from the same provider or models from different providers, without the risk that outcomes are suddenly going to change.
The same evals support how Rex optimizes latency. Analyzing an inbound email in the background and returning a result within a few minutes works well for most situations. But other parts of the product should produce an answer faster.
Faster models have gotten good enough to carry those interactions, and Lewis says the immediacy makes them feel magical.

Slow to iterate, blind to failures
Rex aims for a generalized harness that handles order-to-cash for any company, while letting each customer tailor agents to their order-to-cash process through what it calls "agent operating procedures." Agent operating procedures encode an operating rule specific to a customer's business, like handling invoices above a certain amount a particular way.
An agent decides on its own whether a procedure applies, and evals are how Rex checks that judgment.
"It's been really useful to identify the set of traces where a procedure was invoked by the agent because it deemed it relevant, and then see how that shaped the outcome," said Lewis.
As Rex agents operate across finance systems, they generate a steady stream of data about agent quality, because users can course-correct and provide feedback against actions. Rex built custom facets in Braintrust to capture the different categories this feedback can take, and uses Topics to surface issues grouped by these categories.
Finding these patterns used to be a scheduled exercise. Every two weeks the team spun up a Claude Code instance against the previous 14 days of traces and pulled out three or four things worth fixing. Since Topics runs against the facets continuously, problems are visible at a glance and the next round of work has an immediate starting point.
This cadence better suits how Lewis and team want to build and iterate their product.
It's about finding 1% improvements every day, gradually making the agent better and better, so it feels closer to what the user would actually have done themselves.
With Braintrust, Rex can use its existing coding workflow to debug problems while engineers sleep.
Negative feedback from a customer on an agent-generated email draft automatically kicks off a Cursor cloud agent that can read Rex's own instrumentation. The Cursor agent has access to the Braintrust MCP, so it can investigate where something was missing in the prompts and make suggestions on how to handle that case better.
All this happens while the team is offline, and when they sign on in the morning they can review the data in Braintrust, then quickly implement a fix.
The next time we're online we've already got a ready-made investigation that's looked at the prompts, come up with a suggestion for how it would fix it, looked at the Braintrust traces. Then we can just go ahead and merge that PR. That's especially helpful as a small team.
Order-to-cash is complex and almost nobody can see the whole workflow end to end. The long-term ambition is for Rex to map that process for customers and point to where it breaks down.
Historically, companies have hired consultants to do this as a one-off project. But agents operating an order-to-cash system daily have a better vantage point than any outside or internal team.
Eventually, Rex's agents will be able to both map and improve an entire team's workflows automatically.

Thank you to Lewis for sharing Rex's story.
Learn how Braintrust helps teams instrument every agent decision from day one, use evals to swap models with confidence, surface continuous quality signal with Topics and custom facets, and let coding agents investigate overnight so fixes are waiting as PRs by morning.
“Every single AI prompt we check into the codebase needs a Braintrust playground ID. If it doesn't, the test fails.”