typesafe-sdk-rust
Rust SDK matching the Python typesafe-sdk 0.6.0 contract, with async and blocking clients and agent-facing integration notes.
Overview
codeitlikemiley's TypeSafe Rust SDK (crate typesafe-sdk) matches the contract of the Python typesafe-sdk 0.6.0: callers send named questions and get typed answers. It requires Rust 1.85+ (edition 2024), uses reqwest 0.12, and offers a blocking feature for non-async scripts. TypeSafeClient is an alias for Client for those coming from Python.
The README includes a section for AI agents pointing them to AGENTS.md and an example file before writing integration code. It is MIT licensed per the list. Configuration follows the Python SDK: TYPESAFE_API_KEY, TYPESAFE_DEFAULT_MODEL defaulting to jev-latest, a 10 second per-attempt timeout, and an optional log level with secret headers redacted. Models can be listed with client.models().
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this ticket about billing? | yes · no |
| Choice | What is the customer's tone? | calm · frustrated · angry |
| Score | How urgent is this ticket? | can wait · this week · today |
How it works
- Add typesafe-sdk, tokio and serde_json.
- Create Client::from_env().
- Call system_one with state and named questions.
- Read typed answers.
Strengths
- Matches the Python SDK contract.
- Async or blocking.
- Guidance for coding agents.
Caveats
- Enables serde_json's preserve_order feature in your build.
- Community SDK.
Getting started
Add typesafe-sdk = "0.2" (plus tokio and serde_json) to Cargo.toml.At a glance
- Type
- Library
- Status
- beta
- Language
- Rust
- Runtime
- library (crate)
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
A Rust client for TypeSafe with asynchronous and optional blocking calls plus typed question and answer wrappers.
logicrw/awesome-jev-projectsRust SDK for the TypeSafe AI API.
hellogumbo/awesome-jev
Frequently asked questions
Which contract does it follow?
The Python typesafe-sdk 0.6.0.
Is there a blocking client?
Yes, via the blocking feature.
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