Post
CommunityJev Guides & Articles
Building a Harness with Jev
LangChain's post on putting Jev inside agent loops: it introduces System One models, shows TypeSafeClassifier calls in Python, and demonstrates a model-routing middleware, with tool output kept out of the classifier's input.
- Format
- Post
- Reading time
- 2 min
- Published by
- Community
- Author
- Sydney Runkle and Hunter Lovell
- Last verified
- Oct 2026
Used inJev for Software & DevTools
- Languages
- Python
- Capabilities
- Requires API key
Highlights
- Walks the agent loop (decide, run a tool, evaluate, repeat) and slots Jev in as the fast typed decision instead of another chat call.
- Shows the support-ticket example: one Noul question over a state string returns a 99.9% urgency probability your code can act on.
- Covers Choice, Score, and Noul, and notes System One models evaluate every question in a request in parallel at little extra cost.
- Install langchain-typesafe, set TYPESAFE_API_KEY, and invoke TypeSafeClassifier with a state and questions to get classifications, not chat text.
- A ModelRouterMiddleware picks between labelled ModelChoices by criteria, such as openai:luna for lookups and openai:sol for hard decisions.
Quickstart
python
from langchain_typesafe import Noul, TypeSafeClassifier
classifier = TypeSafeClassifier()
response = classifier.invoke({
'state': 'The deploy failed twice and customers are seeing 500s. Can someone look now?',
'questions': {'urgent': Noul(instructions='Does this need attention right now?')},
})
urgency = response.nouls['urgent'].noulWatch out
Grounded in the truncated blog capture and the madewithjev listing description reviewed on 2026-10-15; the post's auto-mode section is cut off mid-sentence, the tool-call-gate detail comes from the listing text, and the 200x speed and 400x cost figures are attributed to TypeSafe AI, not independent tests.
Questions about this entry
Short answers drawn from the linked project or page.
It introduces Jev and System One models, then shows how to use them in LangChain: the agent loop gets slow and costly when every decision needs a model call, so the post wires Jev in through a classifier and a model router.
Install langchain-typesafe, set TYPESAFE_API_KEY, then invoke TypeSafeClassifier with a state and questions. The example asks one Noul and reads the urgency probability from response.nouls['urgent'].noul instead of a chat response.
Three: Choice picks from a set of options and returns a probability for each plus an overall confidence; Score rates input against ordered levels; Noul answers yes-or-no with the probability that a statement is true.
ModelRouterMiddleware lets Jev judge the latest user message and pick among labelled ModelChoices by criteria, such as openai:luna for direct lookups and openai:sol for architecture decisions, with probabilities kept in agent state.
The madewithjev listing highlights one design point: tool output stays out of the classifier's input, so Jev judges state the harness prepares rather than raw tool results. The captured post was truncated before that section.
No. The post attributes the up-to-200x faster inference and 400x lower cost on classification tasks to TypeSafe AI; these are company-reported figures, not a third-party benchmark run for the article.
Sydney Runkle and Hunter Lovell published Building a Harness with Jev on LangChain's blog on September 17, 2026, in the Open Source Agent Architecture series, at about a five-minute read.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.