Skip to content

farukhfrk/graphmind

Repository files navigation

GraphMind

GraphMind is a Streamlit-based AI chatbot that uses LangGraph to manage multi-threaded conversations and SQLite to persist chat history. The project keeps the original chat behavior intact while organizing the code into a cleaner, more maintainable structure.

Features

  • AI chatbot experience with streaming responses
  • LangGraph workflow for message handling
  • Multiple conversation threads
  • Sidebar thread management
  • SQLite-backed chat history persistence
  • Streamlit user interface
  • Modular architecture for maintainability

Technology Stack

  • Python
  • Streamlit
  • LangGraph
  • LangChain
  • OpenAI
  • SQLite

Project Structure

  • app.py: Streamlit entry point
  • graphmind/: core chat, graph, and configuration modules
  • ui/: sidebar and chat rendering helpers
  • tests/: regression tests
  • docs/: project documentation

Prerequisites

  • Python 3.10+
  • Git
  • pip

Installation

Windows

  1. Clone the repository
  2. Create a virtual environment: py -m venv .venv
  3. Activate it: .venv\\Scripts\\activate
  4. Install dependencies: pip install -r requirements.txt
  5. Create a .env file from .env.example
  6. Configure your OpenAI API key
  7. Run the app: streamlit run app.py

macOS / Linux

  1. Clone the repository
  2. Create a virtual environment: python3 -m venv .venv
  3. Activate it: source .venv/bin/activate
  4. Install dependencies: pip install -r requirements.txt
  5. Create a .env file from .env.example
  6. Configure your OpenAI API key
  7. Run the app: streamlit run app.py

SQLite Setup

SQLite is used without any additional installation. The default database file is stored as graphmind.db in the project root. It is created automatically when the app first runs. To recreate it, delete the database file and restart the application.

Environment Variables

Create a .env file based on .env.example and set:

  • OPENAI_API_KEY: your OpenAI API key
  • OPENAI_MODEL: the model name to use
  • SQLITE_DB_PATH: optional SQLite database path
  • STREAMLIT_PAGE_TITLE: optional page title for Streamlit

Running the Project

streamlit run app.py

Troubleshooting

  • If imports fail, install the requirements again with pip install -r requirements.txt.
  • If the app cannot reach OpenAI, verify that OPENAI_API_KEY is correct.
  • If the database is missing, the application will create it automatically.

Future Roadmap

  • Long-term memory
  • RAG
  • Tool calling
  • MCP integration
  • Multi-agent workflows
  • Docker
  • Authentication
  • Cloud deployment

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages