This repository contains Jupyter notebooks for the "Building AI Agents with LangGraph" course. Learn how to build sophisticated AI agents using LangGraph, LangChain, and OpenAI. Course Link
- Python 3.12 or higher
- Poetry (Python package manager)
- API keys for OpenAI, Tavily, and Alpha Vantage
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -curl -sSL https://install.python-poetry.org | python3 -After installation, make sure to add Poetry to your system's PATH. The installer will tell you where Poetry was installed.
git clone https://github.com/yourusername/building-ai-agents-with-langgraph.git
cd building-ai-agents-with-langgraphpoetry installThis will create a virtual environment and install all required dependencies specified in pyproject.toml.
Create a .env file in the root directory and add your API keys:
# Required API Keys
OPENAI_API_KEY=your_openai_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
ALPHAVANTAGE_API_KEY=your_alphavantage_api_key_here
# Optional: LangSmith Tracing (for debugging and monitoring)
# LANGCHAIN_TRACING_V2=true
# LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
# LANGCHAIN_API_KEY="your_langsmith_api_key_here"
# LANGCHAIN_PROJECT="your_project_name"To obtain the required API keys:
- OpenAI API key: OpenAI Platform
- Tavily API key: Tavily AI
- Alpha Vantage API key: Alpha Vantage
The LangSmith tracing configuration is optional but recommended for debugging and monitoring your LangChain applications.
poetry run jupyter labThis will start Jupyter Lab in your default web browser. You can now access and run the notebooks.
building-ai-agents-with-langgraph/
├── notebooks/ # Jupyter notebooks for the course
├── .env # Environment variables (create this file)
├── pyproject.toml # Poetry project configuration
└── README.md # This file
The project uses the following main dependencies:
- LangGraph (^0.2.35)
- LangChain (^0.3.3)
- LangChain OpenAI (^0.2.2)
- OpenAI (^1.51.2)
- Jupyter Lab (^4.2.5)
- Matplotlib (^3.9.2)
For a complete list of dependencies, see pyproject.toml.
-
Poetry not found in PATH
- Windows: Add
%APPDATA%\Python\Scriptsto your PATH - macOS/Linux: Add
$HOME/.local/binto your PATH
- Windows: Add
-
Python version mismatch
poetry env use python3.12
-
Jupyter not launching
poetry run python -m jupyter lab
- Update dependencies:
poetry update - Add a new dependency:
poetry add package_name - Remove a dependency:
poetry remove package_name - Show installed packages:
poetry show - Run a command in the virtual environment:
poetry run command
This project is licensed under the MIT License - see the LICENSE file for details.