Graphite is a sophisticated desktop application that revolutionizes interaction with Large Language Models (LLMs). It transforms standard linear chat conversations into a dynamic, non-linear visual workspace. Built with Python and PyQt5, Graphite leverages local LLMs via Ollama to provide a secure, private, and powerful tool for brainstorming, research, and complex problem-solving.
- Overview
- Key Features
- Gallery
- Technical Architecture
- Technology Stack
- Installation and Setup
- Usage
- Contributing
- License
Traditional chatbot interfaces confine conversations to a single, chronological timeline. This linear format stifles creativity and makes it difficult to revisit, branch, or organize complex lines of thought.
Graphite solves this by treating every conversation as an interactive mind-map on an infinite canvas. Each prompt and response becomes a distinct node, visually connected to form a branching graph of your entire dialogue. This unique approach allows you to trace the evolution of ideas, explore multiple paths from any point in the conversation, and build a rich, interconnected knowledge base—all while ensuring your data remains completely private on your local machine.
- Node-Based Visual Interface: Move beyond linear text logs. Every interaction is a movable, selectable node on an infinite canvas.
- Non-Linear Conversation Flow: Branch your conversation from any previous node to explore alternative ideas without losing context.
- Local and Private LLM Integration: Powered by Ollama, all AI processing happens locally. Your conversations are never sent to the cloud, ensuring 100% privacy.
- Rich Organizational Tools:
- Frames: Group related nodes into logical clusters with customizable titles and colors.
- Notes: Add persistent, editable sticky notes to the canvas for annotations and reminders.
- Navigation Pins: Drop pins on important nodes and access them instantly from a dedicated overlay, creating a table of contents for your canvas.
- AI-Powered Content Generation:
- Chart Generation: Ask the AI to summarize data and generate
matplotlibcharts (Bar, Line, Pie, Histogram, and Sankey) directly on the canvas. - Key Takeaways & Explainers: Right-click any node to generate a concise summary or a simplified explanation, which appear as new, formatted notes.
- Chart Generation: Ask the AI to summarize data and generate
- Advanced View and Canvas Controls:
- Infinite Canvas: Pan and zoom freely across a vast workspace.
- Custom UI Controls: Fine-tune grid snapping, panning speed, and zoom levels.
- Comprehensive Session Management:
- Chat Library: Save, load, rename, and manage all your conversation canvases.
- Secure Local Database: All sessions, including nodes, frames, notes, and pins, are stored securely in a local SQLite database.
| Organize with Frames and Notes | Generate Charts from Data |
![]() |
![]() |
| Navigate with Pins | Explore Conversation Branches |
![]() |
![]() |
| Chat Library for Session Management | Detailed Node Interaction |
![]() |
![]() |
Graphite is designed with a clear separation of concerns, loosely following a Model-View-Controller (MVC) pattern.
- View Layer (UI): Built with PyQt5. The
ChatWindowserves as the main application container. The core visual component is theChatView(QGraphicsView), which displays theChatScene(QGraphicsScene). All interactive elements—ChatNode,Frame,Note,ConnectionItem,ChartItem, andNavigationPin—are custom subclasses ofQGraphicsItem, allowing for highly tailored rendering and event handling. - Controller Layer (Logic): The
ChatWindowclass acts as the central controller, managing user input, orchestrating UI updates, and handling communication with the AI backend. Long-running AI operations are delegated toQThreadworkers (ChatWorkerThread,ChartWorkerThread, etc.) to ensure the UI remains responsive. - Model Layer (Data): Data persistence is handled by the
ChatSessionManagerand theChatDatabase. TheChatDatabaseuses SQLite to store all session data. TheChatSessionManageris responsible for serializing the entire state of theChatSceneinto a JSON format for storage and deserializing it to load sessions.
- Language: Python 3.8+
- UI Framework: PyQt5
- Local LLM Interface: Ollama
- Charting Library: Matplotlib
- Database: SQLite
- Icons: QtAwesome (FontAwesome)
Follow these steps to get Graphite running on your local machine.
- Python: Ensure you have Python 3.8 or newer installed.
- Ollama: You must have Ollama installed and running.
Before running Graphite, you need to pull a model for Ollama to use. Open your terminal and run:
ollama pull qwen2.5:7bYou can use other models like qwen3, Gemma, or Phi, but this one is recommended for a good balance of performance and capability. Ensure the Ollama application is running in the background.
-
Clone the repository:
git clone https://github.com/dovvnloading/Graphite.git cd Graphite -
Create and activate a virtual environment (recommended):
# For Windows python -m venv venv .\venv\Scripts\activate # For macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install the required Python packages:
pip install -r requirements.txt
(If a
requirements.txtis not available, install manually:pip install PyQt5 ollama matplotlib qtawesome)
Once the setup is complete, launch the application by running:
python main.py(Note: The main executable script might have a different name, such as app.py or similar.)
- Sending Messages: Type your message in the input box at the bottom and press Enter or click the send button. A new user node will appear, followed by a connected AI response node.
- Setting Context: To branch the conversation, simply click on any previous node. The input box will indicate it's your new context. Your next message will create a new branch from that selected node.
- Interacting with Nodes:
- Move: Click and drag any node to reposition it.
- Select: Click a node to select it, or drag a selection box to select multiple nodes.
- Context Menu: Right-click a node to access options like copying text, generating takeaways, creating charts, or deleting the node.
- Keyboard Shortcuts:
Ctrl + F: Create a Frame around selected nodes.Ctrl + N: Create a new Note at the cursor's position.Delete: Delete any selected item (node, frame, note, etc.).
Known issues: The graph generation is very brittle and not very stable. Note: Larger models do handle chart data far better than smaller models, however the system requirements to use the larger models is significantly larger.
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix (
git checkout -b feature/your-feature-name). - Make your changes and commit them with clear, descriptive messages.
- Push your changes to your forked repository.
- Create a pull request, detailing the changes you made and why.
Please open an issue first to discuss any major changes or new features.
This project is licensed under the MIT License. See the LICENSE file for more details.






