Bot on Lichess with Banksia GUI
Introduction
Automated chess bots have transformed the landscape of online play and engine analysis. Lichess.org, a premier open-source chess platform, offers robust support for chess bots via its API. When coupled with a powerful graphical user interface like Banksia GUI, these bots become even more capable and versatile. This tutorial provides a comprehensive, step-by-step guide for deploying and managing a chess bot on Lichess using Banksia GUI under a Windows environment.
This article is aimed at advanced users, hobbyists, and developers who want to integrate a strong chess engine with Lichess. Whether you’re interested in participating in Lichess bot tournaments, running your own automated matches, or simply experimenting with engine capabilities, this guide will equip you with the necessary tools and processes.
Each section of this article breaks down complex steps into manageable instructions. You will learn:
- What Lichess bots are and how they operate
- How to install and configure Banksia GUI
- The steps needed to create a Lichess bot account
- How to prepare your Windows environment
- How to connect Banksia GUI to Lichess
- How to add and configure a chess engine
- How to install opening books and endgame tablebases
- How to run the bot to play against others
By the end of this article, you should be able to confidently operate a Lichess bot through Banksia GUI, complete with opening knowledge and endgame precision.
What Are Bots on Lichess?
Understanding the Role of Bots
In the Lichess ecosystem, a bot is a software agent that plays chess automatically. Bots are connected to Lichess via its Bot API, which allows them to accept challenges, make moves, resign games, and even chat (if allowed). These bots are typically powered by strong chess engines like Stockfish, Lc0, or Komodo, and can be configured to operate autonomously.
Key Features of Lichess Bots
- Autonomous Play: Once set up, bots can handle all game operations without human intervention.
- API Driven: Communication with Lichess is managed via secure HTTP requests.
- Bot Account Specifics: Lichess bots require a specific account type with the “bot” flag activated.
- Limitations: Bots cannot join regular tournaments, but they can join bot-specific ones.
Use Cases for Bots
- Participation in Lichess Bot Battles
- Engine testing and benchmarking
- Educational tools for opening preparation
- Providing sparring partners with adjustable strength

Installing Banksia GUI on Windows
What Is Banksia GUI?
Banksia GUI is a modern, cross-platform chess interface designed to support multiple engines, analysis modes, and bot configurations. It offers:
- Support for UCI, UCCI, WinBoard, and CECP protocols
- Powerful tournament and match modes
- Friendly user interface and engine configuration options
Step-by-Step Installation
- Download the Software
- Visit the official website: https://banksiagui.com
- Navigate to the Downloads section
- Select the Windows version (usually a
.zip
or installer file)
- Extract or Install
- If you downloaded a
.zip
, extract it to a folder of your choice (e.g.,C:\BanksiaGUI
) - If it is an installer, run it and follow the on-screen instructions
- If you downloaded a
- Launch Banksia GUI
- Double-click the
BanksiaGUI.exe
file - Allow any Windows security prompts
- Double-click the
- Initial Configuration
- Choose the language and default layout
- Familiarise yourself with the UI, particularly the Engines, Tournaments, and Bots tabs
Creating a Bot Account on Lichess
Step 1: Create a Lichess Account
- Visit https://lichess.org/signup
- Choose a unique username (e.g., MyBot123)
- Provide a valid email address
- Set a strong password
- Accept the terms and create your account
Step 2: Apply for Bot Privileges
- Log in to the newly created account
- Navigate to https://lichess.org/account/oauth/bot
- Click Become a Bot
- Lichess will ask you to confirm you understand the rules
- Agree to the terms and your account will be converted to a bot
Step 3: Generate an API Access Token
- Go to https://lichess.org/account/oauth/token/create
- Provide a description (e.g., “BanksiaBot Token”)
- Select the following scopes:
- Play games with the bot API
- Read bot account preferences
- Challenge other bots
- Click Generate Token
- Copy and save the token securely — it will not be shown again
Preparing Windows for Banksia and Lichess Bot Integration
Required Components
Before proceeding, ensure the following are installed:
- Banksia GUI (installed earlier)
- Chess Engine (e.g., Stockfish)
- Lichess Bot Python Script (commonly
lichess-bot
) - Python 3.10+
- Git (for cloning repositories)
Step-by-Step Environment Setup
- Install Python
- Download from https://www.python.org/downloads/windows/
- Add Python to PATH during installation
- Install Git
- Download from https://git-scm.com/download/win
- Use default settings during installation
- Clone the lichess-bot Repository
git clone https://github.com/careless25/lichess-bot.git cd lichess-bot
- Install Required Python Packages
pip install -r requirements.txt
- Create
config.yml
- Use the sample config provided (
config.yml.example
) - Replace
token
with your actual Lichess bot token - Specify the path to your engine
- Use the sample config provided (
Connecting to Lichess Through Banksia GUI
Launching the Bot in Command Line
Banksia GUI itself does not connect to Lichess directly. You need to run the lichess-bot
script alongside Banksia:
python lichess-bot.py
You should see console output showing successful connection:
Connected to Lichess as MyBot123
Waiting for challenges...
Using Banksia GUI to Monitor the Engine
- Open Banksia GUI
- Go to Engines > Add Engine
- Select your bot engine (e.g.,
stockfish.exe
) - Assign a custom name (e.g., “LichessBot”)
- Use this for analysis or debugging
Adding a Chess Engine to Banksia GUI
Step-by-Step Engine Configuration
- In Banksia GUI, navigate to
Engines > Manage Engines
- Click Add Engine
- Provide the following:
- Name: Descriptive engine name (e.g., Stockfish 16)
- Command: Full path to engine executable (e.g.,
C:\Engines\stockfish.exe
) - Protocol: Typically UCI
- Test the engine by clicking Start and verifying output in the console tab
- Save configuration
Recommended Engines
- Stockfish (open source, strongest CPU engine)
- Lc0 (neural network, needs GPU setup)
- Komodo Dragon (commercial, strong evaluation)
Installing Opening Books for the Bot
What Is an Opening Book?
An opening book allows the bot to follow known chess theory during the early moves. It improves both speed and realism.
Installation Instructions
- Download Polyglot Format Books (e.g.,
book.bin
) - Edit
config.yml
in yourlichess-bot
folderbook: enabled: true file: "path/to/book.bin" format: polyglot depth: 12
- Save and Restart the Bot
Installing Endgame Tablebases
Purpose of Tablebases
Tablebases provide perfect knowledge of all outcomes in specific endgames. Common formats include Syzygy (recommended).
Installation Guide
- Download Syzygy Tablebases
- https://tablebase.lichess.ovh/tables/standard/
- Download files for 3-5 pieces (or 6/7 if desired)
- Place Files in a Local Directory
- E.g.,
C:\TB\syzygy
- E.g.,
- Configure Engine in Banksia GUI
- Go to engine settings > Syzygy path
- Add the folder where tablebases are stored
- Verify in Console
- Engine should detect and load the tablebases
Running the Bot Against Other Bots
Launching the Bot
- Open a terminal
- Navigate to
lichess-bot
directory - Run the main script
python lichess-bot.py
Challenging Other Bots
Bots can only challenge other bots.
- Use the Lichess interface: https://lichess.org/@/MyBot123
- Navigate to Friends > Bots > Challenge
Alternatively, modify the bot script to auto-challenge a specific opponent.
Monitoring via Banksia GUI
Banksia GUI can help you:
- Inspect engine thinking
- Debug performance
- Review played games
Conclusion
Creating and running a Lichess bot with Banksia GUI involves careful configuration but offers powerful capabilities for serious chess enthusiasts. From installing dependencies to running live bot matches, each step contributes to a seamless and automated chess-playing experience.
This setup can serve as the foundation for further enhancements, such as:
- Integrating machine learning engines (e.g., Lc0)
- Running tournaments among multiple bots
- Creating educational bots for specific skill levels
By following this comprehensive guide, you are now equipped to operate a fully functional Lichess bot environment powered by Banksia GUI, capable of engaging in intelligent, strategic play against human and bot opponents alike.
Youtube guide

Jorge Ruiz Centelles
Filólogo y amante de la antropología social africana