This repository contains examples and tutorials for learning LangGraph, a library for building stateful, multi-step AI applications using graphs.
LangGraph is a library for building stateful, multi-step AI applications using graphs. This project provides hands-on examples to help you understand how to use LangGraph with different models and tools.
langgraph-learning-project/
├── simple_graph/
│ ├── 00-simple-langgraph.ipynb # Basic LangGraph example
│ └── 01-langgraph_chatbot.ipynb # Simple chatbot implementation
├── graph_with_ollama/
│ ├── 00-lang-graph-hello-world.ipynb # Introduction to LangGraph with Ollama
│ ├── 01-ollama-with-tool-call-01.ipynb # Tool calling with Ollama (Basic)
│ ├── 02-ollama-with-tool-call-02.ipynb # Tool calling with Ollama (Advanced)
│ └── 03-ollama-simple-example.ipynb # Simple example with Ollama
├── json_utils.py # Utility functions for JSON handling
├── juputer_constants.py # Constants used in Jupyter notebooks
└── README.md # This file
- Python 3.8 or higher
- Jupyter Notebook or JupyterLab
- Ollama (for examples that use local models)
- Required Python packages (see Installation)
-
Clone this repository:
git clone <repository-url> cd langgraph-learning-project
-
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install the required packages:
pip install langgraph langchain langchain-core langchain-ollama ollama
-
Install Ollama from https://ollama.com/ if you plan to run the Ollama examples.
-
Pull the required models (example with qwen3):
ollama pull qwen3:8b
-
Start Jupyter Notebook:
jupyter notebook
-
Navigate to any of the example notebooks and run them cell by cell.
- 00-simple-langgraph.ipynb: A basic introduction to LangGraph concepts.
- 01-langgraph_chatbot.ipynb: Implementation of a simple chatbot using LangGraph.
- 00-lang-graph-hello-world.ipynb: Getting started with LangGraph and Ollama.
- 01-ollama-with-tool-call-01.ipynb: Basic example of tool calling with Ollama models.
- 02-ollama-with-tool-call-02.ipynb: Advanced tool calling implementation with dynamic tool registration.
- 03-ollama-simple-example.ipynb: A straightforward example showing how to integrate Ollama with LangGraph.
Each notebook builds upon concepts introduced in previous ones, so it's recommended to go through them in order.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.