skip to content
~/examples · 5 chains

silly chains,
serious patterns.

every example is a real, typed jevchain program about something deeply unserious. each one teaches exactly one composition pattern you'd use in production. read the source, then run it in the studio.

reading the maps
  • calls jev
  • your code
  • leaf / emit
  • fork / join
patternwhy it matterstaught by
Intent routing + confidence fallbackUse a choice to pick a handler, and use its confidence as a second axis: when Jev isn't sure, route to a human instead of guessing. Nest gates and routes inside branches for multi-step triage.haunted-desk
Speculative fan-out + composite scoringFan out independent questions with parallel; asks against the same state are batched into a single request for free. Combine the answers with weights in code, where they're easy to test and tune.group-chat-drama
Cascade (cheap → thorough → fallback)Ask the cheapest question first and only escalate when confidence is low. Each tier can see more context; the fallback can be anything, like an LLM, a human queue or your friends.text-them-back
Threshold gate + unsure bandGate on a score or probability, and give borderline cases their own path. A decision near the bar is a different decision, not a coin flip.meeting-email
Multi-question ask + composite scoringAsk everything you need about one input in a single call (it's cheaper and faster than one call per question), then combine typed answers in plain code.pr-horoscope

api key

bring your own typesafe key, or ride the shared one (rate-limited, be nice).

shared key
checking…
your key
not set

your key stays in this browser (localStorage, jevchain.byok). it only travels to this site's /api/jev proxy in an x-typesafe-key header, which forwards it to typesafe and immediately forgets it. nothing is logged or stored server-side. requests on your own key get a much roomier rate limit.

keyboard shortcuts

fewer clicks, more chains. these work anywhere outside a text field.