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
| Field | Value |
|---|---|
| Canonical URL | /docs/07_ai-agents-and-mcp/30_typesafe_jev_via_integration |
| Version (published date) | 2026-09-27 |
| Tags | ai, integrations, processflow, trace-ai, autonomic, typesafe, jev |
| Connector ID | restapi-generic-1.1.0 |
| External API | TypeSafe System One API |
What Jev is (and is not)
| Jev (System One) | Trace / Autonomic LLM |
|---|---|
POST evaluation: state + questions → typed answers | Chat: messages → assistant text and optional tool calls |
| Best for classify, score, route, guardrail checks | Best 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
- A TypeSafe API key with access to Jev (early access via TypeSafe).
- A tenant integration using connector
restapi-generic-1.1.0(not1.0.0—older versions only sendX-API-Key, while TypeSafe requiresAuthorization: Bearer). - 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
| Field | Value |
|---|---|
url | https://api.typesafe.ai |
path | v1 |
method | POST |
auth_header_name | Authorization |
api_key | Bearer <TYPESAFE_API_KEY> (include the Bearer prefix in the stored value) |
content_type | application/json |
accept | application/json |
timeout_seconds | 30 (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
| Caller | Setting |
|---|---|
| Trace AI | Enable 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 Agent | Same flag. Autonomic runs are unattended—use allowlisted processes or a narrow integration description so the agent does not invent arbitrary questions. |
| ProcessFlow only | Leave 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):
describe_tenant_integrationwith yourintegration_idandoperation: "send".- Build
datafrom the describe schema (endpointsystemone,data.state,data.model,data.questions). execute_tenant_integrationwithintegration_id,operation: "send", and thatdata.
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_ENABLEDis on for the deployment,- the integration has Executable by AI Agents, and
- the agent’s mandate and allowlists permit the call.
Typical pattern:
- Sense — read mailbox, webhook payload, or DataPool row into a string or object for
state. - Reason — either call Jev directly via the integration or
execute_processon an allowlisted process that wraps Jev. - Act — branch on
answers(route to process,emit_event,need_humanwhen 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
| Symptom | Likely cause | Fix |
|---|---|---|
| HTTP 401 | Missing or wrong Bearer token | Use restapi-generic-1.1.0, auth_header_name: Authorization, api_key: Bearer … |
| HTTP 422 | Invalid questions schema | Compare payload to API reference |
| Connector VALIDATION / SSRF | Bad URL | url must be public https://api.typesafe.ai |
| Trace cannot execute | Flag off | Enable Executable by AI Agents on the integration, or use a process tool |
Empty response | Wrong operation | Use 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.