Skip to content

colin2wang/langgraph-learning-project

Repository files navigation

LangGraph Learning Project

This repository contains examples and tutorials for learning LangGraph, a library for building stateful, multi-step AI applications using graphs.

Table of Contents

Overview

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.

Project Structure

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

Prerequisites

  • Python 3.8 or higher
  • Jupyter Notebook or JupyterLab
  • Ollama (for examples that use local models)
  • Required Python packages (see Installation)

Installation

  1. Clone this repository:

    git clone <repository-url>
    cd langgraph-learning-project
  2. Create a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install the required packages:

    pip install langgraph langchain langchain-core langchain-ollama ollama
  4. Install Ollama from https://ollama.com/ if you plan to run the Ollama examples.

  5. Pull the required models (example with qwen3):

    ollama pull qwen3:8b

Usage

  1. Start Jupyter Notebook:

    jupyter notebook
  2. Navigate to any of the example notebooks and run them cell by cell.

Examples

Simple Graph Examples

  1. 00-simple-langgraph.ipynb: A basic introduction to LangGraph concepts.
  2. 01-langgraph_chatbot.ipynb: Implementation of a simple chatbot using LangGraph.

Ollama Integration Examples

  1. 00-lang-graph-hello-world.ipynb: Getting started with LangGraph and Ollama.
  2. 01-ollama-with-tool-call-01.ipynb: Basic example of tool calling with Ollama models.
  3. 02-ollama-with-tool-call-02.ipynb: Advanced tool calling implementation with dynamic tool registration.
  4. 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.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published