How to run rasa core server behind flask server

now I am thinking about deployment

what I am thinking is put rasa-core, rasa-nlu, rasa-action as stand-alone service

in the front , it’s flask with jwt authentication

like this

def chat():
#handle post request ,
#get user_id
#get message
#call rasa-core service

one option is use requests to post to rasa-core rest api, but that is not elegant

I see some interface like agent.load_from_server

is it possible to build a agent object , and use it to communicate with a remote rasa-core server?

currently I see all use-case of agent , is to load model from local folder , not a remote service

or can I use rasa-core as part of current flask application , like a blueprint?

any suggestions , thanks

What’s the difference for you to use requests to forward requests to Rasa core?

I’d actually try putting sth like nginx before it, which is better in forwarding the requests (and you don’t have to reimplement everything), e.g. Module ngx_http_auth_jwt_module