Chess Battle is a chess application where multiple AI agents collaborate to play chess against each other, demonstrating the power of multi-agent systems in complex game environments.

Key Capabilities

  • Multi-Agent System: Features White and Black Piece Agents for move selection
  • Move Validation: Dedicated Legal Move Agent ensures game rule compliance
  • Game Coordination: Master Agent oversees the game flow and end conditions
  • Interactive UI: Built with Streamlit for real-time game visualization

System Components

  • White Piece Agent: Strategizes and selects moves for white pieces
  • Black Piece Agent: Controls and determines moves for black pieces
  • Legal Move Agent: Validates all proposed moves against chess rules
  • Master Agent: Coordinates the game flow and monitors game status

Advanced Features

The system demonstrates complex agent interactions where each AI component has a specific role. The agents communicate and coordinate to create a complete chess-playing experience, showcasing how multiple specialized AIs can work together effectively.

Code

The complete code is available in the Agno repository.

Usage

1

Clone the repository

git clone https://github.com/agno-agi/agno.git
cd agno
2

Create a Virtual Environment

python3 -m venv .venv
source .venv/bin/activate  # On Windows use: .venv\Scripts\activate
3

Install Dependencies

pip install -r cookbook/examples/apps/chess_team/requirements.txt
4

Set up API Key

The Chess Team Agent uses the Anthropic API for agent reasoning:

export ANTHROPIC_API_KEY=your_api_key_here
5

Launch the App

streamlit run cookbook/examples/apps/chess_team/app.py
6

Open the App

Then, open http://localhost:8501 in your browser to start watching the AI agents play chess.

Pro Tips

  • Watch Complete Games: Observe full matches to understand agent decision-making
  • Monitor Agent Interactions: Pay attention to how agents communicate and coordinate

Need help? Join our Discourse community for support!