TypeSafe Jev via integration

Jev is TypeSafe’s System One model: it evaluates a state and typed questions, then returns structured answers (with probabilities and, for some question types, confidence). Jev does not replace chat models in Trace AI or Autonomic Agents. Use it when your workflow needs fast, typed decisions—routing, scoring, yes/no checks—that ordinary code can branch on.

Tealfabric does not ship a dedicated Jev connector. You connect through the Generic REST API connector (restapi-generic-1.1.0), which calls TypeSafe’s HTTP evaluation endpoint on your behalf. The same tenant integration can be invoked from ProcessFlow steps, Trace AI (execute_tenant_integration), and Autonomic Agents (same MCP tool, when allowed).

Document information
FieldValue
Canonical URL/docs/07_ai-agents-and-mcp/30_typesafe_jev_via_integration
Version (published date)2026-09-27
Tagsai, integrations, processflow, trace-ai, autonomic, typesafe, jev
Connector IDrestapi-generic-1.1.0
External APITypeSafe System One API

What Jev is (and is not)

Jev (System One)Trace / Autonomic LLM
POST evaluation: state + questions → typed answersChat: messages → assistant text and optional tool calls
Best for classify, score, route, guardrail checksBest for dialogue, reasoning, file edits, multi-step tool loops
Typical latency: sub-second per request (vendor-dependent)Typical latency: seconds to minutes for frontier models

Do not assign Jev as the Model on an Autonomic Agent or expect it in the chat model catalog. Call Jev through an integration when a step or agent needs a structured judgment, then continue with your LLM or deterministic logic.

Authoritative question shapes: TypeSafe primitives (choice, score, noul).

Prerequisites

  1. A TypeSafe API key with access to Jev (early access via TypeSafe).
  2. A tenant integration using connector restapi-generic-1.1.0 (not 1.0.0—older versions only send X-API-Key, while TypeSafe requires Authorization: Bearer).
  3. Outbound HTTPS from the Tealfabric integration worker to https://api.typesafe.ai.

Store the key in integration configuration (or tenant keystore patterns your team uses for connector secrets). Rotate keys on the same schedule as other vendor API keys.

Create the integration

Create one write integration dedicated to Jev evaluation (POST only). Name it clearly, for example TypeSafe Jev — evaluate.

Connector configuration

FieldValue
urlhttps://api.typesafe.ai
pathv1
methodPOST
auth_header_nameAuthorization
api_keyBearer <TYPESAFE_API_KEY> (include the Bearer prefix in the stored value)
content_typeapplication/json
acceptapplication/json
timeout_seconds30 (increase only if you batch many questions in one call)

Integration description (important for Trace AI)

In the integration description, paste stable links so agents can look up payloads without guessing:

Also state the fixed operation: send to path systemone (full URL https://api.typesafe.ai/v1/systemone).

Agent access

CallerSetting
Trace AIEnable Executable by AI Agents only if chat should call Jev directly. Prefer a ProcessFlow wrapper (see below) and leave the raw integration off agents when you want a fixed question set.
Autonomic AgentSame flag. Autonomic runs are unattended—use allowlisted processes or a narrow integration description so the agent does not invent arbitrary questions.
ProcessFlow onlyLeave Executable by AI Agents off; steps call the integration by integration_id.

For read/write separation guidance, see Generic REST API connector — split read and write. Jev has no useful GET evaluation path; skip a separate “read” integration.

Request and response shape

TypeSafe expects a JSON body:

{
  "state": "Help! My payouts have been failing for 3 days.",
  "model": "jev-latest",
  "questions": {
    "is_urgent": {
      "type": "noul",
      "instructions": "Does this convey urgency?"
    }
  }
}

Through restapi-generic, use operation send and put that object in data (or body):

{
  "operation": "send",
  "endpoint": "systemone",
  "method": "POST",
  "data": {
    "state": "Help! My payouts have been failing for 3 days.",
    "model": "jev-latest",
    "questions": {
      "is_urgent": {
        "type": "noul",
        "instructions": "Does this convey urgency?"
      }
    }
  }
}

On success, the connector returns the vendor JSON under response, for example:

{
  "model": "jev-1.13.0",
  "answers": {
    "is_urgent": { "type": "noul", "noul": 0.95 }
  },
  "usage": { "input_tokens": 307, "output_tokens": 20 }
}

Use answers.<question_id>.confidence on choice and score answers when you gate automation (confidence routing).

Call from ProcessFlow

ProcessFlow steps should treat Jev as one integration call, then map answers in code (thresholds, routing, DataPool writes). Prefer keeping question definitions in the process (or a shared tenant module), not only in free-form agent text.

TypeScript step (recommended)

Requires sandbox connector capability. Replace <INTEGRATION_ID> with your integration entity id.

const integrationId = "<INTEGRATION_ID>";

const state =
  typeof process_input.text === "string"
    ? process_input.text
    : JSON.stringify(process_input.record ?? process_input);

const payload = {
  operation: "send",
  endpoint: "systemone",
  method: "POST",
  data: {
    state,
    model: "jev-latest",
    questions: {
      route: {
        type: "choice",
        instructions: "Which team should handle this?",
        criteria: {
          billing: "Payments, invoicing, refunds",
          technical: "Bugs, outages, integrations",
          sales: "Pricing, upgrades, new accounts",
        },
      },
      is_urgent: {
        type: "noul",
        instructions: "Does this convey urgency?",
      },
    },
  },
};

const raw = await tf.connector.execute(integrationId, "send", payload);

if (!raw?.success) {
  return {
    success: false,
    error: String(raw?.error ?? "TypeSafe evaluation failed"),
  };
}

const vendor = (raw.result ?? raw.data)?.response ?? {};
const answers = vendor.answers ?? {};
const route = answers.route?.choice ?? "technical";
const urgent = Number(answers.is_urgent?.noul ?? 0);
const confidence = Number(answers.route?.confidence ?? 0);

return {
  success: true,
  data: {
    route,
    urgent,
    confidence,
    usage: vendor.usage ?? null,
    needs_review: confidence < 0.7,
  },
};

Patterns: Integration connector usage, Process sandbox tf API.

Process as an agent tool

When Trace or Autonomic should not call TypeSafe directly, wrap the step above in a ProcessFlow with a stable input_data contract and enable Executable by AI Agents. Agents then use execute_process instead of building raw questions JSON. See Process flows as custom AI agent tools.

Call from Trace AI

Trace AI uses the MCP tool execute_tenant_integration when the integration has Executable by AI Agents.

Recommended sequence (agent payload contracts):

  1. describe_tenant_integration with your integration_id and operation: "send".
  2. Build data from the describe schema (endpoint systemone, data.state, data.model, data.questions).
  3. execute_tenant_integration with integration_id, operation: "send", and that data.

Example tool payload (illustrative):

{
  "integration_id": "<INTEGRATION_ID>",
  "operation": "send",
  "data": {
    "endpoint": "systemone",
    "method": "POST",
    "data": {
      "state": "Customer message from ticket #1042 …",
      "model": "jev-latest",
      "questions": {
        "severity": {
          "type": "score",
          "instructions": "How severe is the impact?",
          "criteria": ["Low", "Medium", "High"]
        }
      }
    }
  }
}

Load integrations platform skill (load_platform_skill with skill_id: integrations) when the agent needs list/describe helpers. See Platform skills quick reference.

Governance: Jev calls consume TypeSafe quota. For production, prefer a process wrapper with fixed questions, or restrict which integrations have Executable by AI Agents. See Platform actions — integration execute.

Call from Autonomic Agents

Autonomic Agents use the same execute_tenant_integration tool inside their MCP tool loop when:

  • AUTONOMIC_AGENTS_ENABLED is on for the deployment,
  • the integration has Executable by AI Agents, and
  • the agent’s mandate and allowlists permit the call.

Typical pattern:

  1. Sense — read mailbox, webhook payload, or DataPool row into a string or object for state.
  2. Reason — either call Jev directly via the integration or execute_process on an allowlisted process that wraps Jev.
  3. Act — branch on answers (route to process, emit_event, need_human when confidence is low).

Autonomic turn models still produce the decision JSON (continue, execute_process, …). Jev does not replace that contract; it supplies inputs to your branching logic. See Autonomic Agents.

For low-confidence outcomes, return need_human rather than dispatching side effects—mirroring confidence-gated routing.

Design practices

Atomic questions. Ask one judgment per question; combine results in process code (how to build with System One).

Batch in one call. Multiple questions in one send share one round trip; add questions instead of chaining many HTTP calls when latency matters (parallel questions pattern).

Choice cardinality. At most 255 options per choice question (TypeSafe limit).

Do not log secrets. Keep API keys out of state, process logs, and chat transcripts. Redact customer PII in logs when possible.

Retries. TypeSafe may return 429 or 529; retry with backoff in ProcessFlow for transient errors. See Integration connector usage — retries.

LLM + Jev together. Use Jev to classify, score, or gate; use tf.llm.callLLM or Trace for narrative text and tool-heavy work (SDE cascade cookbook describes a similar split).

Troubleshooting

SymptomLikely causeFix
HTTP 401Missing or wrong Bearer tokenUse restapi-generic-1.1.0, auth_header_name: Authorization, api_key: Bearer …
HTTP 422Invalid questions schemaCompare payload to API reference
Connector VALIDATION / SSRFBad URLurl must be public https://api.typesafe.ai
Trace cannot executeFlag offEnable Executable by AI Agents on the integration, or use a process tool
Empty responseWrong operationUse send, not receive (Jev is POST-only)

The connector test operation performs GET against the configured base path; it is not a full Jev health check. Validate with a real send to systemone in a sandbox process.

Related documentation