typesafe-jev-ruby
Zero-dependency Ruby gem for Jev with immutable Noul, Choice and Score question objects and a one-shot evaluate facade.
Overview
typesafe-jev is an MIT-licensed Ruby client for Jev with no runtime dependencies beyond the standard library, so it works in plain Ruby and Rails. Typesafe::Jev.evaluate is a one-shot facade pinned to jev-latest; Typesafe::Client allows other models.
Questions are frozen, immutable value objects; the question id is the hash key in the questions map rather than part of the object. Noul returns a probability, Choice returns an option, full distribution and confidence, and Score returns a level, a legend, the distribution and confidence. Usage such as input tokens is exposed. It is published on RubyGems with CI. Questions are frozen value objects, so the same question definitions can be reused safely across requests, and the evaluate facade reports usage such as input tokens.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does the customer request a refund? | yes · no |
| Choice | Which category does this ticket belong to? | billing · technical · sales |
| Score | How severe is this ticket? | Low: routine request · Medium: degraded experience · High: blocked user · Critical: money lost or security issue |
How it works
- gem install typesafe-jev.
- Call Typesafe::Jev.evaluate with state and questions.
- Read noul, choice, probabilities or score.
- Act in Ruby or Rails code.
Strengths
- No runtime dependencies.
- Immutable question objects.
- Usage reporting.
Caveats
- Requires a TypeSafe key.
- Community gem.
Getting started
gem install typesafe-jevAt a glance
- Type
- Library
- Status
- beta
- Language
- Ruby
- Runtime
- library (gem)
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Ruby client for Jev, TypeSafe's System One model: typed questions, probabilistic answers. Zero runtime dependencies.
logicrw/awesome-jev-projects
Frequently asked questions
Does it work with Rails?
Yes, it is pure Ruby and works in plain Ruby and Rails.
How do I use a model other than jev-latest?
Use Typesafe::Client directly.
Where is the question id?
It is the key in the questions hash, not part of the question object.
Related projects
Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.
MCP serverproductionTypeScriptAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPGo MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.
MCP serverproductionGoSimon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.
PluginproductionPython