unity-jev-behavior
Unity Behavior action node that gets finite-outcome Jev decisions through an authenticated Node gateway with revision checks.
Overview
Jev Behavior for Unity adds a native Unity Behavior action node, Jev Decision, backed by an authenticated Node.js gateway. A policy asset declares a registered decision pack and allowed outcomes; the node sends state JSON with a revision number, and a valid result sets an Outcome blackboard variable. If the revision changes while evaluating, the stale response is rejected. Jev credentials stay on the gateway, and the game chooses its own next action from the outcome.
The gateway supports idempotent replay: an identical retry with the same request ID returns the cached result without another provider call, mismatched reuse returns 409, and a duplicate in-flight request returns 425. Tests cover Behavior types, finite outcomes, stale or misrouted responses and real HTTP against fixtures. The README notes no player build or live Jev inference has been run. Documentation is in French, English and Spanish.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which allowed outcome applies to this game state (e.g. support ticket routing in the sample)? | e.g. billing |
How it works
- A Behavior graph runs the Jev Decision node with state and revision.
- The Unity client calls the authenticated gateway.
- The gateway asks Jev via a registered decision pack.
- The node sets Outcome or Error; stale revisions are rejected.
Strengths
- Credentials never ship in the game.
- Finite outcomes and revision checks prevent stale actions.
- Idempotent retries without double inference.
Caveats
- No live Jev inference or player build verified yet.
- In-memory cache is per process and not multiplayer authorization.
Getting started
Add https://github.com/gbesse/unity-jev-behavior.git#v0.1.4 via UPM; run cd gateway && npm ci && npm run demo:fixture to check the gateway.At a glance
- Type
- Service
- Status
- prototype
- Language
- C#, JavaScript
- Runtime
- Unity Behavior package + Node gateway
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
Guarded asynchronous decision nodes for Unity Behavior, using a server-side…
wh000wh000/awesome-jev-live
Frequently asked questions
Where is the Jev key kept?
Only on the Node gateway, never in the game build.
What happens if the world changes during a decision?
Changing the revision rejects the stale response.
Has it run against live Jev?
Not yet, per the README; tests use synthetic fixtures.
Related projects
MoonBit and TypeScript Jev playground: gomoku, shell-command risk gate, ESLint plugin, a tiny Jev-condition language and measured reports.
AppresearchMoonBitSource for browser chess and Chess960 where code computes each legal move's facts and Jev picks one per turn as a typed Choice.
ProjectproductionTypeScriptBrowser 1v1 sniper arena where Jev reads match state about 9 times a second and chooses movement, aim, ADS, firing and jumping.
ServicebetaTypeScriptInstrumented 2048 web lab where every move is a Jev Choice over four directions, with probabilities, latency and cost shown live.
ProjectbetaTypeScriptFifteen live arcade games where Jev and LLMs play each other, led by WikiRace in which Jev picks only real links.
ProjectbetaTypeScriptReal-time bot battles where you write a fighter's strategy in plain English and a System One model pilots it several times a second.
ProjectbetaTypeScript