How to let bot speak first

How to let the bot speak first, instead of waiting for the user to say it before replying as follow start conversation: bot: Can i help you? user:

One possible approach is as following. I assume you speak to your bot from a command line (not through a web interface).

from rasa_core.agent import Agent
from rasa_core.interpreter import RasaNLUInterpreter
from rasa_core.utils import EndpointConfig
from import serve_application
import rasa_core

def talk():
    agent = Agent.load('./models/dialogue',

    print("Hi dude! I'm a bot. How can I help you? ")
    while True:
        a = input()
        if a == 'stop':
        responses = agent.handle_message(a)
        for response in responses:


You have to have the backend send a first message to the bot (e.g. /greet) when the user clicks to start the conversation with the bot. Facebook does this automatically for example, by having the “get startd” button

Hi akelad,

Do you have an idea how slalck can do this (send me message when user clic on the bot bouton on slack)

Thank you

Sorry not sure, you would have to check their documentation