Skip to content

pi-typesafe

Pi extension with a consented, key-managed TypeSafe client, a batched typesafe_evaluate tool, a playground and an extension API.

PluginbetaMIT

Overview

pi-typesafe brings Jev into Pi as shared infrastructure. It provides a typesafe_evaluate tool that hands small structured judgments (classify, triage, compare, score) to Jev in one batched call; a terminal playground (/typesafe test, /typesafe playground) that runs requests without touching the model's context; and a typed API so other extensions, such as pi-warden, share one client, key store and login prompt and can report whether Jev was reachable and what it cost.

You log in with /typesafe login (hidden input, verified against the API and stored with owner-only permissions), test with a sample request, and enable the tool for a session only after confirming a data notice. TYPESAFE_API_KEY in the environment takes precedence for CI or scripts. It explains Choice, Score and Noul, runs all questions in parallel, and has an offline-testable transport and CI. It requires Pi 0.85+ and Node 22.19+, is MIT licensed, and is independent of TypeSafe and the Pi authors.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich team should handle this?billing · technical · other
ScoreWhere on this rubric does it sit?—
Yes / noIs this statement true?yes · no

How it works

  1. /typesafe login to store a verified key.
  2. /typesafe enable after confirming the data notice.
  3. Agent calls typesafe_evaluate with batched questions.
  4. Other extensions reuse the shared client and key.

Strengths

  • One key store for multiple extensions.
  • Explicit consent before the agent can send data.
  • Offline-testable transport.

Caveats

  • Usage billed to your TypeSafe account.
  • Requires Pi 0.85+.

Getting started

pi install npm:pi-typesafe, then /typesafe login, /typesafe test and /typesafe enable.

At a glance

Type
Plugin
Status
beta
Language
TypeScript
Runtime
Pi extension
Has code
yes
Has tests
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

Why a shared client?

So extensions like pi-warden don't each ask for a key and can report reachability and cost.

Can the agent use it immediately?

Only after /typesafe enable and confirming the data notice.

Where is the key stored?

In ~/.pi/agent/pi-typesafe/auth.json with owner-only permissions, unless the environment variable is set.

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