Skip to content

Notebook Guide

Sudhanshu edited this page Nov 11, 2026 · 1 revision

Jupyter Notebook Guide

The original notebook is named langgraph_exmaple_multiagents.ipynb (the word exmaple is spelled this way in the uploaded file). It defines its own helpers and examples; it is not a wrapper around the .py script.

Steps

  1. Open the notebook in VS Code or JupyterLab.
  2. Select a kernel with langgraph, langchain-core, pydantic and ipykernel installed.
  3. Run All for the offline examples. The OpenAI cells are skipped by default.
  4. Optionally set DIAGRAM_DIR = Path("generated-graphs") in the notebook to export graph Mermaid source.

Opt in to hosted-model examples only after setting OPENAI_API_KEY, choosing an accessible model, and setting RUN_OPENAI_EXAMPLES=1 in the notebook kernel's environment. Do not hardcode a key in notebook source.

The publication package corrects the two prose cells originally marked as Python code (cells 0 and 2). All remaining code cells pass Python syntax compilation; runtime execution still requires installing the dependencies. The actual examples are deliberately separate from the CLI.

Clone this wiki locally