
cd /root && mkdir -p langgraph-lab && cd langgraph-lab
python3 -m venv venv && source venv/bin/activate
pip install --upgrade pip uv
# Core LangGraph and LangChain packages
uv pip install langgraph langchain langchain-core langchain-community
# LLM Providers and State Management
uv pip install langchain-openai langgraph-checkpoint
# Research Tools and Utilities (DuckDuckGo is FREE - no API key!)
uv pip install ddgs beautifulsoup4 requests python-dotenv pydantic typing-extensions
echo "LANGGRAPH_INSTALLED" > /root/langgraph-ready.txt

For better understanding, run these three code examples
# This is the project directory,
code
|>task2
|>task3
|>task4
|>task5
|>task6
|>task7
|>task8
|>task9
readme.md
put this file in task2 folder
<aside> 💡
replace $ from langchain.prompts import ChatPromptTemplate with $ from langchain_core.prompts import ChatPromptTemplate
</aside>
# Step 1: Run sequential chain example
python /root/code/task2/sequential_chain.py
# Step 2: Run stateful graph example
python /root/code/task2/stateful_graph.py
# Step 3: Compare the approaches
python /root/code/task2/compare_approaches.py