Skip to content

typesafe-go

Standard-library Go client for System One where question handles carry their own id and answer type, with completeness checks.

LibrarybetaMIT

Overview

This typesafe-go from 2389 Research is an MIT-licensed Go client for TypeSafe's System One API with no dependencies outside the standard library. Its design centers on question handles: a question is a value you keep, carrying its own id and answer type, and you read the answer back through that handle. Choice questions are generic over your own string types, so a department enum maps directly to options.

The compiler checks the answer shape, so a Noul handle cannot return a Choice answer. Mismatched ids fail at read time with ErrWrongType instead of returning a zero value, and From checks that every documented payload field is present, reporting ErrIncompleteAnswer for truncated responses rather than reading a confident zero. A triage example is included.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this convey urgency?yes · no
ChoiceWhich team should handle this?billing · technical · sales

How it works

  1. Create a client with typesafe.New().
  2. Build Noul and Choice handles.
  3. Call client.Ask with the state and handles.
  4. Read each answer with handle.From(res).

Strengths

  • Compile-time answer shape checks.
  • Truncated responses produce errors, not silent zeros.
  • No third-party dependencies.

Caveats

  • Requires a TypeSafe key.
  • Ids are not compiler-checked across handles.

Getting started

go get github.com/2389-research/typesafe-go

At a glance

Type
Library
Status
beta
Language
Go
Runtime
library
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

  • A TypeSafe System One client that uses only the Go standard library to send Jev questions and read structured answers.

    logicrw/awesome-jev-projects

Frequently asked questions

What is a question handle?

A value that carries a question's id and answer type, used to read its answer back safely.

What happens with a truncated response?

From returns ErrIncompleteAnswer instead of a zero value.

Does it have dependencies?

Only the Go standard library.

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