10 Levels of Jev: Architecting Fast, Cost-Effective Agentic Decisions
Source: 10 Levels of Jev For Agentic Engineers — IndyDevDan https://youtu.be/_U-O5lYhJ7Q STATUS: I created my account and started a discussion on a tmux mia@gaia miadi-tide://miadi-jev and I have no idea if that was a success but for sure , we would integrate that layer into the miadi-factory to help the decisions (which imply questions: "Which decisions?", "which questions to ask to Jev and what is the context to send for having a decision?", "..." ; directly related (reviewing the same topic with 2 different presenters) ▥ review · ep 552 System-1 Decision Engineering with Jev and TypeSafe AI
in less than 55 words what is JEV ?
Jev is a system-one model for intelligent question answering via JSON.
It provides fast, cost-effective decisions, such as classification, scoring, and routing.
It is an essential, high-performance tool for agentic engineering workflows.
miadi-intent-usage
recent intention update after viewing what’s in between 18 and 20 in the time frame
- that would be switching task compaction and potentially renaming the session doing something at least the harness level
- obviously being a economic tokens by choosing at the routeing level which model should be doing what?
- There’s also the fact that we could observe the output of the event of our agent with Jev, kind of difficult to actually figure out exactly what but what I know is there so much limitation and observation and redundant things that I’m telling my agent is sure is something possible to analyse because I have all of my user input and that would be pattern and coded in the artist to actually provide and trigger execution or steering the agent with additional instructions and clarifications and things that always are redundant
original intention a few weeks ago
- obviously give some bones to any sequence of agents in my work and also you know there’s a bunch of packages and ways that my session starts that relates to ceremonies that relates to talking Circle that relates to a review and some common patterns that works when I am in relation to with agents such as using sub agents doing adversarial reviews bunch of things so this should be carefully analysed and we would try to pick up from it. what works great that might needs a study and we might already have things on the systems that could really be upgraded roght away and other others who will need phases….
- TODO relate/consolidate section with what agent and actually wrote at the end of this
- i’m getting that there really is something about decisions which basically we really need
Summary
IndyDevDan works through Jev, TypeSafe's "System One" decision model: it takes structured input and returns typed decisions with probabilities instead of generated text. Across ten levels, from a smart if-statement to Jev inside agents, he replaces slow, costly LLM calls with sub-second probabilistic checks that code turns into decisions: prompt-injection screening, tool-call gates, compaction triggers, and parallel codebase inspection that keeps file contents out of the main agent's context.
Academic Fields variation 1
Dual-Process Theory (Cognitive Psychology)
Kahneman's System 1 is fast, automatic judgement; System 2 is slow deliberation. TypeSafe borrows the name: Jev answers quickly and cheaply, and the frontier model deliberates. Bengio used the same split as an AI research agenda. It is a metaphor for division of labour, not a claim that Jev reasons like human intuition.
Probability Calibration (Machine Learning)
A calibrated model's 0.8 is right about 80% of the time. Guo et al. showed modern networks are often overconfident and proposed temperature scaling. Dan's gates depend on this property: a threshold means something only if the probability does, and calibration is measured over many predictions, never one answer.
Selective Prediction and Learning to Defer
A classifier may abstain when unsure (Chow's reject option) or hand the case to a person (Madras et al.). Dan's confidence gating is this pattern: act above one threshold, block below another, ask a human in between. The field studies how to set those thresholds for a chosen error rate.
Runtime Guardrails for LLM Agents (AI Safety)
Guardrail layers such as NeMo Guardrails sit between a model and its effects, checking inputs, outputs and actions at run time. Dan's pre-tool hooks are a guardrail with a learned classifier inside. Its limit is known: a probabilistic screen reduces risk but cannot prove an action safe.
Context Management for LLM Agents
Long-running agents exceed their context window, so something must decide what to keep, summarize or drop. MemGPT treats this like operating-system memory paging. Dan's compaction trigger asks a cheap model when a task boundary has been reached, instead of waiting for a token counter to overflow.
Model Cascades and Routing
FrugalGPT and RouteLLM show that sending each query to the cheapest model able to answer it cuts cost sharply at similar quality. Jev extends the idea: the first tier returns a typed decision rather than text, and the frontier model only receives what that decision passes on.
Academic fields variation 2
Artificial Intelligence
Focuses on creating autonomous systems capable of reasoning, planning, and goal-directed behavior. It provides the core theoretical framework for agentic workflows and intelligent decision-making logic found in modern AI systems.
Machine Learning
Studies algorithms that enable agents to learn from data, optimize performance, and improve decision-making accuracy through iterative feedback loops.
Natural Language Processing
Enables agents to interpret, generate, and interact using human language, serving as the interface for complex communication and intent understanding.
Software Engineering
Provides the principles for designing, building, and maintaining reliable, scalable agentic systems. It emphasizes architectural integrity, system lifecycle management, and the robust integration of AI components into production environments.
System Architecture
Focuses on the high-level design of modular agent frameworks, ensuring efficient component interaction, memory management, and durable state handling.
DevOps and LLMOps
Addresses the operational complexities of deploying, monitoring, and evaluating AI agents, ensuring security, performance, and continuous deployment in real-world applications.
Cybersecurity
Deals with the protection of AI systems, data integrity, and the mitigation of risks associated with autonomous tool use and agentic decision-making processes.
Adversarial AI
Examines vulnerabilities in AI models, focusing on preventing prompt injection, unauthorized access, and malicious manipulation of autonomous agent behaviors.
Network Security
Ensures that agent interactions with external systems, APIs, and databases remain secure, preventing data breaches or unauthorized command execution during agentic operations.
Data Science
Involves the collection, transformation, and analysis of large datasets used to train models and evaluate agent performance. It underpins retrieval-augmented generation and knowledge management strategies.
Information Retrieval
Focuses on the techniques for indexing and searching vast knowledge bases, essential for giving agents accurate, context-aware information retrieval capabilities.
Data Pipeline Engineering
Concentrates on creating efficient workflows for data ingestion, processing, and transformation, ensuring that agents have consistent access to high-quality information.
—-
Aspects
Single Decisions and Multi-Choice Classification (01:04-04:20)
Jev acts as a fast, programmable if-statement and classifier. Using structured JSON inputs, it returns calibrated probabilities for security tasks like prompt-injection detection and ticket routing in under a second, at a fraction of frontier-model pricing [01:04-04:20].
Composite Scoring and Confidence Gating (06:25-09:35)
Engineers can define composite scoring criteria in code rather than prompting, weighting parameters such as security risk and code complexity. Confidence gating intercepts irreversible actions before execution, prompting human confirmation only when uncertainty exceeds specific thresholds [06:25-09:35].
Agent Guardrail Hooks and Pre-Execution Interception (14:35-17:15)
Embedded inside an agent harness, Jev validates tool calls before execution. When an agent attempts dangerous bash commands like rm -rf or unauthorized file modifications to environment configs, Jev blocks execution and feeds explanatory reasons back into the loop [14:35-17:15].
Autonomous Context Compaction Triggers (17:38-19:40)
Instead of relying on rigid token counters or costly LLM queries, Jev inspects agent session context to detect task boundaries and recommend compaction. This keeps long-running agent workflows coherent without human intervention [17:38-19:40].
File Analysis Outside the Agent's Context and Scaled Repository Globs (20:06-25:55)
Agents can delegate file inspection to Jev tools across dozens of repository paths in parallel. Jev extracts answers without injecting full file contents into the primary agent's context window, which keeps the main context small and lowers token spend [20:06-25:55].
End-results and Core Aspect
Core Aspect — Agentic Co-Processing via Dedicated Decision Engines (29:34-31:25)
Rather than treating monolithic LLMs as catch-all execution units, developers integrate lightweight System-One decision engines directly into agent harnesses. This offloads deterministic routing, tool safety gating, and file screening to specialized micro-evaluations [29:34-31:25].
Results
- Cost and Latency Reduction (04:13-04:38): As summarized from the video, Jev decisions cost 4x to 600x less than frontier models and return in 200–400ms instead of multi-second generation [04:13-04:38]. TypeSafe's own published figures are 40–400x cheaper and 70–500ms end to end; neither has been independently checked.
- Threshold-Gated Safety for Autonomous Agents (15:25-17:10): In the demos, pre-hook tool gating stops destructive file deletions, credential leaks, and git force-pushes before they run [15:25-17:10]. The gate is as reliable as its threshold and Jev's calibration; it is a probabilistic screen, not a proof.
- High-Throughput Codebase Bug Hunting (26:00-28:25): Agents evaluate full repositories in parallel through recursive Jev queries, pinpointing relevant bug locations and test failures without loading thousands of source lines into active context [26:00-28:25].
Related Review
System-1 Decision Engineering with Jev and TypeSafe AI — How I AI (Claire Vo)
Same tool, other use. Dan puts Jev inside the agent harness: gating tool calls, timing compaction, screening files. Claire puts it over data: pairwise clustering, pre-filtering, sentiment. In both, Jev decides first and cheaply; the frontier model works only on what survives.
Internal Usage
A proposal, not something Miadi does today.
- Hook gates.
@miadi/hooks-corealready names the two moments Dan gates:tool.beforeandcontext.pre_compact. A scored check there could block a tool call above a threshold and ask a person between thresholds. No team inmiadi-orchestration-kit/teamsowns this package yet. - T1 · Session continuity. The restore relaunches only what a binding line names: a lookup, no classifier needed. A score matters only for sessions older than the binding line, where the agent a pane held must be guessed (A1's "strong candidate / none").
Definitions
Team. In Miadi, a team holds one desired outcome at one level of the system, such as the machine or the application. Every terminal session belongs to one team. Each team has a human lead and an agent lead, and the leads coordinate with the other teams' leads. The building teams (T1 session continuity, T2 event path) make packages and practices the other teams use. The witness team (T3) builds nothing and hears their work for William first (miadi-orchestration-kit#59). The teams are kept in miadi-orchestration-kit/teams.
System 1. Kahneman's name for fast, automatic judgement, used here as a metaphor. It does not mean deterministic: Jev returns probabilities. The decision becomes deterministic only when code applies a threshold to them.
Internal Usage. What a review could change for a named team or package; it proposes, it does not report.
Discussion
Ava & Mia - 261005-2004
Ava: Welcome back, everyone! Today I’m sitting down with Mia to talk about a major shift she’s been making in how she builds AI harnesses and data pipelines. Mia, I hear you’ve been relying less on giant frontier models like Opus 5.5 or GPT-6 and putting something called Jev at the center of your stack [1]. What is Jev, and why the sudden shift?
Mia: It really comes down to how we structure decision-making [2, 3]. Jev is a System-1 decision model developed by TypeSafe AI [2, 4]. Traditional LLMs generate text token-by-token, which makes every small check slow and expensive [4-6]. Jev doesn't generate conversational text at all; instead, it takes unstructured text or state as input and evaluates it against structured questions, returning type-safe JSON values with calibrated probabilities [5-8].
Ava: So instead of asking a big LLM to write out an answer and parsing text, Jev gives you programmatic decisions directly?
Mia: Exactly [7, 8]. It’s essentially intelligent question-answering that runs at light speed [7, 9]. Because Jev outputs typed data rather than long text streams, inference runs in sub-second timeframes—often 70 to 500 milliseconds—and costs pennies, being up to 400 times cheaper than standard LLM calls [4, 10, 11].
Ava: Wow, sub-second responses at a fraction of the cost [10, 11]! Walk us through how you actually write these questions for Jev. What are the building blocks?
Mia: Jev relies on three core primitives: Choice, Score, and Noul [3, 12]. Choice allows you to pass a list of predefined options and receive a probability distribution over those options [3, 12]. Score evaluates an input on a defined continuous or ordinal scale, like ranking bug severity from low to critical [12-14]. And Noul is a boolean primitive that returns the probability that a specific statement is true—like whether a prompt contains malicious intent [12, 14-16].
Ava: That sounds super clean. And if you have multiple questions about the same piece of text, do you have to make separate API calls?
Mia: No, and that’s one of the best parts [12]. Jev evaluates all questions in a request in parallel over the same state payload [12]. Adding extra questions barely impacts latency and only adds tiny token costs for the question definitions [12].
Ava: I can see why developers are excited. How are you actually applying this inside your AI agent harnesses? What does Jev handle that your main LLM used to do?
Mia: A prime example is tool-call gating and guardrails [17-19]. Before letting an autonomous agent execute dangerous bash commands like rm -rf or git push --force, I pass the command through a Jev Noul query to evaluate destructive intent or irreversibility [17-20]. If Jev detects high risk, the harness blocks execution before the tool ever runs [18, 19, 21].
Ava: So Jev acts as an instant safety brake inside the harness before damage can happen [18, 19]. What about managing memory or context windows when agents run long tasks?
Mia: We use Jev as an autonomous context compaction trigger [19, 22, 23]. Instead of relying on crude token counters or asking an expensive LLM if a task is finished, Jev inspects the session context at turn boundaries [19, 22-24]. When it detects that the agent is switching tasks, it signals the harness to compact the context history [19, 22, 23].
Ava: That keeps the agent focused without wasting expensive context window tokens [24, 25]. You also mentioned something about reading code repositories without actually feeding full files to your main model?
Mia: Yes, off-context file inspection [25-27]. If an agent needs to know which files in a repository contain auth logic or known bug shortcuts, Jev can scan entire globs of files in parallel [25, 27, 28]. Jev returns the classification probabilities without dumping thousands of source code lines into the primary model's context window [25-27].
Ava: That saves massive amounts of tokens and time [25, 27]. Now, I know you’ve also been using Jev outside of coding harnesses for large-scale data analysis. How does that work?
Mia: We use Jev for high-volume pairwise clustering and pre-filtering [29, 30]. For instance, by comparing thousands of pull requests or support tickets in rapid pairwise checks, Jev groups related items into thematic clusters for pennies [29-31]. Once Jev completes the heavy classification and sorting, we pass those curated clusters to frontier models like Gemini Flash or Opus for final synthesis [30-32].
Ava: Ah, so Jev handles the massive sorting step first, and the frontier model handles the deep reasoning on the curated data [25, 30, 32]! That’s a classic hybrid layering pattern [24, 30].
Mia: Exactly [30]. You use the right species of model for the right job [23, 33]. You don't need a massive multi-billion parameter model to make simple yes/no classifications or route requests [10, 34, 35].
Ava: It sounds like Jev isn't replacing frontier LLMs, but rather making the whole agent architecture faster, safer, and drastically cheaper [4, 36, 37].
Mia: Spot on [36]. Jev provides the fast, calibrated System-1 decision layer, while frontier LLMs handle the System-2 reasoning [4, 38, 39]. Together, they form a far more capable and production-ready AI harness [2, 7, 25].
Sources
- Kahneman, D. (2011). Thinking, Fast and Slow. Farrar, Straus and Giroux.
- Bengio, Y. (2019). From System 1 Deep Learning to System 2 Deep Learning. NeurIPS keynote.
- Guo, C., Pleiss, G., Sun, Y., Weinberger, K. (2017). On Calibration of Modern Neural Networks. ICML. https://arxiv.org/abs/1706.04599
- Chow, C. K. (1970). On optimum recognition error and reject tradeoff. IEEE Trans. Information Theory 16(1).
- Madras, D., Pitassi, T., Zemel, R. (2018). Predict Responsibly: Improving Fairness and Accuracy by Learning to Defer. NeurIPS. https://arxiv.org/abs/1711.06664
- Geifman, Y., El-Yaniv, R. (2017). Selective Classification for Deep Neural Networks. NeurIPS. https://arxiv.org/abs/1705.08500
- Rebedea, T. et al. (2023). NeMo Guardrails. EMNLP Demos. https://arxiv.org/abs/2310.10501
- Packer, C. et al. (2023). MemGPT: Towards LLMs as Operating Systems. https://arxiv.org/abs/2310.08560
- Chen, L., Zaharia, M., Zou, J. (2023). FrugalGPT. https://arxiv.org/abs/2305.05176
- Ong, I. et al. (2024). RouteLLM: Learning to Route LLMs with Preference Data. https://arxiv.org/abs/2406.18665
- TypeSafe (2026). System One concepts. https://docs.typesafe.ai/concepts/system-one