SDKs & clients

jev-game-tools

@Eniip11Pythonupdated 2026-09-19runnable

Experiments in driving real-time games with TypeSafe Jev: a fast

Eniip/jev-game-tools

Where it calls Jev

from typesafe_sdk import Choice, Noul, Score, TypeSafeAPIError, TypeSafeClient

src/jev_game_lab/smoke.py:8

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from src/jev_game_lab/smoke.py:18

  1. actionchoice

    Pick the single best action for the player right now.

    • attackShoot the nearest enemy.
    • retreatMove away from enemies to gain distance.
    • grab_medkitMove toward the medkit pickup.
    • run_to_exitHead straight for the level exit.
  2. in_dangertrue/false

    Is the player in immediate danger of dying within the next few seconds?

  3. threatscore

    How threatening is the overall situation for the player?

    • 0trivial
    • 1manageable
    • 2dangerous
    • 3critical

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    action: { type: 'choice', instructions: 'Pick the single best action for the player right now.',
      criteria: { attack: 'Shoot the nearest enemy.', retreat: 'Move away from enemies to gain distance.', grab_medkit: 'Move toward the medkit pickup.', run_to_exit: 'Head straight for the level exit.' } },
    in_danger: { type: 'boolean', instructions: 'Is the player in immediate danger of dying within the next few seconds?' },
    threat: { type: 'score', instructions: 'How threatening is the overall situation for the player?',
      criteria: ['trivial', 'manageable', 'dangerous', 'critical'] },
  },
});

Other projects in this category