{"slug": "building-chess-with-jev-and-claude-opus-5-5", "title": "Building Chess With Jev and Claude Opus 5.5", "summary": "A developer built Jev Chess, a TypeScript web application that lets players face TypeSafe AI's Jev System One model, Stockfish, or a hybrid of the two, using the Jev SDK to select among legal moves generated by the chess.js library. Jev returns probabilities for each option rather than generating text, so it cannot invent illegal moves, and the app routes all Jev requests through server-side Next.js routes to keep the TypeSafe API key out of the browser. TypeSafe AI has temporarily halted new-user onboarding due to a surge in demand.", "body_md": "*Basic knowledge of web development, AI tools, and Chess will be sufficient for working through the contents of this article.*\n\n*Fond of cryptocurrency? Explore everything related to the Ethereum blockchain with this* *free, comprehensive dashboard built using Next.js**.*\n\n*Get your article audibles* *here**! I made this tool which makes audio files accessible for any non-paywall Medium articles!*\n\n*Want more content? Visit my* *tech blog* *for more articles, AI and software tools, and free shareable resources.*\n\nAt the speed of change in AI, maybe this article is already irrelevant.\n\nNevertheless, I digress. With the recent launch of Jev, TypeSafe AI’s **System One model**, there is quite a bit you can do with it.\n\nSystem One refers to fast, intuitive judgment rather than slow, step-by-step reasoning.\n\nInstead of generating text, you provide Jev with a state and a typed question. Jev chooses from the options you provide and returns probabilities for those choices. It does not operate like your traditional LLM.\n\nJev supports three types of questions:\n\nI used Jev, along with Claude Opus 5.5, to build a Chess game (you can find it here https://jev-agent-chess.vercel.app).\n\nThe following list highlights the stack (we will cover this in detail shortly) I used to build out the game:\n\nChess is a well recognized board game and as such, already has a vast pool of resources that can help expedite the development process.\n\nFor example, there is no need to invent a new Chess engine (we already have one). There are plenty of existing, well known libraries that can handle all of this for you.\n\nStockfish will beat you consistently, but playing against an engine does not necessarily have to feel like playing against another person.\n\nI wanted to create something different. Incorporating Jev into gameplay allows for the creation of an opponent that can make judgments, have a playing style, and let you see what it is considering.\n\nSo I built **Jev Chess**, a TypeScript web application where you can play against TypeSafe AI’s Jev model, Stockfish, or a hybrid of the two. Chess fits well here because every legal move can become an option.\n\nThe following code fragment details how you can work with the TypeSafe AI’s Jev SDK to make a valid Chess move given a set of options:\n\nYou can read more about TypeSafe AI Jev in the official documentation located [here](https://docs.typesafe.ai/introduction).\n\nThis is a simple example of how Jev can be presented with move options and select one of them.\n\nInstead of allowing Jev to generate arbitrary Chess notation, the chess.js library is used to generate the legal moves first and those moves become Jev's available choices.\n\nThis means Jev cannot simply invent an illegal move. The returned probabilities also make it possible to show what other moves Jev is considering.\n\nThe application is built using TypeScript end to end. The following list highlights the main technologies:\n\nStockfish runs directly in the browser using a web worker.\n\nAll Jev requests go through server-side Next.js routes so the TypeSafe API key is never exposed to the browser.\n\nYou can find the source code for this project [here](https://github.com/CodingAbdullah/jev-agent-chess). You can self-host it, run it in a container via Docker, or simply run this project locally.\n\nInstall the project’s dependencies and configure your TypeSafe API key before making requests to Jev. To get access to the TypeSafe API key, you will need to sign up [here](https://typesafe.ai/).\n\nDue to a surge in demand, TypeSafe AI has temporarily halted access for new users attempting to onboard the site. You can visit the site and see for yourself if access is being granted again.\n\nCreate a .env.local file:\n\nTYPESAFE_API_KEY=your_typesafe_api_key\n\nTYPESAFE_API_KEY authenticates the server-side requests made through the TypeSafe AI SDK.\n\nThe key should remain server-side. Do not expose it through a NEXT_PUBLIC_ environment variable.\n\nThe project also supports a local mock implementation of Jev. If no API key is provided, the mock can be used during development and testing.\n\nFor production deployments such as Vercel, the application can additionally use Upstash Redis for shared rate limiting. You will need to add those environment variables as well.\n\nThe basic request flow is essentially the following: **Chess Board → chess.js → Generate Legal Moves → Next.js API → Jev → Selected Move → chess.js Validation → Chess Board.**\n\nThe application exposes three Jev-related server routes:\n\nThe move route asks Jev which move it wants to play. The evaluation route asks Jev to judge the current position. The draw route lets Jev decide whether it wants to accept a draw.\n\nOnly the server creates the Jev SDK client.\n\nI wanted Jev to feel less like a traditional Chess engine, so I added several personalities:\n\nThe personality does not change the underlying model. Instead, it changes the instructions Jev receives when judging its options.\n\nDifficulty works differently. On **Hard mode**, Jev’s highest-probability choice is always played.\n\nOn the **Medium** and **Easy modes**, the game samples from Jev’s returned probabilities. Easy introduces more randomness.\n\nThat means Jev can occasionally choose a move it considers reasonable without always choosing its top answer, producing more human like mistakes and even in some egregious cases, blunders.\n\nJev makes judgments, but it does not calculate Chess positions the way Stockfish does.\n\nThat creates an obvious weakness. A move may look strategically reasonable while losing to a tactical sequence two or three moves later.\n\nStockfish has the opposite characteristics. It calculates extremely well, but it does not have a personality.\n\nThis led to the most interesting part of the project: **Hybrid mode**.\n\nHybrid mode works like this: **Current Position → Stockfish → Top 5 Moves → Jev → Personality Judgment → Selected Move → chess.js → Board**.\n\nStockfish first searches the position and returns its five strongest moves, along with evaluations and expected replies.\n\nThose candidates are then sent to the Jev server route. Before Jev sees them, the server validates the candidates again using chess.js.\n\nJev then receives information similar to:\n\n“Pawn from d2 to d4.\n\nStockfish choice #2.\n\nEvaluation for you: +0.30 pawns.\n\nExpected reply: exd4\"\n\nJev’s job is no longer to find a strong Chess move from scratch. Stockfish has already done that.\n\nInstead, Jev decides which of those strong moves best matches its personality without unnecessarily throwing away the position.\n\nAn **aggressive** Jev might prefer Stockfish’s second or third recommendation because it creates attacking opportunities while a **defensive** Jev might prefer the safer alternative.\n\nThis gives the system the strengths of both approaches: Stockfish handles calculation, while Jev handles judgment\n\nOne of the biggest lessons from building the project was that improving Jev’s decisions did not necessarily require longer instructions.\n\nIt required **better information**. For example, Jev initially had trouble recognizing hanging pieces.\n\nA move description might originally say:\n\n*“*Bishop captures on f7 with check.*”*\n\nThat describes what happened, but it leaves out something extremely important: what happens to the bishop afterward?\n\nI added information calculated using chess.js, such as:\n\n*“*Bishop captures on f7 with check. There it can be taken by a pawn and is not defended.*”*\n\nThat additional state significantly changed Jev’s judgment. Material evaluation produced a similar problem.\n\nGiving Jev only the raw FEN string wasn’t always enough for it to correctly understand a large material advantage.\n\nSo I explicitly provided information such as:\n\n“White is ahead by 9 points of material.”\n\nI also included the pieces remaining for each side. The general lesson extends beyond Chess:\n\nGive a judgment model the facts it needs to make the judgment instead of expecting it to derive every important fact itself.\n\nWhen an AI model and a Chess engine can both produce moves, the application needs one source of truth.\n\nFor Jev Chess, that source is chess.js. Every move from the player, Jev, or Stockfish is validated before the board changes.\n\nIf Jev times out or encounters an error, a simple heuristic can select a move instead.\n\nIn **Hybrid mode**, Stockfish’s top recommendation becomes the fallback. That means a failed AI request does not stop the game.\n\nThe TypeSafe API key also stays exclusively on the server. Browser code communicates with the Next.js API routes rather than communicating with Jev directly.\n\nThe application can be played in the browser. The source code for this project is available on GitHub [here](https://github.com/CodingAbdullah).\n\nThe project is licensed under GPL-3.0-or-later because it ships Stockfish.\n\nYou can also run the application locally using a shell script located at the root of the project under the scripts directory:\n\n./scripts/setup.sh local --start\n\nIf you are using Windows, you can run the following:\n\n.\\scripts\\setup.ps1 local -Start\n\nThe setup script asks for your TypeSafe API key. You can leave it empty to run the project using the mock Jev implementation.\n\nIf you want to see the combination of Jev’s judgment and Stockfish’s calculation in action, **Hybrid mode** is where the idea behind the project comes together.\n\nWe did a deep dive into working with TypeSafe AI’s Jev, a System One Model.\n\nBuilding a Chess game with Jev showcases how you can bring judgment and personality to applications that traditionally rely on deterministic algorithms.\n\nThere is much more you can do with Jev, and this article barely touches the surface of the capabilities of Jev.\n\nBe creative and come up with your own use cases.\n\nIn the list below, you will find links to the Chess site, GitHub repository containing the source code, and the official TypeSafe AI docs:\n\nI also created a nice summary sheet for this article, which you can find in the Medium demos repository here.\n\nI hope you found this article helpful and look forward to more in the future.\n\nThank you!\n\n[Building Chess With Jev and Claude Opus 5.5](https://blog.stackademic.com/building-chess-with-jev-and-claude-opus-5-5-43a3544c1f9e) was originally published in [Stackademic](https://blog.stackademic.com) on Medium, where people are continuing the conversation by highlighting and responding to this story.", "url": "https://wpnews.pro/news/building-chess-with-jev-and-claude-opus-5-5", "canonical_source": "https://blog.stackademic.com/building-chess-with-jev-and-claude-opus-5-5-43a3544c1f9e?source=rss----d1baaa8417a4---4", "published_at": "2026-10-05 21:01:43+00:00", "updated_at": "2026-10-05 21:19:11.487736+00:00", "lang": "en", "topics": ["ai-products", "ai-tools", "developer-tools", "large-language-models"], "entities": ["Jev", "TypeSafe AI", "Claude Opus 5.5", "Stockfish", "chess.js", "Next.js", "TypeScript", "Jev Chess"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/building-chess-with-jev-and-claude-opus-5-5", "markdown": "https://wpnews.pro/news/building-chess-with-jev-and-claude-opus-5-5.md", "text": "https://wpnews.pro/news/building-chess-with-jev-and-claude-opus-5-5.txt", "jsonld": "https://wpnews.pro/news/building-chess-with-jev-and-claude-opus-5-5.jsonld"}}