Public | Automated Build

Last pushed: 2 years ago
Short Description
Powerful virtual assistant
Full Description

Leonard bot

Leonard bot is a virtual assistant, who will be can create notifications, notes, search in the internet and in the maps etc.

Install and start

git clone
cd leonard
pip install -r requirements.txt

After it, you need to set some environment variables that listed below.

You can start bot with running script. Right now we don't support Python 2.x, bot tested on CPython 3.4.


It will run bot with console adapter. You will see something like this:

Enter message:
Enter a comma-separated attachments(<type>_<path>):

Type your message in first line, second line leave empty. For example:

Enter message: !hello
Enter a comma-separated attachments(<type>_<path>):
BOT:  Hi!

You can test plugins for bot using console adapter. If you want to change adapter, set the adapter argument
of start script. For example:

python --adapter telegram

Don't forget set adapter's environment variables that listed below.


Name Description Example Priority
hello Send hello message to user Hello, bot<br>!hello 5
registration Ask user's language if user sending message to the bot first time 1000

Environment variables

Variables sorted by priority: from high to low.

Name Description Default value
LEONARD_MONGODB_URI URI for connecting MongoDB mongodb://localhost:27017
LEONARD_REDIS_HOST Host for Redis storage localhost
LEONARD_REDIS_PORT Port for Redis storage 6379
LEONARD_REDIS_DB Num of DB for Redis storage 0
LEONARD_CONSOLE_LANGUAGE Letters of language that console adapter uses as default en
LEONARD_TELEGRAM_TOKEN Token for connection to Telegram Bot API (telegram adapter)
LEONARD_BOTAN_TOKEN Token for message analytics
LEONARD_FORECAST_IO_TOKEN Token for getting weather data from


  • You can create new plugins or extend existing plugins. You can find examples of
    plugins code in plugins/ All hooks you can see in leonard/
    If you created new plugin don't forget to add it to installed_plugins.txt.

  • You can new adapters or improve existing adapters. You can see example adapter in
    adapters/ All adapters functions and classes are listed in leonard/

  • You can improve Leonard core. At the moment, the most important thing is more effective working with threads.

  • You can translate Leonard to your language. Checkout messages folder and leonard/


Send me a message in Telegram: @sevazhidkov.

Or in Twitter: @sevazhidkov.

Or E-mail:

Also you can buy me coffee, pizza,
new Macbook Pro or whatever you want.

Docker Pull Command
Source Repository