Inspiration

Whenever I play blitz in chess and I get flagged, I always analyse my games with stockfish to look through the game to see where did I go wrong. Whenever I look at stockfish's top engine move, I thought to myself if it's even possible to find these moves in a blitz game where time constraint is a huge factor that controls the pace of the game. So what's the point of finding the best moves when you're going to lose on time?

What it does

Chesseract is a proactive, multi-agent AI chess coach designed to solve the "blitz survival" problem. Unlike traditional chess engines that overwhelm users with 20-move deep calculations, Chesseract focuses on human psychology and time management. One of its feature is to contrast Stockfish’s objective precision with Maia’s human-like intuition. By identifying "Time Sinks" moves where players panic and make sub-optimal decisions due to clock pressure, Chesseract generates personalized, opening-specific study plans that prioritize practical survival and simplifying trades over hyper-complex tactical lines.

How we built it

I engineered Chesseract using a backend-frontend integration:

Agentic Orchestration: I utilized the Google Vertex AI ADK to create a multi-agent system. A "Head Coach" agent orchestrates the logic, delegating specific sub-tasks to a "Tactical Analyst" (for engine diffs) and a "Sports Psychologist" (for database telemetry).

Partner Integration: I integrated the MongoDB MCP (Model Context Protocol) Server directly into the Sports Psychologist's toolset, allowing the AI to dynamically query raw game telemetry and schema metadata autonomously.

Real-time Engine Pipeline: I built an asynchronous FastAPI backend that manages a persistent connection to Stockfish and Lc0/Maia binaries.

Frontend Synchronization: The UI, built in React, uses WebSockets to stream engine evaluations in real-time and employs an "Atomic Sync" pattern to force the chessboard to specific FEN snapshots provided by the AI during analysis.

Challenges we ran into

State Desync: Aligning the React board state with the AI’s "pre-blunder" analysis was a significant hurdle. We had to create a custom "Jump-to-FEN" trigger to force the board to sync with the AI's current evaluation context.

Concurrency Deadlocks: Running async engine binaries alongside a web server caused race conditions. We resolved this by implementing an asyncio.Lock that serializes engine requests, ensuring the tactical and psychological analysis pipelines never collide.

Agent Hallucination: Agents initially tried to guess blunder moves. We solved this by enforcing a strict JSON schema in our agent definitions and passing raw FEN strings as a "source of truth" to force the agent to act on reality rather than inference.

Accomplishments that we're proud of

The "Partner Power" Implementation: Successfully embedding the MongoDB MCP server into our agent’s workflow, effectively giving the AI "superpowers" to autonomously explore the database schema and count documents, a feature that impressed us with how seamlessly MCP integrates into modern AI architectures.

Intuitive "Blitz" UX: We moved away from standard chess analysis walls of text, replacing them with a bespoke UI that highlights "Time Sinks" and provides clear, human-vs-engine decision-making labels (e.g., "Safe & Practical" vs. "Sharp & Complex").

Architectural Modularity: Building a multi-agent system where agents have clear, delegated responsibilities (Coach, Analyst, Psychologist), making the codebase clean and highly extensible.

What we learned

The Power of Agentic Delegation: I learned that defining granular instructions for sub-agents (Psychologist vs. Analyst) is more effective than one "super-prompt" for a single model.

Sync is Hard: Managing front-end state (the chessboard) alongside AI-inferred state is complex. We learned that the "source of truth" for the UI should always be the raw FEN, not the move number.

The Value of MCP: I discovered that MCP is a game-changer for agent-database interaction, transforming static API calls into dynamic, investigative tools.

What's next for Chesseract

Built With

Share this project:

Updates