Agent.handle_text(msg) always returns 'None'

Hello,

Could anybody explain why this code returns always ‘None’? This is a minimum code done after creating and training a new project that works in the command line. Thank you!

import asyncio
from rasa.core.agent import Agent
from rasa.core.interpreter import RasaNLUInterpreter

async def process(msg):
    agent = Agent.load("models")
    output = await agent.handle_text(msg)
    print(output)
    return output

asyncio.run(process("hi"))

Good question :laughing: Do you have any logs? Is there already a trained model? I think "model" should be the complete path to the model archive.

One more question: Why not using the CLI, but rather custom Python code? Maybe our API could also help you out here https://rasa.com/docs/rasa/api/jupyter-notebooks/