Integrating AI and Cesium in CesiumJS frontend

hi
I need to integrate AI and Cesium in the front-end. The main scenarios are as follows:

  1. The results generated by AI affect Cesium, such as running code or putting data into ceisum
  2. Hand over the information in Cesium to AI for processing and analysis
    How do we need to do this, or are there any open source applications in this area now