Streamlit Agent banner
langchain-ai langchain-ai

Streamlit Agent

Development community

Description

Reference implementations of several LangChain agents as Streamlit apps

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

🦜️🔗 LangChain 🤝 Streamlit agent examples

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/langchain-ai/streamlit-agent?quickstart=1)

This repository contains reference implementations of various LangChain agents as Streamlit apps including:

  • basic_streaming.py: Simple streaming app with langchain.chat_models.ChatOpenAI (View the app)
  • basic_memory.py: Simple app using StreamlitChatMessageHistory for LLM conversation memory (View the app)
  • mrkl_demo.py: An agent that replicates the MRKL demo (View the app)
  • minimal_agent.py: A minimal agent with search (requires setting OPENAI_API_KEY env to run)
  • search_and_chat.py: A search-enabled chatbot that remembers chat history (View the app)
  • simple_feedback.py: A chat app that allows the user to add feedback on responses using streamlit-feedback, and link to the traces in LangSmith (View the app)
  • chat_with_documents.py: Chatbot capable of answering queries by referring custom documents (View the app)
  • chat_with_sql_db.py: Chatbot which can communicate with your database (View the app)
  • chat_pandas_df.py: Chatbot to ask questions about a pandas DF (Note: uses PythonAstREPLTool which is vulnerable to arbitrary code execution, see langchain #7700)

Apps feature LangChain 🤝 Streamlit integrations such as the [Callback integration](https://python.langchain.com/docs/modules/callbacks/integrations/streamlit