Skip to content

typesafe-dotnet

Unofficial .NET client (TypeSafeSharp) for System One with official-SDK retry behavior, typed answers, DI and OpenTelemetry tracing.

Librarybeta

Overview

TypeSafeSharp is an unofficial .NET client for System One and Jev, targeting netstandard2.0 and net10.0. It aims to match the official JavaScript and Python SDKs' behavior for retries, errors and key handling, while adding typed answers, a dependency-injection extension package and OpenTelemetry tracing.

A single thread-safe TypeSafeClient is meant to be shared per app. State can be serialized from your own types, Choice options can come from enum names, and unmodeled question shapes can be passed as JSON. EvaluateManyAsync runs many requests with bounded concurrency (four by default), yields results as they finish, and stops early on a rejected key or wrong model. Packages are on NuGet with CI. Choice options can be built from enum names and parsed back into the enum, and question shapes the package does not yet model can be passed as raw JSON.

What the decision model decides

TypeQuestionAnswers
ChoiceWhat is this message about?billing · technical · other
Yes / noThe customer needs action todayyes · no

How it works

  1. Create one shared TypeSafeClient.
  2. Call SystemOneAsync with state and questions, or EvaluateManyAsync for batches.
  3. Read typed answers with GetChoice or GetNoul.
  4. Apply thresholds in your code.

Strengths

  • Official-SDK-like retry and error handling.
  • Dependency injection and OpenTelemetry support.
  • Bounded concurrent batch evaluation.

Caveats

  • Unofficial.
  • Requires a TypeSafe key.

Getting started

dotnet add package TypeSafeSharp

At a glance

Type
Library
Status
beta
Language
C#
Runtime
.NET library
Has code
yes
Has tests
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

Which .NET versions are supported?

netstandard2.0 and net10.0.

How do I evaluate many items?

Use EvaluateManyAsync, which runs up to four calls at once by default.

Is it official?

No.

Related projects

  • 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
  • Elixir library for unified LLM calls across providers, with an evaluate interface that calls Jev via TypeSafe or OpenRouter.

    ProjectproductionElixir
  • Self-hosted multi-tenant AI agent platform listed as including optional TypeSafe client tools for classification, scoring and yes/no.

    LibraryproductionPython
  • Provider-agnostic TypeScript AI SDK; per list sources, an @tanstack/ai-typesafe adapter exposes Jev decisions through decide().

    ServiceproductionTypeScript