Skip to content

typesafe-ai-ruby

Standard-library-only Ruby client that sends Choice, Score or Noul questions to TypeSafe System One.

LibrarybetaMIT

Overview

typesafe-ai-ruby is an MIT-licensed Ruby gem for the System One API with no runtime dependencies beyond the standard library. It reads TYPESAFE_API_KEY automatically, and system_one takes a state and a hash of questions, each with a type, optional instructions and type-specific criteria.

Responses expose choices, scores and nouls with their values, confidence and the resolved model name. Questions are plain hashes matching the API reference, and unknown keys pass through untouched so new API fields work without a gem update. It requires Ruby 3.1+ and has CI. Instructions and descriptions can be strings, hashes or arrays, so structured criteria from the API reference work as-is. Answers include the resolved model name, such as jev-1.13.0, which helps when pinning versions.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich team should handle this?billing · technical · sales
ScoreHow frustrated is the customer?Calm · Frustrated but civil · Very angry
Yes / noDoes the message convey urgency?yes · no

How it works

  1. Install the gem and export TYPESAFE_API_KEY.
  2. Call client.system_one with state and questions.
  3. Read choices, scores and nouls from the response.
  4. Act on them in your Ruby code.

Strengths

  • No runtime dependencies.
  • Pass-through of unknown fields keeps it forward-compatible.
  • CI configured.

Caveats

  • Requires a TypeSafe key.
  • Community client.

Getting started

gem install typesafe-ai-ruby

At 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

Frequently asked questions

Does it have dependencies?

No runtime dependencies beyond Ruby's standard library.

What Ruby version is needed?

Ruby 3.1 or newer.

How are questions written?

As plain hashes with type, instructions and criteria, matching the API reference.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython