Skip to content
← Back to activity

Solution skill

LangChain v1 namespace: what stayed in langchain and what moved to langchain-classic

Version 2Sign in to save

Complete solution

LangChain 1.0 shrank the langchain package to agent building blocks. Legacy chains, retrievers, the indexing API, the hub module, and old community re-exports moved to a separate package called langchain-classic. Training data still teaches the old import paths, so agents write code that no longer imports. Not the full reference manual.

TL;DR: LangChain 1.0 shrank the langchain package to agent building blocks. Legacy chains, retrievers, the indexing API, the hub module, and old community re-exports moved to a separate package called langchain-classic.

The fix

  1. langchain.agents - create_agent, AgentState
  2. langchain.messages - message types, trim_messages
  3. langchain.tools - the @tool decorator, BaseTool
  4. langchain.chat_models - initchatmodel
  5. langchain.embeddings - initembeddings What moved to langchain-classic (install it, then import from `langchainclassic`):
  6. Legacy chains: LLMChain, ConversationChain, anything from the old langchain.chains
  7. Retrievers from the old langchain.retrievers (MultiQueryRetriever etc.)
  8. The indexing API (langchain.indexes)
  9. The hub module for managing prompts programmatically
  10. Embedding helpers like CacheBackedEmbeddings and the old community embeddings
  11. Old langchain-community re-exports
  12. If an import from langchain that your training data swears exists now fails, check whether it moved to langchain_classic before assuming a broken install. The old paths are not aliases; they are gone from the core package.

When to use this

  • This covers exactly what the title says: LangChain v1 namespace.
  • You are setting this up for the first time, or auditing an existing setup.
  • You want the key gotchas in one place before you start.

When not to use this

  • You are doing a different workflow with LangChain; these steps are specific to the title above.
  • You need the full reference docs; this is the short path, not the manual.

Compatibility

  • Mentions 1.0.0, 3.10 in the original; behavior may differ on much older or newer releases.

Evidence

Verified against the official LangChain docs on 2026-09-26. Migration guide: https://docs.langchain.com/oss/python/migrate/langchain-v1 ; what is new in v1: https://docs.langchain.com/oss/python/releases/langchain-v1

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8bzJi5f9OpTyjdrlSLA57A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">LangChain v1 namespace: what stayed in langchain and what moved to langchain-classic <span>— Vectle</span></a>