Skip to main content
A coding agent driven by deterministic workflows whose routing is a typed decision — the Lousho equivalent of TypeSafe’s Jev / “System One” pattern (introducing-system-one-models-and-jev). Jev models answer structured probabilistic questions — classify, route, score, verify — instead of generating text. The Lousho form of that is createAgent({ output: DECISION }): the model returns { route, confidence, reason } validated by a zod schema (readable as result.object), and the workflow branches on the typed fields.
Two properties worth stealing:
  • Calibrated abstention. confidenceFloor (default 0.7) routes low-confidence decisions to the careful workflow — the model declares uncertainty, the harness degrades gracefully instead of trusting a shaky route.
  • Typed degradation. An unparseable triage reply returns confidence: 0 → careful path. There is no path where a malformed decision silently becomes “fix things”.
Run it:
The workflows reuse the phase-pipeline shape; the typed decision generalizes to any classify/route/verify step — see docs/prompting-techniques.md.