How to use an environment that runs outside Python with RLlib?

Hi, I am currently trying to use an environment that runs entirely outside Python but is no web application. It is just an external application process running on the same machine/host so that for instance I can connect to it via ‘localhost’ from Python.
I am confused if this is a case to use either ExternalEnv API or PolicyServerInput API? Thanks in advance for recommendations.

Thanks for asking this question @klausk55 !
You can use RLlib’s external Env API, which is described here:
https://docs.ray.io/en/master/rllib-env.html#external-agents-and-applications

There are also example scripts on how to set this up for Unity3D and a simpler CartPole client/server: