Rust SDK (typesafe-ai-rs)
Independent Rust SDK for TypeSafe's System One API with async and blocking clients, typed Noul/Choice/Score, retries and metadata.
Overview
typesafe-ai-rs is an independently maintained Rust client for the TypeSafe System One API. It provides async and blocking clients, typed Noul, Choice and Score questions and answers, model discovery, configurable retries, cancellation and complete HTTP response metadata. It targets parity with the official Python and JavaScript SDKs at version 0.6.0, with parity notes documenting exact source revisions and deliberate Rust differences.
A request is built from a JSON state and keyed questions; responses expose filtered nouls, choices and scores. Configuration comes from TYPESAFE_API_KEY, TYPESAFE_BASE_URL, TYPESAFE_DEFAULT_MODEL (jev-latest) and TYPESAFE_LOG_LEVEL. TLS defaults to Rustls with an optional native-tls feature, and logging uses the log facade with sensitive headers redacted. Rust 1.88 or newer is required.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this about billing? | — |
| Choice | What is the customer's tone? | calm · frustrated · angry |
| Score | How urgent is this? | can wait · this week · today |
How it works
- cargo add typesafe-ai-rs and set TYPESAFE_API_KEY
- Build a SystemOneRequest with state and typed questions
- Call client.system_one (async or blocking)
- Read typed answers and response metadata
Strengths
- Async and blocking clients
- Parity with official SDK 0.6.0 documented
- Redacted logging of secrets
Caveats
- Independent, not official
- Requires Rust 1.88+
Getting started
cargo add typesafe-ai-rs tokio serde_json, set TYPESAFE_API_KEY, then Client::new()?.system_one(...).At a glance
- Type
- Library
- Status
- beta
- Language
- Rust
- Runtime
- Rust library
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Independent async and blocking client for System One.
AnotiaWang/awesome-decision-modelsAn independently maintained Rust SDK with async and blocking clients, retries and response metadata.
logicrw/awesome-jev-projectsIndependent async and blocking Rust SDK for the TypeSafe AI System One API.
wh000wh000/awesome-jev-liveIndependent async and blocking Rust SDK for the TypeSafe AI System One API.
hellogumbo/awesome-jev
Frequently asked questions
Is this the official Rust SDK?
No; it is an independent client that tracks the official SDKs' behaviour.
Does it support synchronous code?
Yes, enable the blocking feature.
Which model does it use by default?
jev-latest, overridable with TYPESAFE_DEFAULT_MODEL.
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