Streamlit apps showcasing LangChain agents
Top 27.7% on sourcepulse
This repository provides reference implementations of various LangChain agents integrated with Streamlit for interactive applications. It targets developers building LLM-powered applications who want to leverage Streamlit for user interfaces and LangChain for agentic capabilities, offering examples for common use cases like memory, search, and document interaction.
How It Works
The project showcases LangChain's agent and chain capabilities within Streamlit applications. It utilizes Streamlit's interactive components for user input and displays LLM responses, often incorporating LangChain's Callback
integration for real-time updates and StreamlitChatMessageHistory
for maintaining conversation state. Examples demonstrate specific LangChain tools and integrations, such as MRKL agents, document retrieval, and SQL database interaction.
Quick Start & Requirements
poetry install
poetry shell
streamlit run streamlit_agent/mrkl_demo.py
OPENAI_API_KEY
environment variable).Highlighted Details
PythonAstREPLTool
.streamlit-feedback
for collecting user feedback on responses and linking to LangSmith traces.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
chat_pandas_df.py
example uses PythonAstREPLTool
, which is noted as vulnerable to arbitrary code execution.1 year ago
1 week