I'm a hobbyist chess programmer. I've built a few engines from scratch, had lots of fun, and am generally pretty proud of what I've made (I estimate ~1400-1500 though it's hard to tell).

I was very excited when I found out you can make a bot account on lichess. After a few hours of messing around, I successfully played a game against Stockfish running on my computer through the lichess interface, so I think I (sort of) know how to connect an engine to my bot account.

However, for all the engines I've made in the past, I have made my own board representation and move in/output. Obviously I'll need to make some modifications to them in order to connect them to lichess. When connecting Stockfish to my account, I used the Stockfish .exe file you can download online. The lichess interface accepted it, so I'm guessing there's some semi-standard way to make interface with engines. I would like to make one of these interfaces.

Questions: am I correct that there is a standard way to interface with an engine? If so, how would you go about making one? Are there any good guides to doing so?

Or perhaps more generally: how would you adapt a "from scratch" engine to play on lichess?

I'm almost entirely self taught programming wise, and am very conscious of the gaping holes in my understanding of computers/programming. Pointing me to any resources would be very helpful.

  • FICS [Free Internet Chess Server] also allows a declared engine BOT account. Nov 29, 2019 at 7:46

3 Answers 3


There are plenty resources available. First of all, you may be interested in the Universal Chess Interface protocol. This is a text protocol that many engines use. A compiled list is available here.

The protocol specification is available for download here (last link on the page). There is also a python implementation of the protocol.

Last but not least, there exists a lichess API implementation in Python, so you could talk to lichess directly.


The standard way to connect a chess engine to anything is the UCI - the universal chess interface.

It specifies how the output (and input) of an engine should be structured to be understood by an UI or any other interface.


https://lichess.org/team/lichess-bots has the documentation you are looking for. If you just want the gui you can embed it like in the project used by http://lichess.bitplan.com. If you want to do moves it depends on the programming language you are using. For python e.g. there are ready to use libraries:

As a committer of Play Chess With a WebCam i'll also point you to the implementation within this project see: lichess.py and the tests for it test_lichess.py

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.