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 ↓
Sections in this article8
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_modelfor initializing language modelstooldecorator for creating callable functions
In[64]:
Codefrom langchain.chat_models import init_chat_model
from rich.markdown import Markdown
from langchain.tools import tool
from pprint import pprint
import jsonIn[65]:
Codellm = init_chat_model("google_vertexai:gemini-2.0-flash", temperature=0)
type(llm)Out[65]:
Consolelangchain_google_vertexai.chat_models.ChatVertexAI