Running interactive bots
Zulip’s API has a powerful framework for interactive bots that react to messages in Zulip. You can write your own interactive bot, or run an existing Zulip bot.
Running a bot
Section titled “Running a bot”This guide will show you how to run an existing Zulip bot.
You’ll need:
- An account in a Zulip organization
(e.g., the Zulip development community,
{{ display_host }}, or a Zulip organization on your own development or production server). - A computer where you’re running the bot from.
-
Create a bot, making sure to select Generic bot as the Bot type.
-
Use the following command to install the
zulip_botsPython package: -
Use the following command to start the bot process (replacing
~/path/to/zuliprcwith the path to thezuliprcfile you downloaded above):zulip-run-bot <bot-name> --config-file ~/path/to/zuliprc -
Check the output of the command above to make sure your bot is running. It should include the following line:
INFO:root:starting message handling... -
Test your setup by starting a new direct message with the bot or mentioning the bot on a channel.
pip3 install zulip_botsYou can now play around with the bot and get it configured the way you like. Eventually, you’ll probably want to run it in a production environment where it’ll stay up, by deploying it on a server using the Zulip Botserver.