Ruby SDK
Community Ruby 3.1+ client for TypeSafe's System One API with Noul, Choice and Score objects, retries and pooled HTTP.
Overview
typesafe-sdk for Ruby is a community client for the TypeSafe System One API, defaulting to jev-latest. You create a client with an API key and call system_one with a state and a hash of questions built from Noul, Choice and Score objects, or plain hashes with a type key; extra keys pass through to the API untouched for forward compatibility. Responses expose answers keyed by name, plus filtered nouls, choices and scores with probabilities, confidence and legends mirroring the Python SDK.
The client validates obvious mistakes before sending (no questions, a score with fewer than two levels, a choice without criteria, NaN in state) and converts objects that respond to as_json. It retries 408, 429 and 5xx responses and connection failures with exponential backoff and jitter, with a configurable retry policy and total time budget, and lists models. The list notes thread-safe pooled HTTP and no async client. The README emphasises gating actions on confidence.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which team should handle this? | billing · technical · sales |
| Score | How frustrated the customer appears | Calm, just stating facts · Frustrated but civil · Very angry, strong language |
| Yes / no | The message conveys urgency or time-sensitivity | — |
How it works
- bundle add typesafe-sdk and create a client
- Build Noul/Choice/Score questions
- Call system_one(state:, questions:)
- Gate actions on the returned confidence
Strengths
- Client-side validation saves wasted calls
- Configurable retries with total time budget
- Thread-safe pooled HTTP per the list
Caveats
- Community project, not official
- No async client
Getting started
bundle add typesafe-sdk, then Typesafe::SDK::Client.new(api_key: "sk-...").system_one(state:, questions:).At a glance
- Type
- Library
- Status
- beta
- Language
- Ruby
- Runtime
- Ruby gem (3.1+)
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Community Ruby 3.1+ client: Noul / Choice / Score, retries, model listing, thread-safe pooled HTTP. No async client.
AnotiaWang/awesome-decision-modelsA community Ruby client for TypeSafe System One, defaulting to jev-latest.
logicrw/awesome-jev-projectsRuby client for typesafe.ai.
hellogumbo/awesome-jev
Frequently asked questions
Is this the official Ruby SDK?
It is described as a community client.
Does it retry failed calls?
Yes, 408, 429, 5xx and connection failures, two retries by default with backoff.
Which model does it use?
jev-latest unless you specify another.
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