Skip to content

Build1 publisher3 min readPublished

LangChain routes agent control decisions through a classifier call that returns a confidence score

The langchain-typesafe package lets an agent submit its state and a list of pre-defined questions in one request, and the speed figures behind it are TypeSafe's own, measured from laptops beside its own service.

The Engineer · Build desk

Illustration accompanying LangChain routes agent control decisions through a classifier call that returns a confidence score

What happened

  • LangChain said in a September 17th technical post that its integration of TypeSafe's Jev model gives agent builders typed, confidence-bearing decisions for routing and control inside the agent loop.
  • Developers install langchain-typesafe, set a TypeSafe API key and call TypeSafeClassifier from a node, a middleware hook or a tool, sending several questions against the same state in one request.
  • The integration followed TypeSafe's September 15th launch of Jev and DCVC's announcement the same day of a $40M seed round it led, which Forbes reported valued the San Francisco company at $200M.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • decision Teams relying on structured-output prompting for routing now have a comparison they can run on their own traffic: one .invoke() against the chat call it would replace, on the same state.
  • exposure Each routing decision becomes an outbound request authenticated with a TypeSafe API key, so the agent's next step depends on a startup's availability and on the network path between them.
  • constraint Because the design keeps a larger model at the center, whatever cost and latency a team recovers is capped by the share of its calls that are bounded classifications.
  • contradiction LangChain's post rounds the claims up to 200 times faster and 400 times lower cost, and the tests underneath those numbers are the vendor's own.

A call to `TypeSafeClassifier` through `.invoke()` sends the agent's current state and a set of typed questions whose possible answers were defined in advance [2]. Jev accepts that state as a support ticket, a log entry, a message history or a structured record, and it does not generate prose [3]. What comes back is a choice, a score or a yes-and-no probability, each with a confidence measure the surrounding code reads to pick its next step [4].

Several questions can travel in one request against the same state, and TypeSafe says Jev handles them in parallel [6]. The uses LangChain lists are ordinary: whether a customer request is urgent, which model should receive a task, whether an output needs verification, whether a case goes to a person, whether a proposed tool call looks risky [20].

LangChain's experimental `AutoModeMiddleware` uses Jev to classify tool calls before execution and can block actions involving tools such as a shell [7]. That puts the classifier in the enforcement path, where its answer decides whether a shell command runs.

The speed claim is the part to check before moving a router onto it. TypeSafe quotes response latency of 70 to 500 milliseconds and says Jev was 193.6 times faster than frontier language models in its workflow benchmarks [11][12]. Multiply the two and the baseline has to be slow: about 13.6 seconds at Jev's floor, about 96.8 seconds at its ceiling [1]. That only follows if the benchmarked workflow was a single classification. The disclosure does not say whether it was one call or a chain of them. The cost claim resolves the same way. LangChain's summary of 400 times lower cost, applied to Jev's $0.042 per million input tokens, implies a comparison model priced near $16.80 per million input tokens [13][2].

TypeSafe says its published speed tests generally ran from laptops on the West Coast, where its service is based [14]. A client sitting a few milliseconds from the endpoint measures a short network path, so part of that 70 ms floor is geography. The company also says one demonstration used a short, information-dense input that favored Jev's parallel sampling design [15]. For the numbers to transfer, your inputs have to be about that shape and your callers about that close.

Diogo Almeida started TypeSafe in 2024 after leaving OpenAI, where he co-authored the InstructGPT paper and contributed to the GPT-4 technical report [18]. "Models have been superhuman at chat for years, so where is all the automation?" he wrote in TypeSafe's introduction to Jev [19]. LangChain's post says Jev is not a drop-in replacement for an LLM, and the architecture it proposes keeps a larger model at the center of the agent with Jev doing the repeated classification around it [8].

Pricing is $0.042 per million input tokens, with output free [9]. A model that does not write prose has few output tokens to bill for. Vercel's AI Gateway lists Jev at about $0.04 per million input tokens, roughly 5 percent under TypeSafe's own price [10][3].

What to watch

  • Third-party latency measurements from clients outside the US West Coast, on inputs longer than the information-dense sample TypeSafe used in its demonstration.
  • Whether AutoModeMiddleware leaves experimental status, and what LangChain recommends when the classifier gating a shell tool call is unreachable.
  • Publication of the workflow benchmark in a form others can rerun: the inputs, the baseline model and the client region.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories