Skip to content

Jev Snake — lalitsonawane

A Next.js Snake game where every move is a live System One Choice call: run it on Jev, on the wire-compatible Drex, or send the same state to both in parallel and watch the probabilities side by side.

Stars
1
Language
TypeScript
Published by
Community
Author
lalitsonawane
Last verified
Oct 2026

About this project

Snake autoplay where every move decision is a live System One Choice via POST /v1/systemone. Pick Jev (TypeSafe), Drex, or Compare both side by side. Safe straight-line holds may reuse the last legal direction without a new API call. Drex is wire-compatible with TypeSafe Jev (noul / choice / score). The TypeSafe SDK can talk to Drex by swapping three settings: API key, base URL, and default model (drex-latest). Some TypeSafe-shaped requests may return 422 from Drex on purpose (stricter validation).

Quoted from the project's README. Read the full README.

Highlights

  • Compare mode sends identical state and questions to Jev and Drex in parallel and lets you decide which model's choice actually moves the snake.
  • Safe straight-line holds reuse the last legal direction with no API call, so the tick loop is not one inference request per frame.
  • API keys are read only in the server Route Handler; the browser calls a same-origin route and never sees a key.
  • The classic rules are spelled out, including that a self-crash must not count the tail cell the snake is vacating.

Watch out

Drex has no public base URL: api.drex.ai does not resolve, so you must set DREX_BASE_URL to your own tenant's System One root, https only and without the /v1/systemone path because the app appends it, plus DREX_API_KEY. Some TypeSafe-shaped requests return 422 from Drex deliberately because its validation is stricter. Every real move costs an inference call, so the loop waits about 90 ms between ticks and pauses after a minute idle or a hidden tab, and upstream DNS or connect failures come back as a JSON 502 rather than an HTML 500. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

Other listings of this project

Forks and copies of this project in the directory. This entry is the canonical one.

1GitHub stars
Experimental Snake environment where the engine owns the deterministic rules and Jev picks every direction from structured state, with a browser human baseline and a pygame client sharing one fixed server clock.
Jev Demos & Experiments#community#jevbest#catalog-import

More Jev resources like this

98GitHub stars
Self-hosted Docker service and web UI that packages Laya structured-decision inference behind a compatible System One endpoint.
Jev Demos & Experiments#community#jevbest#catalog-import
20GitHub stars
General-purpose System One agent where Jev chooses tools and arguments while Jot executes them and loops until it can reply.
Jev Demos & Experiments#community#awesomejev#catalog-import
Browser drone-fleet lab where TypeSafe Jev steers each drone as fast reflexes and an optional planner offers one-use strategy advice when confidence drops, without pausing control.
Jev Demos & Experiments#community#jevbest#catalog-import
23GitHub stars
Chrome extension that sends each X post to Jev with six typed questions in one call near the viewport, then renders a behavior chip under the post plus a session cost and latency panel.
Jev Demos & Experiments#community#jevbest#catalog-import
14GitHub stars
Manifest V3 Chrome extension in TypeScript that sends each LinkedIn post to Jev and collapses bait, self-promo, off-topic, and sponsored posts into a one-line bar with reasons and scores.
Jev Demos & Experiments#community#jevbest#catalog-import
11GitHub stars
Standalone Flue example that routes support chat through Cloudflare Workers AI, using gpt-4o-mini for chat and Jev for typed intent and urgency routing.
Jev Demos & Experiments#community#awesomejev#catalog-import

From the Jev guides

Original write-ups on what this entry is for.

A game tick is a state plus a legal action list. How Clash Royale, Minecraft, and the earlier Mario, Pokémon, StarCraft, and drone loops ask Jev one step at a time.
Jev Demos & Experiments#gaming#agents#control
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai