agent-loopsActive Specification

Agent Step & Action Router

Parallel Choice / Noul / Score dispatch for autonomous agent loops using Jev AI tools primitives.

Architecture overview

Autonomous agents that ask a generative LLM for every intermediate routing step pay multi-second latency and fragile JSON parsing cost. This directory page documents a common Jev AI tools composition: one shared agent state plus several typed questions (next action, human gate, complexity) evaluated in a single System One request.

Traditional LLM limitation

Autoregressive LLMs often take seconds and emit fragile JSON that breaks when brackets or keys drift.

Jev AI tools advantage

Official System One primitives return constrained Choice / Noul / Score answers with calibrated distributions, within TypeSafe’s published latency and pricing envelope.

Official API schema (field names from docs.typesafe.ai)

Source: TypeSafe HTTP API reference. Question IDs below this table are directory example compositions — you choose them.

FieldTypeRangeNotes
statestring | object | arrayPlain text or structured JSONContent to evaluate. Shared across all questions in one request.
modelstringe.g. "jev-latest"Optional; defaults to TypeSafe flagship alias when omitted in SDKs.
questions.<id>.type"choice" | "score" | "noul"Exactly one of three primitivesQuestion ID is chosen by you; answers return under the same keys.
questions.<id>.instructionsstringNatural-language judgmentThe actual question sent for inference (IDs are not sent to the model).
questions.<id>.criteria (choice)Record<option, string | null>1–255 optionsMap of option key → rubric description.
questions.<id>.criteria (score)string[]≥ 2 ordered levelsOrdered level descriptions; score is a weighted position along them.
questions.<id>.criteria (noul){ true?: string; false?: string }OptionalOptional clarification of yes/no meanings. Answer field is noul ∈ [0, 1].
answers.<id> (choice){ type, choice, probabilities, confidence }choice ∈ criteria keys; confidence ∈ [0, 1]Probabilities sum to 1 across options.
answers.<id> (score){ type, score, legend, probabilities, confidence }score may fall between levelslegend maps level index → description.
answers.<id> (noul){ type, noul }noul ∈ [0, 1]Probability that the answer is yes. No separate confidence field.
usage{ input_tokens, output_tokens }Non-negative integersToken accounting for the request.

Example composition for this Jev AI tools workflow

Sample state and question keys are illustrative compositions for this directory page — not a separate official product API. Primitives remain Choice / Score / Noul.

User Goal: "Analyze this repository for security vulnerabilities."
Current Context: Repository contains 14 files, no automated tests configured.
Choice
next_action: What is the optimal next pipeline action?
Options: [static_analysis, run_unit_tests, architecture_review, no_action]
Noul
require_human_gate: Does this action involve high-risk credential access or database alteration?
Score
complexity_score: Estimated task complexity
levels: trivial → critical_overhaul

Runnable call examples

Endpoint: https://api.typesafe.ai/v1/systemone (official). Requires your own TYPESAFE_API_KEY.

curl

curl -X POST https://api.typesafe.ai/v1/systemone \
  -H "Authorization: Bearer $TYPESAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state":{"goal":"Analyze repository for security issues."},"model":"jev-latest","questions":{"next_action":{"type":"choice","instructions":"What is the optimal next pipeline action?","criteria":{"static_analysis":"Run static analysis first","run_unit_tests":"Execute unit tests","architecture_review":"Human architecture review","no_action":"Nothing further"}},"require_human_gate":{"type":"noul","instructions":"High-risk credential or DB changes?"},"complexity":{"type":"score","instructions":"Estimated task complexity","criteria":["Trivial","Moderate","Critical overhaul"]}}}'

TypeScript

import { choice, noul, score, TypeSafeClient } from "@typesafe-ai/sdk";

const client = new TypeSafeClient();
const res = await client.systemOne({
  state: {
    goal: "Analyze repository for security issues.",
    context: "14 files, no automated tests",
  },
  model: "jev-latest",
  questions: {
    next_action: choice("What is the optimal next pipeline action?", {
      static_analysis: "Run static analysis first",
      run_unit_tests: "Execute unit tests",
      architecture_review: "Human architecture review",
      no_action: "Nothing further needed",
    }),
    require_human_gate: noul("Does this action involve high-risk credential or DB changes?"),
    complexity: score("Estimated task complexity", [
      "Trivial",
      "Moderate",
      "Critical overhaul",
    ]),
  },
});

Python

from typesafe_sdk import Choice, Noul, Score, TypeSafeClient

with TypeSafeClient() as client:
    res = client.system_one(
        state={
            "goal": "Analyze repository for security issues.",
            "context": "14 files, no automated tests",
        },
        model="jev-latest",
        questions={
            "next_action": Choice(
                instructions="What is the optimal next pipeline action?",
                criteria={
                    "static_analysis": "Run static analysis first",
                    "run_unit_tests": "Execute unit tests",
                    "architecture_review": "Human architecture review",
                    "no_action": "Nothing further needed",
                },
            ),
            "require_human_gate": Noul(
                instructions="Does this action involve high-risk credential or DB changes?",
            ),
            "complexity": Score(
                instructions="Estimated task complexity",
                criteria=["Trivial", "Moderate", "Critical overhaul"],
            ),
        },
    )

Latency & cost (source attribution)

Official end-to-end latency range: ~70–500ms; many calls land near ~100ms from US West Coast (source: typesafe.ai / TypeSafe public materials, 2026-09). Official list price: $0.042 / 1M input tokens; output tokens free (source: typesafe.ai, as of 2026-09). Card latency figures are illustrative compositions within that published range — not independent lab measurements by this directory.

  • Card illustration on this page: ~78ms (illustrative, within official range — not a lab run by jevaitools.com).
  • Official list price: $0.042 / 1M input tokens; output tokens free (source: typesafe.ai, as of 2026-09).

This directory has not published an independent measurement script for this page. To measure yourself: call the official endpoint with your key, record wall-clock p50/p95 andusage.input_tokens, and keep the date of the run.

Comparison with generative LLMs on the same decision task

TypeSafe publishes workflow evaluations where Jev is compared with frontier LLMs on accuracy, cost, and latency (company materials, 2026). Those multipliers are vendor-reported ceilings, not results measured by this directory. Run the same questions through an LLM structured-output adapter on your labeled set before choosing a stack.

Suitable for

  • High-frequency agent step selection with a closed action set
  • Human-in-the-loop gates expressed as Noul thresholds
  • Composite priority from Score + Choice in application code

Not suitable for

  • Writing patches, explanations, or long-form research
  • Open-ended planning that cannot be expressed as typed questions
  • Tasks that need tool use or multi-hop retrieval inside the model

Common failure modes

  • Too few Choice options without an explicit other/none path → forced wrong pick
  • Vague instructions that ask for “best plan” instead of one snap judgment
  • Putting dependent questions in one request when the second needs the first answer as new state

Other Jev AI Tools

This site is an independent third-party directory and is not affiliated with, endorsed by, or operated by TypeSafe AI.