# 10 Levels of Jev For Agentic Engineers

## Executive summary

Jev by TypeSafe is presented as a novel, highly scalable, and cost-effective intelligent question-answering tool programmable through JSON, designed to enhance agentic engineering workflows. Instead of replacing Large Language Models (LLMs), Jev acts as a 'third primitive' that allows agents to perform focused, deterministic decision-making, classification, and validation tasks (e.g., prompt injection checks, code review risk scoring, bash command gating) at a fraction of the cost and complexity of running full LLM calls. The video details a progression through 10 levels of Jev usage, culminating in 'Agentic Jev,' where the agent itself determines when and how to invoke Jev for self-validation and optimization.

## Key takeaways

- Jev's Core Functionality: Jev provides intelligent question answering programmable through JSON. It is designed to handle structured decisions (Yes/No, Multiple Choice, Composite Scoring) without needing the overhead of a full language model, making it highly scalable and cheap to run.
- Scaling and Cost Efficiency: Jev's pricing model is optimized for millions of executions, offering massive cost advantages over state-of-the-art models (e.g., comparing Jev to Fable 5.1, which can cost $11,000 for a query that costs only $0.20 with Jev).
- Advanced Agent Safety (Level 6): Jev can be embedded into an agent harness to act as a guardrail, blocking dangerous or irreversible actions (e.g., `rm -rf node_modules`) before the agent can execute them, significantly increasing agent safety.
- Context Management (Level 7): Jev can be used to manage agent context, recommending or requesting self-compaction when the agent reaches specific token thresholds or switches tasks, optimizing performance and cost.
- File-Level Intelligence (Level 8 & 9): Jev can perform 'cheap reads' by classifying files (e.g., determining if a file contains credentials or if it should be read into context) or answering questions about multiple files across a codebase without reading them, saving tokens and time.
- Agentic Decision Making (Level 10): The highest level allows the agent to decide when and how to use Jev. The agent uses Jev to validate its own assumptions, classify test failures, and assess risk scores, creating a powerful self-validation loop.

## Technical details

- Level 1: Basic Decision Making: Simple Yes/No classification, ideal for tasks like prompt injection detection. The confidence interval (e.g., 99%) guides the decision-making process.
- Level 2: Multiple Choice Options: Used for structured support triage (e.g., classifying a bug report and setting a priority level) based on a defined list of options.
- Level 3: Composite Scoring: Allows for calculating a weighted score (e.g., Code Review Risk) based on multiple defined inputs (e.g., security risk, change size, pattern adherence).
- Level 4: Confidence Gating: Implementing gates on dangerous tools, such as bash commands. Jev determines the reversibility and destructive intent of a command before allowing execution.
- Level 5: Intent and Model Routing: Using Jev to determine the optimal agent or model required for a task (e.g., routing a 'Login flow' request to a 'browser agent').
- Level 6: Tool Call Guardrails: Embedding Jev within an agent harness to block specific, dangerous tool calls (e.g., `rm -rf node_modules`) or write operations, providing robust security.
- Level 8: File Classification: Delegating QA tasks for file reading outside of the expensive LLM context window. The agent asks Jev to determine if a file needs to be read or if it contains specific information (e.g., credentials).
- Level 9: Files at Scale: Scaling up file analysis by asking the same question across many files in parallel (e.g., checking 10 files for known bugs) without reading any of them into the context.
- Level 10: Agentic Jev: The agent uses Jev as a tool to validate its own assumptions, classify test failures, and assess risk scores, creating a self-correcting and highly efficient workflow.

## Practical implications

- Integrate Jev into agent harnesses to implement mandatory guardrails (e.g., blocking irreversible bash commands).
- Use Jev for pre-processing and validation tasks (e.g., classifying code review risk or determining if a file needs to be read) to drastically reduce LLM token usage and cost.
- Implement Jev for state management and context awareness, allowing agents to self-compact or route requests to the most appropriate specialized model.
- Leverage Jev's JSON-programmable nature to ensure deterministic, reliable decision-making in production systems where LLM hallucination is unacceptable.

## Topics

Agentic Engineering, Build Automation, LLM Tooling, JSON Schema, System Design, Cost Optimization, CI/CD, 10 Levels Of Jev, Agent Swarms, Self-Compact Pi Agent, Build YOUR Software Factory, TypeSafe launch post

Source: https://www.youtube.com/watch?v=_U-O5lYhJ7Q
