Skip to content

pydantic-ai-go

Go port of PydanticAI's typed agent loop with a TypeSafe Jev model provider alongside the usual LLM providers.

Projectbeta

Overview

pydantic-ai-go brings PydanticAI's behaviour to Go: an agent loop with typed dependencies and outputs, tools whose argument structs become JSON Schemas, structured output validated against a reflected schema with retries, normalized streaming events across providers, usage limits and model middleware. The public API is idiomatic Go, with Agent[Deps, Output] generics.

Its provider table lists TypeSafe Jev via typesafe.NewModel("jev-latest") with TYPESAFE_API_KEY, and the list summary adds a generic System One provider next to the LLM providers. That lets a Go service use the same agent abstraction for steps that are really typed judgments and hand them to a decision model rather than a text-generating LLM. It is aimed at Go developers who want PydanticAI-style agents without Python.

What the decision model decides

TypeQuestionAnswers
ChoiceAgent steps whose structured output maps to a typed Jev question(inferred)—

How it works

  1. Create an Agent with a typed output struct
  2. Pick typesafe.NewModel("jev-latest") or a generic System One provider
  3. Run the agent; the provider sends the typed question to Jev
  4. Use the returned typed result or fall back to an LLM provider

Strengths

  • Idiomatic Go API following PydanticAI behaviour
  • Jev sits behind the same provider interface as LLMs
  • Concurrent runs on one agent are safe per the README

Caveats

  • Jev details beyond the provider table are not described in the README excerpt
  • No licence stated

Getting started

go get github.com/Kludex/pydantic-ai-go/ai (Go 1.25+), then set TYPESAFE_API_KEY for the Jev provider.

At a glance

Type
Project
Status
beta
Language
Go
Runtime
Go library
Has code
yes

Use cases and integrations

How curated lists describe it

  • Go port of PydanticAI's agent loop, tools and structured output, with a TypeSafe Jev model provider and a generic System One provider alongside the LLM ones.

    MrJev/awesome-jev

Frequently asked questions

How do I select Jev?

Use typesafe.NewModel("jev-latest") with TYPESAFE_API_KEY set, per the provider table.

Is it the official Pydantic project?

It is a Go port that follows PydanticAI's behaviour; the README does not call it official.

Can Jev generate text output here?

No; Jev answers typed questions, so it suits typed outputs rather than string replies.

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