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,266 stars 315 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
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

langchain-migration-deep-dive

Migrate to LangChain from raw OpenAI SDK, LlamaIndex, or custom LLM code. Covers codebase assessment, side-by-side validation, RAG migration, agent migration, and feature-flagged gradual rollout. Trigger: "migrate to langchain", "langchain refactor", "legacy LLM migration", "replace openai SDK with langchain", "llamaindex to langchain".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-common-errors

Diagnose and fix common LangChain errors and exceptions. Use when encountering LangChain import errors, auth failures, output parsing issues, agent loops, or version conflicts. Trigger: "langchain error", "langchain exception", "debug langchain", "langchain not working", "langchain troubleshoot".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-hello-world

Create a minimal working LangChain example with LCEL chains. Use when starting a new LangChain integration, testing your setup, or learning LCEL pipe syntax with prompts and output parsers. Trigger: "langchain hello world", "langchain example", "langchain quick start", "simple langchain code", "first langchain app".

2,266 Updated today
jeremylongshore
AI & Automation Solid

langchain-architecture

Design LLM applications using LangChain 1.x and LangGraph for agents, memory, and tool integration. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.

36,166 Updated yesterday
wshobson
AI & Automation Listed

langchain-architecture

Design LLM applications using LangChain 1.x and LangGraph for agents, memory, and tool integration. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.

0 Updated today
CodeWithBehnam