Building AI Agents with LangChain and LangGraph: Part 1 › Setting Up the Environment

Michael BrenndoerferJuly 21, 20251 min read
Building AI Agents with LangChain and LangGraph: Part 1 › Setting Up the EnvironmentOne section · Sections in this article2 / 8 ↓
Reading tools Definitions & inline links

Toggle tooltip visibility. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

First, we'll import the essential components for building our agentic workflow:

  • init_chat_model for initializing language models
  • tool decorator for creating callable functions
In[64]:
Code
from langchain.chat_models import init_chat_model
from rich.markdown import Markdown
from langchain.tools import tool
from pprint import pprint
import json
In[65]:
Code
llm = init_chat_model("google_vertexai:gemini-2.0-flash", temperature=0)

type(llm)
Out[65]:
Console
langchain_google_vertexai.chat_models.ChatVertexAI