Skip to content

tinystruct-typesafe-sdk

Java SDK that lets natural language invoke tinystruct @Action methods, using Jev as a semantic dispatcher with confidence gates.

Librarybeta

Overview

tinystruct-typesafe connects natural-language requests to existing @Action methods in the tinystruct Java framework. Jev acts as a semantic dispatcher: given a request such as "create an admin account for John", it picks the action and parameter values from options the code supplies, and every argument ends up as an enum constant, a boolean or a verbatim span of the user's input. It is explicitly not a chatbot and has no prompt API.

It targets Java teams who want natural-language entry points without letting a model generate arbitrary values. Results above a threshold execute; mid-confidence results become a pending confirmation workflow; low-confidence ones are rejected with an AmbiguousIntentException. The project is split into a System One client (with a mock), a core dispatch pipeline with policies, cache and metrics, an optional workflow module for confirmations, and demo apps for user management, CRM and help desk.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich @Action should handle this request?—
ChoiceWhich enum value fits this parameter (e.g. role)?(inferred)e.g. ADMIN · USER
ExtractWhich span of the user's input is the value for this parameter (e.g. name)?—

How it works

  1. User input reaches the dispatcher.
  2. Questions are generated from routable actions and their parameters and sent to /v1/systemone.
  3. Above the threshold the action is invoked; between thresholds a confirmation workflow is created.
  4. Below the minimum confidence the request is rejected as ambiguous.

Strengths

  • Arguments are limited to enums, booleans or spans of the input, so the model cannot invent values.
  • Three-band confidence policy separates execute, confirm and reject.
  • Mock client allows testing without the API.
  • Published to Maven.

Caveats

  • Tied to the tinystruct framework.
  • Confirmation flows require the separate workflow module.
  • Uses the hosted Jev API.

Getting started

bin/dispatcher semantic --input "create an admin account for John"

At a glance

Type
Library
Status
beta
Language
Java
Runtime
tinystruct framework library
Has code
yes

Use cases and integrations

How curated lists describe it

  • SDK: TypeSafe Jev integration library for building type-safe classification and routing decisions with structured outputs.

    yibie/awesome-jev
  • A tinystruct-based TypeSafe SDK with JEV model.

    hellogumbo/awesome-jev

Frequently asked questions

What does Jev decide here?

Which tinystruct action a request maps to and which supplied values its parameters take.

Can it generate arbitrary arguments?

No; every argument is an enum, a boolean or a verbatim span of the user's input.

What happens with an ambiguous request?

Mid-confidence requests await confirmation; low-confidence ones are rejected.

Related projects

  • Experimental Hono router that matches HTTP requests to plain-language route descriptions using one Jev Noul per route.

    ProjectprototypeTypeScript
  • Rails engine for voice and typed commands: define actions in a Ruby DSL and Jev picks the matching command or page control.

    ProjectprototypeRuby
  • Symfony demo that triages French public-service requests with one Jev call each: intent choice, urgency score and bug noul.

    AppprototypePHP
  • 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
  • elizaOS autonomous agent framework, listed for an optional TypeSafe System One HTTP adapter in its source.

    ServiceproductionTypeScript