InfoQ
Read post

Runtime-Agnostic AI Workflows: A Pattern for Production Durability and Fast Eval Iteration

AI workflows face a fundamental tension: production durability requires heavyweight, persistent runtimes (like Temporal), while LLM eval iteration demands lightweight, ephemeral, in-process loops. Brex's engineering team solved this by decoupling orchestration logic from the runtime entirely. The orchestration is written as a pure function against a typed Steps interface, with no runtime-specific imports. Two adapters then plug in: a Temporal adapter for production (mapping each Steps method to a durable activity) and a minimal in-process eval adapter that swaps real services for fixtures while keeping LLM calls live. This guarantees the exact same orchestration code runs in both contexts, eliminating eval-prod skew by construction. The approach raised long-running agent completion rates from ~96% to 99.9%, though it sacrifices direct access to runtime-native primitives and requires all new capabilities to be threaded through the agnostic interface.

    #llm#typescript
Today•14m read time•From infoq.com
Post cover image
Table of contents
The Trade-Off Between Production Durability and Fast Offline EvalsMost Stacks Force You to Pick OneRuntime-agnostic OrchestrationKeeping Orchestration PortableProduction and Eval AdaptersPayoffs and CostsWhat We Gave UpAbout the Author
75 Impressions
InfoQ's image
InfoQ

InfoQ is a leading online platform for software developers, architects, and technical leaders, provi...

1.4K Followers

•

6.2K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard