Case study
A legal-tech research company
A legal-technology company whose research agents answer complex legal questions for law firms by decomposing them into multi-step plans — searching case law, reading judgments, cross-referencing statutes, and assembling cited memoranda. A single query can involve dozens of model calls and tool invocations.
01 — In their words
“Before, a failed research run was a support ticket and a shrug. Now it's a trace we can replay step by step. The first week we had it, we fixed a retrieval bug that had been costing us for months and that nobody had been able to reproduce.”
02 — The work
Challenge
Agent runs failed invisibly in the middle of the chain. A retrieval step would return weak results, a summarisation step would quietly drop a dissenting judgment, or a tool call would time out and the agent would improvise around the gap — and the run would still complete, producing a memorandum that looked finished but was built on a broken step. With no visibility below the level of the final answer, failures could not be reproduced, debugging meant re-running the whole query and hoping, and retries silently multiplied token spend.
Solution
The engineering team moved the agents into a Hyperpriors harness. Every step — each model call, tool invocation, retrieval, and intermediate decision — is traced with its full inputs and outputs, and any run can be replayed deterministically from any step. Guardrail checks validate that cited cases exist in the retrieved sources and that quotations match the underlying judgments. Retry and fallback behaviour moved out of ad-hoc application code into declared harness policy, making the cost of every recovery path visible and bounded.
03 — The system
04 — Results
The company runs its multi-step research agents inside a Hyperpriors harness, with step-level tracing, deterministic replay, and automated citation checks on every production run.
- 01
Previously unreproducible mid-chain failures now replayed and diagnosed from traces, cutting typical time-to-diagnosis from days to under an hour
- 02
Cost per query down 38 percent after traces exposed redundant retrieval calls and unbounded retry loops
- 03
Automated citation checks on every run, with unverifiable citations blocked from final memoranda rather than discovered by clients
05 — The record
- Industry
- Legal technology
- Location
- North America
- Model providers
- Two hosted frontier-model providers
- Workloads
- Multi-step research agents, retrieval, cited drafting
06 — The full account
07 — Begin
See every step your agents take, and replay the ones that go wrong.