Jev Decisions · by TypeSafe, on CompanyFabric

Decide first.
Generate second.

Jev is a decision model. It never writes text. You send a situation and typed questions, and it returns one calibrated probability per question in about 100 ms, for $0.042 per million tokens. Put it in front of anything expensive.

Jev Decisions playgroundtypesafe/jev-latest · $0.042 / M input · output free

Before an expensive step: does this need a tool, a frontier model, or a human?

Sign in to run

Free starter credits cover thousands of decisions. Or copy the code below and run it with your own key.

Answers arrive here as probabilities, one card per question, in about 100 ms. No text to parse, nothing invented outside the options you gave.

The MCP `decide` tool exposes this same call, so an agent can gate its own spend.

What to do with the numbers

  • ask_human > 0.6 → stop, summarise, wait.
  • needs_tool > 0.6 → run `tool`; do not call a model for this step.
  • escalate_model > 0.6 → companyfabric/best for this step only; else companyfabric/cheap.
  • Every gate is a $0.00001 call in front of a $0.05 one.

This exact request, in code

curl https://api.companyfabric.com/v1/decisions \
  -H "Authorization: Bearer $COMPANYFABRIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "typesafe/jev-latest",
  "state": {
    "task": "Refactor the payments module to async/await and add tests for the retry path.",
    "context": "12 files touched so far, test suite red on 3 cases, user has not replied in 40 minutes.",
    "last_error": "TimeoutError in retry_payment after 30s"
  },
  "questions": {
    "needs_tool": {
      "type": "noul",
      "instructions": "Does the next step require running a tool (edit a file, run tests, search)?"
    },
    "tool": {
      "type": "choice",
      "instructions": "If a tool is needed, which one?",
      "criteria": {
        "run_tests": "Execute the test suite",
        "edit_file": "Change source code",
        "search_codebase": "Find definitions or usages",
        "none": "No tool needed"
      }
    },
    "escalate_model": {
      "type": "noul",
      "instructions": "Does this step need a frontier model rather than a cheap one?",
      "criteria": {
        "true": "Multi-file reasoning, ambiguous failure, design decision",
        "false": "Mechanical edit, summary, or a known fix"
      }
    },
    "ask_human": {
      "type": "noul",
      "instructions": "Should the agent stop and ask the user before continuing?"
    }
  }
}'

Needs a CompanyFabric key, or add your own TypeSafe key in the BYOK vault and pay them directly at 0% fee. Cost comes back in usage.cost_usd.

How it works

One call.
Many answers.

Same key and same balance as the chat models. BYOK with your own TypeSafe key routes at 0% fee. The welcome credit covers thousands of decisions.

01

Send a state

A ticket, a brief, a transcript, a JSON record. Text or JSON, up to about 32k tokens. It is sent once, whatever you ask about it.

02

Ask typed questions

noul is a yes/no probability. choice picks one label from criteria you describe. score places on a rubric you define, from zero. Ask several in one call.

03

Threshold the numbers

Answers are probabilities and distributions, never prose. Act above a threshold, hand to a human below it, and treat a noul near 0.5 as unsure.

Put a decision
in front of the spend.

POST /v1/decisions from your code, or let your agent call the decide tool on our MCP server before every expensive step.