LangGraphLangGraph 1.2 · Python 3.10+
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
38 small wins to finish your pathNext lesson

Installation and setup

LangGraph installs with pip. The course runs on a stand-in chat model, and a free Groq or Gemini key is enough when you move to a hosted one.

langgraph 1.2.11 and langchain 1.4.0

Two packages are needed: langgraph runs your graphs, and langchain provides the chat models, message types and tools used from lesson 13 onwards. LangGraph pulls in part of LangChain by itself, but not the part lesson 30 needs. The versions are pinned so your output matches the lessons.

pip install "langgraph==1.2.11" "langchain==1.4.0"

Check that Python finds the installed version:

Example
from importlib.metadata import version

print(version("langgraph"))

A hosted chat model for lesson 31Optional

Lessons 2 to 14 are plain Python and LangGraph, and from lesson 15 the course uses a stand-in chat model you write yourself. Lesson 31 loads a hosted model with init_chat_model. Each provider needs its LangChain package and a key.

ProviderKeyVariablePackage and model string
GroqFree, console.groq.com/keysGROQ_API_KEYlangchain-groq, "groq:openai/gpt-oss-120b"
GeminiFree, aistudio.google.com/apikeyGOOGLE_API_KEYlangchain-google-genai, "google_genai:gemini-2.5-flash"
OpenRouterFree models end in :free, openrouter.ai/keysOPENROUTER_API_KEYlangchain-openrouter, "openrouter:google/gemma-4-31b-it:free"
OpenAIPaid, platform.openai.com/api-keysOPENAI_API_KEYlangchain-openai, "openai:gpt-4o-mini"
pip install langchain-groq
export GROQ_API_KEY=gsk_...
python
from langchain.chat_models import init_chat_model

model = init_chat_model("groq:openai/gpt-oss-120b")

langgraph dev, in lesson 36, reads keys from a .env file in the project folder. List .env in .gitignore so a key never reaches a repository.

text
# .env
GROQ_API_KEY=gsk_...
LANGSMITH_API_KEY=your-key-here
LANGSMITH_TRACING=true

LangSmith tracingOptional

LangSmith, LangChain's hosted tracing service, is optional. Lesson 37 turns it on with two variables, LANGSMITH_TRACING=true and LANGSMITH_API_KEY, using a key from your LangSmith account settings.

Try it yourself
  • Run pip show langgraph and compare the version with the one printed above.

Little by little, you're building something great.