Open-Source Wikis

/

LangChain

/

Packages

langchain-ai/langchain

Packages

The langchain-ai/langchain monorepo holds 21 independently-versioned Python packages. They split along two axes: layer (core abstractions vs implementation vs integrations) and lifecycle (active vs maintenance).

Package Path Role Status
langchain-core libs/core/ Base abstractions: Runnable, messages, language models, tools, prompts active (details)
langchain libs/langchain_v1/ The new langchain package: create_agent, middleware, init_chat_model active (details)
langchain-classic libs/langchain/ Legacy chains, agents, retrievers, evaluation, indexing maintenance (details)
langchain-text-splitters libs/text-splitters/ Document chunkers (text, code, HTML, JSON, Markdown, …) active (details)
langchain-tests libs/standard-tests/ Shared test base classes for partners active (details)
langchain-model-profiles libs/model-profiles/ CLI + data for model capability profiles active (details)
15 partner packages libs/partners/<provider>/ Provider integrations (OpenAI, Anthropic, …) active (details)

Layering

graph TD
    USER[User application]
    LV1["langchain (libs/langchain_v1/)"]
    LCC["langchain-classic (libs/langchain/)"]
    PARTNERS["partners/* (libs/partners/*)"]
    CORE["langchain-core (libs/core/)"]
    SPLIT["langchain-text-splitters"]
    PROF["langchain-model-profiles"]
    TESTS["langchain-tests"]

    USER --> LV1
    USER --> LCC
    USER --> PARTNERS
    USER --> SPLIT
    LV1 --> CORE
    LCC --> CORE
    PARTNERS --> CORE
    PARTNERS -.uses for capability data.-> PROF
    PARTNERS -.test base classes.-> TESTS
    SPLIT --> CORE

Why so many packages?

Three forces drive the split:

  1. Dependency hygiene. langchain-core has only a handful of runtime dependencies (pydantic, tenacity, langsmith, jsonpatch, PyYAML, typing-extensions, packaging, uuid-utils, langchain-protocol). A user who installs only langchain-openai and langchain-core doesn't get the entire ecosystem's dependency tree.

  2. Independent release cadence. Each partner can ship as fast as the upstream provider releases features. langchain-openai typically ships within hours of OpenAI announcing new model support, without waiting for a full langchain release.

  3. Versioning isolation. langchain-core==1.3.x is API-stable for downstream consumers. Breaking changes happen at major version boundaries with deprecation warnings shipped in advance. Partner packages can independently signal their compatibility ranges via pyproject.toml.

Workspace plumbing

Every package has:

  • A pyproject.toml declaring hatchling as the build backend.
  • A uv.lock for reproducible local installs.
  • A Makefile with test, lint, format targets (and integration variants).
  • A tests/ directory split into unit_tests/ and integration_tests/.
  • A [tool.uv.sources] section pointing to sibling packages with editable = true.

Cross-package edits propagate immediately because of the editable installs — there's no need to reinstall after a code change.

See also

  • Architecture — how the layers fit together
  • Partners — the 15 provider integrations in this repo
  • Primitives — the cross-cutting abstractions in langchain-core
  • Features — agents, middleware, structured output

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Packages – LangChain wiki | Factory