Using agent.parse_message with UserMessage object

Hey, I have a Python code that uses agent.parse_message on python strings and it works perfectly. Now I want to add metadata as additional input (I have a custom compenent that support it), but I can’t seems to make it work. It looks like parse_message only accept string as input (and not UserMessage), and while there is a similar function that can work with as input, agent.handle_message, it returns None.

How can I include the metadata that I need and get the predicted intents and entities?

Code example:

    user_message = UserMessage(
        'How do i sign up?',
        metadata={'context': 'stores'},
    )
    result = asyncio.run(agent.handle_message(user_message))
    print(json_to_string(result))  # returns None

    result = asyncio.run(agent.parse_message(user_message))  # throw AttributeError for not being string
    print(json_to_string(result))

    result = asyncio.run(agent.parse_message('How do i sign up?'))  # Works, but without the metadata
    print(json_to_string(result))

Hey, Is there no way to use metadata in rasa 3.0?