Prerequisites
Before you begin, ensure you have the following:- Chrome browser (recommended for the best experience)
- Node.js >= 18 - Download here or see Node.js version management below
- npm (included with Node.js)
Installation
Clone the repository
Download the course repository using a shallow clone to get only the latest code:
Install dependencies
Install all required packages using npm:This will install all dependencies listed in
package.json, including:- LangChain and LangGraph libraries
- LangSmith for tracing and evaluation
- TypeScript and tsx for running TypeScript files
- All other required packages
Configure API keys
Edit the Where to get API keys:
.env file to include your API keys:- LangSmith API Key - Create a free account
- OpenAI API Key
- Anthropic API Key (optional)
Verify setup
Run the verification script to ensure everything is configured correctly:The verification script checks:
- ✅ Node.js executable location and version (must be >=18)
- ✅ npm and tsx are available
- ✅ Required packages are installed with correct versions
- ✅ Environment variables (API keys) are properly configured
Running Scripts
This course uses TypeScript scripts. Usenpx tsx to run them directly without a build step:
The
tsx package allows you to run TypeScript files directly without compiling to JavaScript first. It’s included as a dev dependency and installed with npm install.Node.js Version Management
Managing your Node.js version is often best done with a version manager. This allows you to select a Node.js version for the course independent of the system version.Using nvm (recommended)
nvm (Node Version Manager) lets you install and switch between multiple Node.js versions:The LTS (Long Term Support) version of Node.js is recommended for stability. As of this writing, Node.js 22 is the current LTS version.
Using the official installer
Download and install Node.js directly from nodejs.org. The LTS version is recommended. After installation, verify your Node.js version:Environment Variables
This course uses the dotenv module to read key-value pairs from the.env file and set them in the environment. They do not need to be set globally in your system environment.
LangSmith Configuration
LangSmith is required for evaluation and tracing in this course:Create account
Sign up for a free LangSmith account
If you’re on the EU instance of LangSmith, uncomment and use
LANGSMITH_ENDPOINT=https://eu.api.smith.langchain.com in your .env file.Troubleshooting
Module not found when running scripts
If you see an error likeCannot find module, you likely haven’t installed dependencies yet.
Solution:
lca-reliable-agents/ts) when running this command.
Environment Variable Conflicts
If you see a warning about “ENVIRONMENT VARIABLE CONFLICTS DETECTED”, you have API keys set in your system environment that differ from your.env file.
Solutions:
- Unset the conflicting system environment variables (commands provided in warning):
- macOS/Linux:
unset VARIABLE_NAME - Windows PowerShell:
Remove-Item Env:VARIABLE_NAME
- macOS/Linux:
- Update your
.envfile to match your system environment
LangSmith Tracing Errors
If you see “LANGSMITH_TRACING is enabled but LANGSMITH_API_KEY still has the example/placeholder value”, you need to set a valid LangSmith API key in your.env file.
Solution:
Replace the placeholder value in .env with your actual LangSmith API key from smith.langchain.com.
Wrong Node.js Version
If you see a warning about Node.js version not satisfying requirements (must be >= 18): Solutions:- Install Node.js from nodejs.org (LTS version recommended)
- Use nvm to install and manage Node.js versions
tsx command not found
If you get an error thattsx is not found:
Solution:
Make sure you’ve installed dependencies:
npx tsx (not just tsx) to run TypeScript files, which will use the locally installed version.
Model Providers
The course primarily uses OpenAI’sgpt-5-nano model, which is very inexpensive. If you don’t have an OpenAI API key, sign up here.
You can optionally obtain an Anthropic API key here for the question generator.
Development Environment
This course uses TypeScript scripts that you can edit and run in any editor, including:- VSCode
- Cursor
- Windsurf
- Any text editor with a terminal
- IntelliSense and autocomplete
- Type checking
- Go-to-definition
- Inline documentation