This is very interesting. To build LLM chat-oriented WebApps in python, these days I use Chainlit[1], which I find is much better than Streamlit for this. I've integrated Chainlit into the Langroid[2] Multi-Agent LLM framework via a callback injection class[3], i.e. hooks to display responses by various entities. Example demos are here[4].<p>One of the key requirements in a multi-agent chat app is to be able to display steps of sub-tasks nested under parent tasks (to any level of nesting), with the option to fold/collapse sub-steps to only view the parent steps. I was able to get this to work with chainlit, though it was not easy, since their sub-step rendering mental model seemed more aligned to a certain other LLM framework with a partial name overlap with theirs.<p>That said, I am very curious if Mesop could be a viable alternative, for this type of nested chat implementation, especially if the overall layout can be much more flexible (which it seems like), and more production-ready.<p>[1] Chainlit <a href="https://github.com/Chainlit/chainlit">https://github.com/Chainlit/chainlit</a><p>[2] Langroid: <a href="https://github.com/langroid/langroid">https://github.com/langroid/langroid</a><p>[3] Langroid ChainlitAgentCallback class: <a href="https://github.com/langroid/langroid/blob/main/langroid/agent/callbacks/chainlit.py">https://github.com/langroid/langroid/blob/main/langroid/agen...</a><p>[4] Langroid chainlit demos <a href="https://github.com/langroid/langroid/tree/main/examples/chainlit">https://github.com/langroid/langroid/tree/main/examples/chai...</a>