Most Rails AI agents should be workflows

The reliability math is brutal: a 95% step, run 20 times, is a coin flip. Climb the ladder only as far as the task demands.

Before you build an agent, do the reliability math. A step that succeeds 95% of the time, chained twenty times, completes correctly about 36% of the time. An agent that is impressive once is not a system. A system does it every time.

That is why the complexity ladder matters, and why you should climb it only as far as the task forces you to:

  1. A single model call. Classify this ticket, summarize this document, draft this reply. One call, one validation. Most business value in most mid market products lives right here.
  2. A workflow. A fixed sequence of calls and tools your code orchestrates: retrieve, draft, check, format. The path is written in Ruby, so it is testable, debuggable, and predictable. The model fills in steps; it does not choose them.
  3. An agent. The model chooses the next step. You pay for that autonomy in reliability, eval complexity, and debugging time. It earns its keep only when the path genuinely cannot be known in advance.

Four questions before anything gets called an agent: Is the task complex enough that the path varies per case? Is the value high enough to fund the eval suite autonomy requires? Can the cost of a wrong action be contained? Would a workflow with one branch do the same job?

Honest answers turn most agent proposals into workflow implementations, and the workflow ships a quarter earlier with a pass rate you can print.

The corollary for buyers: when a vendor pitches you an “agentic platform,” ask which rung of the ladder your actual use case needs. The answer is a staffing and judgment question, not a purchasing one.

Series so far: the loop, when you do need it, the breakers that contain it, the evals that prove it.