[Feature]: Add first-class support for TypeSafe AI's Jev (System One) decision model (Python)

Open
#8,556 2 comments 0 reactions 1 assignee View on GitHub

@rogerbarreto is already working on this.

Since Sep 20, 2026.

Assessment

This issue has not been assessed yet.

Description

.NET agents python
Description
Summary

Request first-class integration of TypeSafe AI's Jev model into the Microsoft Agent Framework Python SDK, similar to what LangChain (langchain-typesafe) and Pydantic AI (pydantic-ai-slim[typesafe], TypeSafeModel) already ship.

What is Jev?

Jev is a "System One" model released by TypeSafe AI on 2026-09-15. It does not generate text. You send it a piece of state (text or JSON) plus a set of typed questions, and it returns structured decisions with probabilities in a single parallel pass:

  • Noul: yes/no probability in [0, 1]
  • Choice: pick one option from a list you define, with probabilities
  • Score: rate against an ordered scale you define

It is fast and cheap relative to frontier LLMs (vendor cites 40x–200x lower latency, $0.042 per million input tokens, output free), which makes it a good fit for the high-frequency control-plane decisions inside agent loops: routing, tool-call risk gating, scoring, escalation, model selection.

Docs: https://docs.typesafe.ai/concepts/system-one
Announcement: https://typesafe.ai/blog/introducing-system-one-models-and-jev

What problem does it solve?

Today, decisions like "is this tool call safe?", "which sub-agent should handle this?" or "is this task simple enough for a small model?" are made either by hard-coded rules or by asking the generative LLM and parsing free-form output. Jev gives typed, calibrated answers directly, with no parsing, at a fraction of the latency and cost.

Why it fits MAF
  • Maps naturally onto the Python SDK's existing extension points: FunctionMiddleware (gate tool calls before execution, alongside ToolApprovalMiddleware), AgentMiddleware/ChatMiddleware (routing, model selection), AIFunction tools, and workflow executors/routers.
  • Complements generative providers rather than competing with them: the LLM plans and generates, Jev decides.
  • Keeps parity with other major Python agent frameworks that already have official packages.
Design note: Jev is not a chat model

Every existing provider package under python/packages/ is a chat client implementing SupportsChatGetResponse. Jev cannot be exposed that way. The proposal is a separate decision-client abstraction with adapters for middleware, tools and workflows, rather than a new chat provider.

Suggested integration surface
  • New package following the existing naming convention: agent-framework-typesafe under python/packages/typesafe.
  • A JevClient exposing an evaluate call that accepts state + questions and returns typed answers with probabilities.
  • Adapters:
    • FunctionMiddleware factory for scoring/gating tool calls with a configurable threshold.
    • AgentMiddleware/ChatMiddleware factory for routing and model selection.
    • Helper to wrap a set of questions as an AIFunction tool.
    • Workflow executor/router for conditional edges.
  • Ability to pass MAF session or workflow state as the Jev state.
  • Optional confidence threshold with fallback to a generative model.
Alternatives considered
  • Calling the raw TypeSafe HTTP API (POST /v1/systemone) from custom middleware or tools. Works today, but every team rebuilds the same boilerplate and type mapping.
  • Community MCP servers for Jev. Usable through the hosting-mcp / MCP tool support, but adds a hop and loses the typed result surface.
Code Sample
# Desired Python experience: new package `agent-framework-typesafe`
from agent_framework import Agent
from agent_framework.azure import AzureOpenAIChatClient
from agent_framework.typesafe import JevClient, Noul, Choice, Score

jev = JevClient()  # reads TYPESAFE_API_KEY

# 1) Direct decision call (usable from tools, workflow executors, routers)
result = await jev.evaluate(
    state={"ticket": ticket_text},
    questions={
        "urgent": Noul("Does this require immediate attention?"),
        "department": Choice(
            "Which team should handle this?",
            criteria={"billing": "Payment issues", "technical": "Bugs", "other": "Everything else"},
        ),
    },
)
result.answers["urgent"].probability  # float in [0, 1]
result.answers["department"].value    # "billing" | "technical" | "other"

# 2) As FunctionMiddleware: score tool calls before execution
risk_gate = jev.function_middleware(
    question=Score("How risky is this tool call?", criteria=["safe", "needs_review", "dangerous"]),
    block_at="dangerous",
)

agent = Agent(
    client=AzureOpenAIChatClient(),
    instructions="You are a support triage agent.",
    middleware=[risk_gate],
)
Language/SDK

Python

Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
1d 21h
Merged PRs (30d)
362

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/agent-framework

All issues in microsoft/agent-framework

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.