Rasa Actions did not get executed when using Rasa Agent


I’m using Django and Rasa Agent to interface a chat UI with the Rasa bot.

This is how the Rasa Agent is created:

agent = Agent.load(model_path, action_endpoint="http://localhost:5055/webhook")

After getting the message from the UI, i pass it to the Agent:

response = agent.handle_text(message)

I received expected responses from the intents of which the bot doesn’t need to execute custom actions to handle. But when i invoke the intents which requires custom actions, the response was an empty list [].

I ran the action server prior to this: rasa run actions --debug

There was no log or warning on the console, so i don’ think the action server received any request at all. It’s probably because i didn’t config the agent and the action server right, but i can’t find how to do this in the docs.

Any help would be appreciated. Thank you.

I solved the problem using EndpointConfig:

    from rasa.utils.endpoints import EndpointConfig
    endpoint = EndpointConfig(url='http://localhost:5055/webhook')
    RasaAgent.agent = Agent.load(model_path, action_endpoint=endpoint)

I think you can also can read endpoint file using:

from rasa.core.utils import read_endpoint_config