langchain-upgrade-migration

Featured

Upgrade LangChain SDK versions safely with import path migration, LCEL conversion from legacy chains, and agent API updates. Trigger: "upgrade langchain", "langchain migration", "langchain breaking changes", "update langchain version", "langchain 0.3", "langchain deprecation".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# LangChain Upgrade Migration ## Current State !`npm list @langchain/core @langchain/openai 2>/dev/null | head -10` ## Overview Safely upgrade LangChain versions: check compatibility, migrate import paths, convert legacy chains to LCEL, update agent APIs, and validate with tests. ## Breaking Changes Timeline ### 0.1.x to 0.2.x (Major Restructuring) - `@langchain/core` extracted as separate package - Chat models moved to provider packages (`@langchain/openai`, `@langchain/anthropic`) - Imports changed from `langchain/*` to `@langchain/core/*` ### 0.2.x to 0.3.x (LCEL Standardization) - Legacy `LLMChain`, `ConversationChain` deprecated - `initialize_agent` deprecated (use `createToolCallingAgent`) - Memory API: `ConversationBufferMemory` replaced by `RunnableWithMessageHistory` - All chains should use LCEL pipe syntax ## Step 1: Check Current Versions ```bash # Node.js npm ls @langchain/core @langchain/openai langchain 2>&1 | head -20 # Python pip show langchain langchain-core langchain-openai | grep -E "Name|Version" ``` ## Step 2: Migrate Import Paths (TypeScript) ```typescript // OLD (pre-0.2) import { ChatOpenAI } from "langchain/chat_models/openai"; import { PromptTemplate } from "langchain/prompts"; import { LLMChain } from "langchain/chains"; import { BufferMemory } from "langchain/memory"; // NEW (0.3+) import { ChatOpenAI } from "@langchain/openai"; import { ChatPromptTemplate } from "@langchain/core/prompts"; import { StringOutputParser } from "@langcha...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category