Skip to content

typesafe-sdk-rust

Rust SDK matching the Python typesafe-sdk 0.6.0 contract, with async and blocking clients and agent-facing integration notes.

LibrarybetaMIT

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

TypeQuestionAnswers
Yes / noIs this ticket about billing?yes · no
ChoiceWhat is the customer's tone?calm · frustrated · angry
ScoreHow urgent is this ticket?can wait · this week · today

How it works

  1. Add typesafe-sdk, tokio and serde_json.
  2. Create Client::from_env().
  3. Call system_one with state and named questions.
  4. 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

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 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