Skip to content

typesafe-sdk-go (dwisiswant0)

Go SDK for TypeSafe's System One API with named typed questions, flexible state and criteria types, and a reusable client.

Librarybeta

Overview

This Go SDK, published under the go.dw1.io module path, calls TypeSafe's System One API. You create one client and reuse it, then send a SystemOneRequest whose Questions map names each NoulQuestion, ChoiceQuestion or ScoreQuestion; answers come back under the same names as typed answer structs.

State, instructions and criterion descriptions accept strings, JSON objects or arrays, and Go structs or json.RawMessage values can be used directly. It requires Go 1.27.1+, reads TYPESAFE_API_KEY, and has documentation on pkg.go.dev. RawQuestion sends complete JSON for future question types, ExtraBody adds top-level fields, and unknown answer types are kept with their original JSON, so new API features can be used before the SDK models them. Timeouts default to 10 seconds per attempt.

What the decision model decides

TypeQuestionAnswers
Yes / noIs this urgent?Time-sensitive · Can wait
ChoiceWhich team should handle this?billing · technical
ScoreHow frustrated is the customer?Calm · Frustrated · Very angry

How it works

  1. Create a client with NewClient.
  2. Build named questions and state.
  3. Call SystemOne under a context deadline.
  4. Type-assert answers and act.

Strengths

  • Flexible state and criteria types including Go structs.
  • Reusable client with idle connection cleanup.

Caveats

  • Requires a recent Go toolchain (1.27.1).
  • Answers require type assertions.
  • Community SDK.

Getting started

go get go.dw1.io/typesafe-sdk-go@latest

At a glance

Type
Library
Status
beta
Language
Go
Runtime
library
Has code
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

What Go version is needed?

Go 1.27.1 or newer.

Can I pass Go structs as state?

Yes, along with strings, JSON objects, arrays and json.RawMessage.

How are answers matched to questions?

By the names you give in the Questions map.

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