LangChain is the framework that lets you build advanced AI systems like:
- ChatGPT-style apps
- Perplexity-style search agents
- Autonomous AI agents
- Tool-using AI (search, scrape, browser, DB queries)
- RAG systems (Retrieval Augmented Generation)
- Multi-agent workflows
- AI automations
In simple words:
With LangChain you can give your model the power to:
- Run functions
- Use tools
- Search the internet
- Scrape websites
- Execute multi-step workflows
- Process data
- Work with embeddings + vector search
- Create intelligent agents
This repo teaches all of that step-by-step.
Modern AI apps are not just LLM calls anymore.
Real-world AI systems need:
- Memory
- Tools
- Multi-step reasoning
- Internet search
- Web scraping
- File processing
- Database querying
- Agents that can plan & act
- Strong orchestration
- Workflow control
LLMs cannot do these things alone.
This is where LangChain + LangGraph come in.
LLMs alone = text in β text out
LangChain = LLM + Tools + Memory + Functions
Now your AI can:
- search the internet
- scrape websites
- run code
- call APIs
- access databases
- use functions
- follow workflows
This is how ChatGPT Tools, Perplexity, and BrowserGPT work.
You donβt have to manually write:
- LLM β reasoning β tool β combine results β final output
LangChain handles:
- input formatting
- tool calling
- function schemas
- conversions
- parallel execution
- mapping & sequencing
Everything becomes clean, modular, reusable.
With:
- Runnables
- Output Parsers
- Embeddings
- Vector Stores
- RAG pipelines
You can build:
- Memory agents
- Knowledge assistants
- Personal AI
- Chatbots that remember context
Supports:
- OpenAI
- Gemini
- Anthropic
- Local models
- Ollama
- HuggingFace
- Cloudflare AI
Your code stays the same even if the model changes.
LangChain gives you tools,
but LangGraph gives you the brain to control them.
LangGraph provides:
- Nodes (steps)
- State management
- Conditional edges
- Routing
- Multi-agent flows
- Cycles + loops
- Workflow orchestration
- Re-entry + persistence
This is EXACTLY how:
- Perplexity agents
- ReAct agents
- Supervisors
- Tool routers
- Multi-agent systems
are built.
Together they let you build:
LLM thinks β chooses tool β uses tool β updates memory β repeats.
Search β scrape β summarize β final answer.
Use Puppeteer β extract content β feed to LLM.
With:
- routing
- memory
- tools
- scraping
- search
- pipelines
- multi-agents
Exactly what modern AI companies use.
Learn LangChain to give your AI tools.
Learn LangGraph to give your AI a brain.
Together they let you build real AI systems, not toy chatbots.
This is an open-source, ongoing, continuously-evolving LangChain JS learning project created by Paresh.
The goal is simple:
π Teach LangChain JS from absolute zero to advanced with clean, runnable examples.
π Each topic = a self-contained lesson (folder) with its own README + code.
π Explained in ELI5 style: super simple, super practical.
This repository is structured like a hands-on course, not just random scripts.
Many people get confused where to start, so here is the official recommended order:
This gives you:
- How model initialization works
- How a basic
.invoke()works - Simple structure before learning chains/tools
01 β 02 β 03 β 04 β 05 β 06 β 07 β 08 β 09 β 10 β 11 β 12 β 13
Each file builds on top of the previous one.
- Basic LLM usage β index.js
- Prompt Template + Chains β 01, 02
- Output parsing β 03
- Custom steps / preprocessing β 04
- Embeddings + vector search β 05
- Basic RAG β 06
- Tools (RunnableLambda) β 07
- Scraper tool β 08
- LLM as a tool β 09
- Agent with scraper β 10
- Basic LangGraph agent β 11
- Multi-agent system β 12
- Advanced multi-agent with real search & scraping β 13
After these 13, you understand:
β LLM basics
β Chains
β Tools
β RAG
β Embeddings
β Agents
β Multi-agents
β LangGraph
β Routing
β Real scraping
β Real internet search
This is full AI backend mastery.
Building real AI applications requires more than calling an LLM.
You need:
- Chains
- Tools
- Agents
- RAG
- Embeddings
- Web scraping
- Automation
- Multi-agent systems
- LangGraph workflows
However, official docs are scattered and lack practical examples.
This repo fixes that by providing:
β Simple explanations
β Real code you can directly run
β Modern LangChain v1 structure
β Multi-agent + tool + automation examples
β Practical steps for real-world AI development
β Makes LangChain JS extremely beginner-friendly
β Every lesson works directly via node <filename>
β Covers everything needed for modern AI backend development
β Perfect for MERN developers transitioning into AI
β Each concept explained with clarity + comments
β Updated continuously with new lessons & examples
β Helps you build production-grade AI systems, not toy demos
β Great for your resume + GitHub profile
This project is actively being improved.
The author will continuously push updates, new folders, and new explanations.
Right now, topics are single JS files.
Soon each will have its own dedicated folder + README + code.
01 - Prompt Chain
02 - Pipe (Basic Chaining)
03 - Output Parser
04 - Custom Step Logic
05 - Embeddings + Vector Search
06 - Basic RAG
07 - Tool Basics
08 - Web Scraper Tool (Puppeteer + Cheerio)
09 - LLM as a Tool
10 - Agent Demo with Scraper
11 - LangGraph Agent Basics
12 - Multi-Agent System (Basic)
13 - Multi-Agent System (Extended)
index.js β Starter example
- LangChain JS
- LangGraph
- Google Gemini 2.0 Flash
- Puppeteer
- Cheerio
- Zod
- dotenv
- Node.js
- Embeddings
- Vector Search
- RAG
- Tools
- Agents
- Multi-agents
This repo will eventually become a full Agentic AI backend learning resource.
These are topics planned for future lessons. Exact filenames/folders will be decided later.
- Advanced RAG techniques
- Structured outputs
- Using multiple tools together
- Agent memory systems
- LangGraph advanced flows
- Multi-agent workflows with supervisor
- Multi-agent research systems
- Combining LangChain + Tavily search
- Browser automation agents
- Error handling + retries + guardrails
- Practical real-world agent workflows
- AI-powered automation pipelines (end to end)
More topics will get added as the repo grows.
- Clone the repo:
git clone https://github.com/iparesh18/langchain-js-zero-to-advanced
- Install dependencies:
npm install
This will install the following dependencies used across all chapters:
- @langchain/core β core LangChain components
- @langchain/classic β legacy abstractions
- @langchain/google-genai β Gemini 2.0 models
- @langchain/openai β OpenAI models (optional)
- @langchain/langgraph β multi-agent + workflow engine
- dotenv β load
.envAPI keys - openai β direct OpenAI SDK
- serpapi β Google Search API
- zod β schema validation
- Create
.env:
cp .env.example .env
- Run any lesson:
node 01-prompt-chain.js
Each example is fully self-contained.
This is an open-source learning project β contributions are welcome.
You can contribute by:
- Improving explanations
- Adding new lessons
- Fixing bugs
- Adding better examples
- Enhancing tool/agent demos
Submit a PR anytime.
Licensed under the MIT License.
Free for everyone to learn, modify, and build on.
If this repo helped you, consider giving it a β on GitHub β
It motivates the author to push more chapters and make this project world-class.
