Skip to content

spring-ai-typesafe

Java SDK for TypeSafe's System One API plus Spring AI integrations using Jev as judge, guardrail, RAG filter/reranker and tool index.

LibrarybetaApache-2.0

Overview

Spring AI TypeSafe provides a Java client for TypeSafe's System One API built on Spring RestClient and Jackson 3, and Spring AI integrations on top. The client offers typed Noul, Choice and Score questions, retries, batches and typed exceptions without any Spring AI dependency; a starter adds spring.ai.typesafe properties and an auto-configured client bean, and a BOM aligns versions. Eight runnable examples are included and Java 17 or newer is required.

The Spring AI module includes JevJudge (model-as-a-judge built from atomic criteria rather than one rubric prompt), JevSelfRefineAdvisor (judge an answer, feed the defect back, retry), JevGuardrailAdvisor (screen prompts and answers without retry, because an unsafe answer is not a draft), JevDocumentFilter and JevDocumentReranker for RAG post-processing, and JevToolIndex for tool selection that can answer 'none of these apply'. The README's guiding pattern is atomic questions composed in code. It is Apache-2.0 licensed under the Spring AI community organisation.

What the decision model decides

TypeQuestionAnswers
Yes / noDoes this convey urgency?—
ChoiceWhich team should handle this?billing · technical · sales
ScoreHow frustrated is the customer?Calm · Frustrated · Very angry
ChoiceWhich tool applies (or none of these)?—

How it works

  1. Add the starter and set spring.ai.typesafe.api-key
  2. Use TypeSafeClient directly or a Spring AI advisor
  3. Jev answers atomic questions over the state
  4. Code composes answers into judge verdicts, guardrails, reranking or tool choice

Strengths

  • Idiomatic Spring integration
  • Guardrails, judging and RAG post-processing out of the box
  • Tool index can say none apply

Caveats

  • Requires a TypeSafe key
  • Spring AI 2.0.1+ for the integration module

Getting started

Add org.springaicommunity:spring-ai-starter-typesafe:0.4.0 and set spring.ai.typesafe.api-key=${TYPESAFE_API_KEY}.

At a glance

Type
Library
Status
beta
Language
Java
Runtime
JVM library (Spring Boot / Spring AI)
Has code
yes
License
Apache-2.0

Use cases and integrations

How curated lists describe it

  • Java ecosystem: Java SDK for TypeSafe AI's Jev API and Spring AI integration, providing typed decisions for evaluation as a judge, guardrails, and RAG post-processing.

    yibie/awesome-jev
  • A Java SDK for the TypeSafe AI JEV API, & Spring AI TypeSafe integrations.

    hellogumbo/awesome-jev
  • Java client for the System One API on Spring `RestClient`, plus Spring AI integrations that use it as a judge, a guardrail, a RAG post-processor and a tool index.

    MrJev/awesome-jev

Frequently asked questions

Can I use the client without Spring?

Yes, typesafe-java-sdk has no Spring AI dependency.

What can Jev do in Spring AI here?

Judge answers, guard prompts and outputs, filter and rerank retrieved documents, and select tools.

Why atomic questions?

The README prefers many small questions composed in code over one broad rubric prompt.

Related projects

  • RubyLLM provider gem for TypeSafe Jev: block-style typed evaluations with noul, choice and score, plus RubyLLM.rerank support.

    ProjectbetaRuby
  • 248 small installable TypeScript recipes that each make one typed Jev decision: route, rerank, gate, grade, compare or label.

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