building-streamlit-chat-ui

Installation
SKILL.md

Streamlit chat interfaces

Build conversational UIs with Streamlit's chat elements.

Basic chat structure

import streamlit as st

if "messages" not in st.session_state:
    st.session_state.messages = []

# Display chat history
for msg in st.session_state.messages:
    with st.chat_message(msg["role"]):
        st.write(msg["content"])

# Handle new input
if prompt := st.chat_input("Ask a question"):
Related skills

More from streamlit/agent-skills

Installs
5
GitHub Stars
186
First Seen
Feb 12, 2026