HTML app interface with PyRevit to talk to Revit

while it seems loke the entire AEC is exploring with AI and its use cases, I am still figuring out pyRevit automation. A question came to my mind. Is there a way we can use HTML app and data processing while pyRevit working like a conduit for Revit Interface for making changes to the model? I mean HTML with CSS and JS doing the logic but then pyRevit working like a conduit to make changes to the Revit model. Does that make sense?

While it is a noble idea, I’ve tried this before and is very reluctant on executing it or letting the AI does things without verifying.

Short answer to your question? Yes, it can be done, and not even needing HTML or other format, just a wpf form is sufficient (and i think ChatGPT, Copilot or Claude can help you generate a UI in 1 click) - Here’s a demo I did long ago to test out this Idea It basically send a datastream of the project to openAI API, and you can start asking questions about it.
I’ve seen other apps that has done much better than this tho, but I’m not sure if they directly use pyRevit or do it via C#

I stopped at the querying model step since I ran out of idea to what to actually make changes to the model. Thing is, if i do need to do anything I can just ask copilot to generate me a script to do it and the code in script.py.

What is your intension with the interface? is it user-facing? what is your risk tolerance of the user asking it to do something and it suddenly batch-modify the whole model without you even knowing? - I often call this the “YOLO” mode, when working with other people and especially big model and discipline, this is quite a dangerous move.

You should take a look at routes.
Once enabled, you get the necessary comms channel to make interact with Revit.
This is what the revitmcp in python leverages.