typesafe-rs
Latency-focused community Rust SDK for System One with official-SDK parity, an optional blocking client and an in-process mock crate.
Overview
typesafe-rs is an MIT-licensed community Rust client for TypeSafe's System One API. Environment variables, defaults, retries, identification headers and error kinds match the official Python SDK and @typesafe-ai/sdk. It is async by default on tokio, with an optional blocking feature, and uses rustls TLS by default with native-tls available. MSRV is Rust 1.85.
Questions are built with a questions! macro and fluent builders (when_true and when_false for Noul criteria, option for Choice, level for Score), and responses offer typed accessors. A companion crate, typesafe-rs-mock, provides an in-process mock of /v1/systemone and /v1/models for tests. The lists describe it as latency-first. It is published on crates.io with CI. The README states that environment variables, defaults, retries, identification headers and error kinds were matched to the official SDKs on purpose.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this convey urgency? | Explicitly time-sensitive · No time pressure |
| Choice | Which team should handle this? | billing · technical · sales |
| Score | How frustrated is the customer? | Calm · Frustrated · Very angry |
How it works
- Add typesafe-rs (and tokio) to Cargo.toml.
- Create a Client from the environment.
- Call system_one with state and the questions! macro.
- Read noul, choice or score from the response.
Strengths
- Behavior parity with official SDKs.
- In-process mock crate for tests.
- Async or blocking clients.
Caveats
- Community SDK; version 0.1.
- Requires a TypeSafe key.
Getting started
Add typesafe-rs = "0.1" to Cargo.toml and export TYPESAFE_API_KEY.At a glance
- Type
- Library
- Status
- beta
- Language
- Rust
- Runtime
- library (crate)
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Latency-focused Rust transport SDK aiming for behavioral parity with the official clients.
AnotiaWang/awesome-decision-modelsA community Rust Jev client with async requests, an optional blocking interface and local mock testing.
logicrw/awesome-jev-projectsLatency-first Rust SDK for TypeSafe System One.
hellogumbo/awesome-jev
Frequently asked questions
How do I test without the API?
Use the typesafe-rs-mock crate, which mocks the endpoints in-process.
Is there a blocking client?
Yes, behind the blocking feature.
What is the minimum Rust version?
1.85.
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