| layout | page/note/basic |
|---|
This guide will help you set up and run the LangGraph-GUI, both backend and frontend, on a Windows environment, using environment variables for backend port and Ollama URL.
Before you begin, ensure you have the following installed on your system:
- Codebase
- Python or Conda
- npm
- Ollama
```bash
git clone --recursive https://github.com/LangGraph-GUI/LangGraph-GUI
```
-
Download Ollama from official
-
Open Another PowerShell Terminal
Open another PowerShell terminal window. -
Start Ollama
Run the Ollama service:ollama serve
-
Open a PowerShell Terminal Open another PowerShell terminal window to start the setup process.
-
Create a Conda Environment (Optional) Create a new Conda environment for the LangGraph backend:
conda create --name langgraph-backend python=3.11
Activate your new environment:
conda activate langgraph-backend
-
Clone the Backend Repository Clone the LangGraph backend repository from GitHub:
git clone https://github.com/LangGraph-GUI/LangGraph-GUI-backend
-
Navigate to the Backend Directory Change directory to the backend project folder:
cd LangGraph-GUI-backend -
Install Python Dependencies Install the required Python packages using
pip:pip install -r requirements.txt
-
Start the Backend Server
Set Environment Variables Before starting the backend, you need to set the following environment variables. If you skip this, the default values will be used:
- BACKEND_PORT: The port number for the backend server. (Default: 5000)
- OLLAMA_BASE_URL: The base URL for your Ollama service. (Default:
http://localhost:11434)
To set these variables for your PowerShell session, use:
$env:BACKEND_PORT=5000 $env:OLLAMA_BASE_URL="http://localhost:11434"
Run the backend server:
mkdir src/workspace cd src/workspace python ../server.py
-
Open Another PowerShell Terminal
Open a new PowerShell terminal window. -
Clone the Frontend Repository
frontend need dep Clone the LangGraph frontend repository from GitHub:-frontend
-
Navigate to the Frontend Directory
Change directory to the frontend project folder:cd LangGraph-GUI-frontend -
Install Node.js Dependencies
Usenpmto install the required packages:npm install
-
Start the Frontend Server
Launch the frontend server:npm start
After completing the steps above, you should have the backend and frontend servers running along with the Ollama service. You can now access the LangGraph GUI through your web browser at http://localhost:3000.
- Ensure all terminal windows remain open while running the servers.