← All gamesYou + Jev

Jev Companion Arena — an AI teammate that decides for itself

Fight waves of enemies alongside a companion controlled by Jev. Each round you choose your move, then Jev picks its own action — Attack, Defend, Follow or Retreat — as one real API decision, shown with its confidence and a one-line reason. Survive four waves to win.

Your move — wave 1 of 4, 2 enemies leftR1· W1/4
You30/30
Jev companion30/30
Wave 1 — enemies
10
10
A wave of enemies closes in. You and Jev stand ready.
Build this with Jev

The same demo is one Jev call

  1. Read the battle state — HP, enemies, your last action
  2. The choices are ATTACK / DEFEND / FOLLOW / RETREAT
  3. Send it to Jev as one choice question
  4. Jev returns the companion's move (with confidence)
  5. Resolve the round, repeat
one decision per round · ~200ms · a real NPC brain
const res = await fetch("https://jevtypesafeai.com/api/v1/decide", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.JEV_API_KEY}` },
  body: JSON.stringify({
    state: `Player HP 24/30. Companion HP 11/30. 3 enemies left.`,  // the battle state, as text
    questions: {
      action: { type: "choice", instructions: "Best companion action this round?",
               criteria: { attack: "strike", defend: "brace", follow: "guard the player", retreat: "recover" } },
    },
  }),
});
const { answers } = await res.json();
act(answers.action.choice);   // → "follow" (0.63)
See a real decision FOLLOW · 219ms
State
Round 3, wave 2 of 4.
Player HP 24/30 (attacking).
You (companion) HP 11/30.
Enemies: 3 left, dealing ~6 dmg/round.
Question choice · action
follow63%
defend24%
retreat9%
attack4%
latency 219mscost $0.000014

How Jev plays your teammate

Your companion in this arena is not scripted. Every round the live battle state — round and wave number, your HP, Jev's HP, how many enemies are left and roughly how hard they hit, plus the action you just chose — is sent to the Jev API as a single typed decision: a `choice` over ATTACK, DEFEND, FOLLOW and RETREAT. Jev returns exactly one of those four, with a calibrated probability behind it, in tens to hundreds of milliseconds, and the companion acts on it.

That is why the page shows the pick, the confidence bar and a one-line rationale together with the call's latency and running cost. You are watching the same choice / score / noul decision a developer would wire into a real game NPC — here it just happens to be steering a battle ally. Drop a battle snapshot in, get a typed action out; no prose to parse, no hallucinated behavior.

What is Jev?

Jev is TypeSafe AI's first System One model. Instead of writing paragraphs like a chatbot, it reads a situation and returns a typed, calibrated decision — a choice between named options, a score on a scale, or a yes/no probability — fast and with no hallucinations. Because the answer is a bounded enum, you can switch on it directly in code: no parsing, no prompt-wrangling, no guessing what the model 'meant'.

The same model powers ticket routing, content moderation, lead scoring, model routing and agent tool-call guardrails in real products. Driving a game companion is just a vivid, visible way to watch it decide once per round.

Build an AI companion into your game

  • Send the game state you already have — HP, threats, cooldowns, position — as a short readable string; no schema gymnastics.
  • Ask one `choice` question with your action list as criteria; Jev returns a single valid action every time, so you can switch on it directly.
  • Read the probability on the chosen action to gate behavior — e.g. only commit to RETREAT above a confidence threshold, otherwise hold.
  • It is one HTTP call per decision at a fraction of a cent, fast enough to run every turn, tick or encounter without a heavyweight model.

FAQ

Does Jev really choose its own action each round?

Yes. On every round the battle snapshot is sent to the Jev API and it returns a typed choice — Attack, Defend, Follow or Retreat — with a calibrated probability. It is not a pre-scripted AI; it is a general decision model picking one bounded action per turn.

Is the Companion Arena free to play?

Yes. It runs in your browser with no API key and no signup. Each of Jev's decisions is a free, rate-limited call to the live Jev decision API, and the page shows the latency and running cost as you play.

Can we actually win?

Yes — the fight is tuned to be fair and winnable across four waves. Use Defend and Guard to survive big rounds, Rest to recover, and let Jev's Follow and Retreat choices heal-guard the team when things get dangerous.

Could I use this to drive a real game NPC?

That is exactly the point. The single `choice` call over Attack/Defend/Follow/Retreat is the same pattern you would put behind any NPC or companion: feed it your game state, get back one typed action you can switch on, with a confidence you can gate on.

More: Jev Trading Bot · Jev Gomoku · All decision games · Jev API docs

Jev Companion Arena — an AI teammate that decides for itself · Jev by TypeSafe AI