Building Chess With Jev and Claude Opus 5.5 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. Basic knowledge of web development, AI tools, and Chess will be sufficient for working through the contents of this article. Fond of cryptocurrency? Explore everything related to the Ethereum blockchain with this free, comprehensive dashboard built using Next.js . Get your article audibles here I made this tool which makes audio files accessible for any non-paywall Medium articles Want more content? Visit my tech blog for more articles, AI and software tools, and free shareable resources. At the speed of change in AI, maybe this article is already irrelevant. Nevertheless, I digress. With the recent launch of Jev, TypeSafe AI’s System One model , there is quite a bit you can do with it. System One refers to fast, intuitive judgment rather than slow, step-by-step reasoning. Instead 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. Jev supports three types of questions: I used Jev, along with Claude Opus 5.5, to build a Chess game you can find it here https://jev-agent-chess.vercel.app . The following list highlights the stack we will cover this in detail shortly I used to build out the game: Chess is a well recognized board game and as such, already has a vast pool of resources that can help expedite the development process. For 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. Stockfish will beat you consistently, but playing against an engine does not necessarily have to feel like playing against another person. I 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. So 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. The 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: You can read more about TypeSafe AI Jev in the official documentation located here https://docs.typesafe.ai/introduction . This is a simple example of how Jev can be presented with move options and select one of them. Instead 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. This means Jev cannot simply invent an illegal move. The returned probabilities also make it possible to show what other moves Jev is considering. The application is built using TypeScript end to end. The following list highlights the main technologies: Stockfish runs directly in the browser using a web worker. All Jev requests go through server-side Next.js routes so the TypeSafe API key is never exposed to the browser. You 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. Install 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/ . Due 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. Create a .env.local file: TYPESAFE API KEY=your typesafe api key TYPESAFE API KEY authenticates the server-side requests made through the TypeSafe AI SDK. The key should remain server-side. Do not expose it through a NEXT PUBLIC environment variable. The project also supports a local mock implementation of Jev. If no API key is provided, the mock can be used during development and testing. For 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. The 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. The application exposes three Jev-related server routes: The 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. Only the server creates the Jev SDK client. I wanted Jev to feel less like a traditional Chess engine, so I added several personalities: The personality does not change the underlying model. Instead, it changes the instructions Jev receives when judging its options. Difficulty works differently. On Hard mode , Jev’s highest-probability choice is always played. On the Medium and Easy modes , the game samples from Jev’s returned probabilities. Easy introduces more randomness. That 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. Jev makes judgments, but it does not calculate Chess positions the way Stockfish does. That creates an obvious weakness. A move may look strategically reasonable while losing to a tactical sequence two or three moves later. Stockfish has the opposite characteristics. It calculates extremely well, but it does not have a personality. This led to the most interesting part of the project: Hybrid mode . Hybrid mode works like this: Current Position → Stockfish → Top 5 Moves → Jev → Personality Judgment → Selected Move → chess.js → Board . Stockfish first searches the position and returns its five strongest moves, along with evaluations and expected replies. Those candidates are then sent to the Jev server route. Before Jev sees them, the server validates the candidates again using chess.js. Jev then receives information similar to: “Pawn from d2 to d4. Stockfish choice 2. Evaluation for you: +0.30 pawns. Expected reply: exd4" Jev’s job is no longer to find a strong Chess move from scratch. Stockfish has already done that. Instead, Jev decides which of those strong moves best matches its personality without unnecessarily throwing away the position. An aggressive Jev might prefer Stockfish’s second or third recommendation because it creates attacking opportunities while a defensive Jev might prefer the safer alternative. This gives the system the strengths of both approaches: Stockfish handles calculation, while Jev handles judgment One of the biggest lessons from building the project was that improving Jev’s decisions did not necessarily require longer instructions. It required better information . For example, Jev initially had trouble recognizing hanging pieces. A move description might originally say: “ Bishop captures on f7 with check. ” That describes what happened, but it leaves out something extremely important: what happens to the bishop afterward? I added information calculated using chess.js, such as: “ Bishop captures on f7 with check. There it can be taken by a pawn and is not defended. ” That additional state significantly changed Jev’s judgment. Material evaluation produced a similar problem. Giving Jev only the raw FEN string wasn’t always enough for it to correctly understand a large material advantage. So I explicitly provided information such as: “White is ahead by 9 points of material.” I also included the pieces remaining for each side. The general lesson extends beyond Chess: Give a judgment model the facts it needs to make the judgment instead of expecting it to derive every important fact itself. When an AI model and a Chess engine can both produce moves, the application needs one source of truth. For Jev Chess, that source is chess.js. Every move from the player, Jev, or Stockfish is validated before the board changes. If Jev times out or encounters an error, a simple heuristic can select a move instead. In Hybrid mode , Stockfish’s top recommendation becomes the fallback. That means a failed AI request does not stop the game. The TypeSafe API key also stays exclusively on the server. Browser code communicates with the Next.js API routes rather than communicating with Jev directly. The application can be played in the browser. The source code for this project is available on GitHub here https://github.com/CodingAbdullah . The project is licensed under GPL-3.0-or-later because it ships Stockfish. You can also run the application locally using a shell script located at the root of the project under the scripts directory: ./scripts/setup.sh local --start If you are using Windows, you can run the following: .\scripts\setup.ps1 local -Start The setup script asks for your TypeSafe API key. You can leave it empty to run the project using the mock Jev implementation. If 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. We did a deep dive into working with TypeSafe AI’s Jev, a System One Model. Building a Chess game with Jev showcases how you can bring judgment and personality to applications that traditionally rely on deterministic algorithms. There is much more you can do with Jev, and this article barely touches the surface of the capabilities of Jev. Be creative and come up with your own use cases. In the list below, you will find links to the Chess site, GitHub repository containing the source code, and the official TypeSafe AI docs: I also created a nice summary sheet for this article, which you can find in the Medium demos repository here. I hope you found this article helpful and look forward to more in the future. Thank you 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.