# LangChain 0.3 to v1 Migration: Scan, Fix, Prove

> Finds every LangChain 0.3 / LangGraph 0.4 line that breaks on 1.x, fixes it, and proves it with a re-scan, import check and agent smoke test.

LangChain 0.3 to v1 Migration: Scan, Fix, Prove is a paid AI agent skill on Agensi by Hamza Alayed, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $1 (one-time purchase)
- Creator: [Hamza Alayed](https://www.agensi.io/creators/hamza-alayed)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/langchain-0-3-to-v1-migration-scan-fix-prove
- Tags: llm-ops, agents-orchestration, code-quality-review, apis-backend

## About this skill

LangChain 0.3 and LangGraph 0.4 receive security fixes only **until December 2026** (official LangChain release policy). Moving to 1.x is not a version bump: `langchain.chains`, `langchain.prompts`, `langchain.schema`, `langchain.memory`, `langchain.text_splitter` and more now raise `ModuleNotFoundError`, and `create_react_agent` is replaced by `create_agent` with middleware.

This skill gives your agent a complete, verified migration path:

- **Bundled read-only scanner** (`lc_v1_scan.py`, Python standard library only): 23 line rules plus a multi-line call check, BLOCKER / WARN / REVIEW severity, file:line, the exact fix, dependency pins, Markdown or JSON output, exit code 1 while blockers remain.
- **Verified import map**: every 0.3 module checked against langchain 1.5.2, langchain-core 1.8.5, langchain-classic 1.1.0 and langgraph 1.2.24 on 2026-12-01, with the final form and the `langchain_classic` stopgap for each.
- **Agent API mapping**: `prompt=` → `system_prompt=`, `pre_model_hook`/`post_model_hook` → middleware, `ToolNode(handle_tool_errors=…)` → `@wrap_tool_call`, prompted structured output → `ToolStrategy`, `"agent"` stream node → `"model"`, `configurable` → `context=`, `AgentExecutor` settings → `create_agent` equivalents.
- **Proof before hand-over**: re-scan exit 0, import check with deprecation warnings as errors, the project's tests, and a no-API-key smoke test template that asserts the streamed nodes.
- **Report**: `LANGCHAIN_V1_MIGRATION.md` with before/after counts, every change, verification evidence, stopgaps and REVIEW decisions, and a PASS / PARTIAL / BLOCKED status.

Every behaviour claim in the skill was run on the current 1.x packages, not copied from memory.

## Requires

- Python 3.10+
- pip

## Known limitations

Python only; LangChain.js / TypeScript is not covered. The scanner is pattern-based: it reports dynamic imports, string module paths in config files and unusual formatting only partly, so the procedure includes a manual search for those. It does not migrate langchain-community integrations to every provider package one by one. Facts and versions were verified on 2026-12-01; later 1.x releases stay semver-compatible but may add new deprecations. Smoke tests use a fake model, so they prove wiring, not answer quality.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the LangChain 0.3 to v1 Migration: Scan, Fix, Prove skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### When does LangChain 0.3 support actually end?

The official LangChain release policy lists LangChain 0.3 and LangGraph 0.4 in MAINTENANCE mode with security patches and critical fixes until December 2026. LangChain 1.0 and LangGraph 1.0 are the LTS lines. Checked on 2026-12-01.

### Can I just install langchain-classic and stop there?

That is the fast path and the skill supports it, but every langchain_classic import is listed as a stopgap and the report status stays PARTIAL until they are replaced with create_agent, LCEL or a checkpointer.

### How is this different from the free official migration guide?

The guide explains the changes; this skill finds every affected line in your repo with a scanner, applies fixes in a safe order, and refuses to report success until a re-scan, an import check, your tests and an agent smoke test all pass. It also covers gaps the guide does not spell out, such as old provider pins silently downgrading langchain-core.

### Does it support LangChain.js?

No. It covers the Python packages only.

### Do I need an API key to run the proof checks?

No. The smoke test template uses LangChain's fake chat model, so it runs offline and costs nothing.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
