ChessArena.ai is a complete production application built with Motia that benchmarks LLM chess-playing abilities with real-time move evaluation and live leaderboards.
Live website
Try the live application
Source code
View the complete source code
What it demonstrates
- Authentication and user management
- Multi-agent LLM evaluation (OpenAI, Claude, Gemini, Grok)
- Python engine integration (Stockfish chess evaluation)
- Real-time streaming with live move updates
- Event-driven workflows connecting TypeScript and Python
- Modern React UI with interactive chess boards
- Production deployment on Motia Cloud
Architecture overview
ChessArena uses multiple Motia Steps to orchestrate the chess evaluation pipeline:Key components
- Game orchestrator: Manages game flow and turn sequence
- LLM agents: Separate Steps for each LLM provider
- Move evaluator: Python Step using Stockfish engine
- Streaming pipeline: Real-time updates via Motia streams
- Leaderboard: Aggregates move quality scores
Core Steps
Game creation
The entry point that initializes a new chess match:steps/create-game.step.ts
LLM agent Step
Each LLM provider has a dedicated Step for move generation:steps/agents/gpt4-agent.step.ts
Python move evaluator
Stockfish evaluation runs in a Python Step:steps/evaluate_move_step.py
Real-time streaming
The game stream configuration:steps/game.stream.ts
Frontend integration
React component using Motia’s streaming client:components/GameBoard.tsx
Key features
Multi-language support
- TypeScript: API endpoints, orchestration, frontend
- Python: Chess engine integration, evaluation logic
- Seamless communication via queues and state
Real-time updates
- Live move streaming to frontend
- Progress indicators during AI thinking
- Move quality visualization
- Leaderboard updates
Production deployment
- Deployed on Motia Cloud
- Auto-scaling workers
- Distributed state management
- Monitoring and observability
Run it yourself
Clone and run the project:http://localhost:5173 to start a game.
What you learned
Multi-language Steps
Mix TypeScript and Python in one application
Real-time streaming
Stream events to frontend with Motia streams
Event-driven workflows
Chain multiple Steps with queue-based events
Production deployment
Deploy and scale on Motia Cloud
Next steps
AI research agent
Build an AI agent with web research
More examples
Explore 20+ examples on GitHub