Choose your LangChain.js migration path

LangChain.js is published as langchain and @langchain/core, and a major upgrade moves both. Start with the release you are moving to. Each guide names the changes Emendant covers, shows code before and after, and states what still needs your review.

Check your repository before you upgrade

  1. Check the installed langchain and @langchain/core versions in your manifest and lockfile. Read each guide between those versions and your target.
  2. Run npx emendant scan in your TypeScript or JavaScript repository. It reports supported changes at affected call sites without editing your files.
  3. Review the findings, then run npx emendant fix --dry-run to inspect eligible patches. Emendant does not update package versions or install packages for you. The 0.3 and 1.0 patches rewrite imports to @langchain/community or @langchain/classic, so add that package before you apply them.
  4. After you update dependencies, run your own typecheck and tests.

What Emendant fixes, and the gaps

  • Transforms patch the import moves in langchain 0.3 and 1.0. The @langchain/core 1.0 changes and the type changes in later 1.x releases are patched only when you name a model provider.
  • Some removals have no replacement, so Emendant reports them and does not patch them: the self-query translators and the NotionDB loader in 0.3, RemoteRunnable in 1.0, and four legacy @langchain/core subpaths.
  • Emendant does not move legacy chains or agents to the 1.0 agent API. It moves their imports to @langchain/classic, which publishes the same modules.
  • The feed covers langchain and @langchain/core only. A scan does not report changes in @langchain/community, @langchain/classic, @langchain/langgraph or provider packages such as @langchain/openai.

Emendant reports only changes in its curated feed. A clean scan does not prove that every LangChain.js migration step is complete. Read the supported projects guide for the current scope and the fix guide for patch grades.

LangChain.js release pages

Releases without a page here may still be in the feed. Run emendant feed status to see what your snapshot holds.