Doramagic Project Pack · Human Manual
langchain
The langchain-ai/langchain repository is organized as a monorepo that hosts multiple independently versioned Python packages. The root README.md describes LangChain as "a framework for bui...
Repository Structure and Package Layout
Related topics: Core Abstractions and the Runnable Interface (LCEL), Building Modern Agents: Factory, Middleware, and Tool Execution, Integrations, Text Splitters, and Classic LangChain
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Core Abstractions and the Runnable Interface (LCEL), Building Modern Agents: Factory, Middleware, and Tool Execution, Integrations, Text Splitters, and Classic LangChain
Repository Structure and Package Layout
Overview
The langchain-ai/langchain repository is organized as a monorepo that hosts multiple independently versioned Python packages. The root README.md describes LangChain as "a framework for building agents and LLM-powered applications" and positions it within a larger ecosystem that includes LangGraph for workflow orchestration, LangSmith for debugging and deployment, and a JS/TS sibling.
The primary development surface lives under the libs/ directory, which is documented in libs/README.md. That index states that "most integrations have been moved to their own repositories for improved versioning, dependency management, collaboration, and testing" — a deliberate architectural decision that splits the codebase into focused, independently releasable units (Source: libs/README.md:1-15).
High-Level Layout
The repository follows a clear separation between first-party core libraries and third-party partner integrations:
graph TD
A[langchain-ai/langchain monorepo] --> B[libs/]
B --> C[core<br/>langchain-core]
B --> D[langchain_v1<br/>main v1 package]
B --> E[langchain<br/>langchain_classic]
B --> F[text-splitters<br/>langchain-text-splitters]
B --> G[model-profiles<br/>langchain-model-profiles]
B --> H[partners/]
H --> H1[openai]
H --> H2[anthropic]
H --> H3[ollama]
H --> H4[deepseek]
H --> H5[xai]
H --> H6[chroma]
H --> H7[qdrant]
H --> H8[and more...]Each leaf directory under libs/ ships as its own PyPI package and ships its own README.md, pyproject.toml, and test suite.
Core Libraries
`langchain-core`
libs/core/README.md states that "LangChain Core contains the base abstractions that power the LangChain ecosystem. These abstractions are designed to be as modular and simple as possible." It defines interfaces that provider packages implement, enabling model and integration portability across the rest of the ecosystem. The README is explicit that "the LangChain ecosystem is built on top of langchain-core" — every other package depends on it (Source: libs/core/README.md:1-30). The published package name is langchain-core and it can be installed in isolation via pip install langchain-core.
`langchain` (v1) and `langchain_classic`
Two distinct first-party packages live side-by-side in this monorepo:
| Package Directory | PyPI Name | Purpose |
|---|---|---|
libs/langchain_v1/ | langchain | The modern v1 surface used by current pip install langchain users |
libs/langchain/ | langchain_classic | Legacy chains, agent toolkits, and deprecated functionality |
libs/langchain_v1/README.md describes the v1 package and points to the canonical documentation entry point at docs.langchain.com. Meanwhile, libs/langchain/README.md explicitly warns that this directory "contains chains, langchain-community re-exports, indexing API, deprecated functionality, and more" and that "in most cases, you should be using the main langchain package" (Source: libs/langchain/README.md:1-12). This split lets the project evolve the public API while preserving the legacy code under a clearly named import path.
Inside libs/langchain/, the actual module is namespaced as langchain_classic. For example, the ReAct agent implementation lives at libs/langchain/langchain_classic/agents/react/base.py and is decorated with @deprecated("0.1.0", ..., removal="2.0.0") — concrete evidence that this subtree is the legacy surface. The API chain base lives at libs/langchain/langchain_classic/chains/api/base.py, and agent toolkits are organized under libs/langchain/langchain_classic/agents/agent_toolkits/ (Source: libs/langchain/langchain_classic/agents/agent_toolkits/__init__.py:1-15).
Supporting Libraries
Two auxiliary first-party packages are checked into the same monorepo:
langchain-text-splitters— described in libs/text-splitters/README.md as containing "utilities for splitting into chunks a wide variety of text documents" (Source: libs/text-splitters/README.md:1-15).langchain-model-profiles— libs/model-profiles/README.md describes this as "a CLI tool for fetching and updating model capability data from models.dev for use in LangChain integration packages." The README carries an explicitWARNINGthat the API is subject to change (Source: libs/model-profiles/README.md:1-12).
Partner Integrations
The libs/partners/ directory is reserved for first-party-vendored integrations with model providers, vector stores, and other services. libs/README.md lists representative packages such as langchain-openai, langchain-anthropic, langchain-ollama, langchain-deepseek, and langchain-xai, and notes that providers such as Google and AWS "maintain their own LangChain integration packages" in separate repositories (Source: libs/README.md:1-15).
Each partner package follows the same self-contained layout. For example:
- libs/partners/xai/README.md is the README for the xAI Grok integration, published as
langchain-xai. - libs/partners/chroma/README.md ships the Chroma vector store integration as
langchain-chroma. - libs/partners/qdrant/README.md ships the Qdrant vector store integration as
langchain-qdrant.
All three READMEs share an identical structure: PyPI version/license badges, a Quick Install block with pip install <package>, and a pointer to the LangChain integrations docs. This consistency lets maintainers apply the same contribution workflow to every partner package.
Practical Implications for Users
Understanding the layout explains several behaviors reported in the community:
- Import paths differ by package. Code in
langchain_classicmust be imported asfrom langchain_classic.agents.react.base import ReActDocstoreAgenteven though the package directory islibs/langchain/. This is the source of confusion in issues where users expectfrom langchain.agents import ...to resolve to the legacy agent code. - Deprecated surfaces live in
langchain_classic. The@deprecateddecorator onReActDocstoreAgent(Source: libs/langchain/langchain_classic/agents/react/base.py:1-40) signals that v1 users should migrate to LangGraph-based agent construction. - Partner packages are versioned independently. A change to
langchain-openaidoes not require alangchain-corerelease, which is why the dependency floor for individual partners (e.g.,langchain-deepseek) is tracked separately and updated via targeted PRs such as "chore: bump langchain-core from 1.3.2 to 1.3.3 in /libs/partners/deepseek".
See Also
- langchain-core abstractions and base interfaces
- langchain v1 package overview
- langchain_classic legacy surface
- Partner integrations directory
- Contributing Guide
Source: https://github.com/langchain-ai/langchain / Human Manual
Core Abstractions and the Runnable Interface (LCEL)
Related topics: Repository Structure and Package Layout, Building Modern Agents: Factory, Middleware, and Tool Execution
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Repository Structure and Package Layout, Building Modern Agents: Factory, Middleware, and Tool Execution
Core Abstractions and the Runnable Interface (LCEL)
Overview and Purpose
LangChain is described as a framework for building agents and LLM-powered applications, designed to compose interoperable components and third-party integrations while letting teams choose the level of abstraction that matches their needs — from high-level chains to low-level building blocks. Source: README.md:1-13.
The LangChain Expression Language (LCEL) and the underlying Runnable interface are the unifying primitives that make this composition possible. Every major component in the modern LangChain stack — chat models, prompts, output parsers, retrievers, and tools — implements the same Runnable protocol. This lets users declare pipelines declaratively using the pipe operator (|) and call them with a uniform set of methods (invoke, stream, batch, and their async variants). The Quickstart illustrates the surface area in just two lines:
from langchain.chat_models import init_chat_model
model = init_chat_model("openai:gpt-5.4")
result = model.invoke("Hello, world!")
Source: README.md:31-37.
From `Chain` to `Runnable`: The Legacy Bridge
Prior to LCEL, the canonical way to compose components was to subclass the abstract Chain class defined in langchain_classic.chains.base. Concrete chains such as APIChain exposed synchronous and asynchronous execution through _call, _acall, and higher-level run/arun helpers. Source: libs/langchain/langchain_classic/chains/api/base.py:1-9.
The classic agent stack followed the same pattern. ReActDocstoreAgent, ConversationalAgent, and ZeroShotAgent (MRKL) each subclassed Agent and constructed an internal LLMChain that combined a prompt, an LLM, and an AgentOutputParser. Source: libs/langchain/langchain_classic/agents/react/base.py:1-44, libs/langchain/langchain_classic/agents/conversational/base.py:1-39, libs/langchain/langchain_classic/agents/mrkl/base.py:1-70.
These classes are now shipped under the langchain_classic namespace and are explicitly deprecated in favor of LCEL. The ReActDocstoreAgent definition carries a deprecation marker pointing to LangGraph and LCEL as the modern replacement. Source: libs/langchain/langchain_classic/agents/react/base.py:1-44.
The reason for the migration is operational, not merely cosmetic. Classic chains:
| Concern | Classic Chain | LCEL Runnable | ||
|---|---|---|---|---|
| Sync execution | _call(input) | invoke(input) | ||
| Async execution | _acall(input) | ainvoke(input) | ||
| Streaming | Custom, often missing | First-class stream / astream | ||
| Batching | Custom loops | batch / abatch | ||
| Composition | Subclass / override | `prompt | llm | parser` |
| Observability | Manual callback wiring | Uniform callback protocol |
This uniformity is what enables the "flexible abstraction layers" promise called out at the top of the repository README — the same chain definition can be invoked once, streamed token-by-token, or batched across a dataset without rewriting application logic. Source: README.md:1-13, libs/langchain/langchain_classic/chains/api/base.py:1-9.
Component Roles Inside an LCEL Pipeline
An LCEL expression typically composes three or four primitive roles, each of which is a Runnable.
1. Chat Models
The init_chat_model factory returns a provider-agnostic BaseChatModel instance that already implements the Runnable interface. The Quickstart example shows the canonical call surface (model.invoke(...)) and is the entry point the documentation recommends for new projects. Source: README.md:31-37.
2. Prompts
Prompt templates — whether ChatPromptTemplate or PromptTemplate — are themselves Runnables, which is what makes the prompt | llm composition type-check and execute without glue code. Vectorstore-backed agent prompts and trajectory-eval prompts in the classic package demonstrate the kind of string templates that pair naturally with the Runnable protocol. Source: libs/langchain/langchain_classic/agents/agent_toolkits/vectorstore/prompt.py:1-10, libs/langchain/langchain_classic/evaluation/agents/trajectory_eval_prompt.py:1-12.
3. Output Parsers
Output parsers translate raw model strings into structured values. The classic ConvoOutputParser shows the typical shape: it accepts model text, attempts to parse JSON out of markdown, and returns either an AgentAction (continue) or AgentFinish (stop). Source: libs/langchain/langchain_classic/agents/conversational_chat/output_parser.py:1-9.
flowchart LR
Input[User Input] --> Prompt[PromptTemplate]
Prompt --> Model[ChatModel]
Model --> Parser[OutputParser]
Parser --> Output[Structured Result]
Output -.stream.-> Tokens[Token Stream]
Output -.batch.-> Results[Batch Results]4. Retrievers and Tools
Retriever-backed agents wrap a vector store behind a Tool, and the agent loop is implemented as a Runnable that invokes tools until a finish action is produced. The classic ReActDocstoreAgent hard-codes a Lookup / Search tool pair to demonstrate this pattern. Source: libs/langchain/langchain_classic/agents/react/base.py:1-44.
Community Considerations and Failure Modes
Because LCEL is the recommended surface for streaming and structured output, several recurring community issues originate in the boundary between the Runnable protocol and parsers or executors that predate it:
- Streaming blocked by structured output — community reports (#34818) describe cases where adding a
with_structured_outputstep terminates token streaming. The Runnable interface supports streaming from any step in the chain, so wrapping the LLM in a parser typically requires a streaming-aware parser or a downstreamtransformstep to preserve tokens. Source: README.md:31-37. - Output parsing failures — long-standing reports such as "Could not parse LLM output" (#1358) trace back to the same surface. LCEL's
RunnableWithFallbacksis the documented escape hatch: attach a fallback parser or a default value so the chain does not raise on malformed model output. Source: libs/langchain/langchain_classic/agents/conversational_chat/output_parser.py:1-9. - Agent iteration limits — issues like #16263 (
AgentExecutorwithearly_stopping_method="generate") reflect behavior of the legacyAgentExecutorrather than LCEL. New agent code should target LangGraph, which exposes the same Runnable interface for each node. Source: libs/langchain/langchain_classic/agents/mrkl/base.py:1-70, README.md:1-13.
The langchain-tests standard test suite under libs/standard-tests/langchain_tests/utils/ provides the conformance fixtures that integration packages use to verify their Runnables behave correctly across sync, async, streaming, and batch modes — a useful reference when diagnosing whether a custom component is breaking the LCEL contract. Source: libs/standard-tests/langchain_tests/utils/__init__.py:1-2.
See Also
- LangChain Quickstart and ecosystem overview: README.md
- Library split and partner packages: libs/README.md
- Legacy
Chainbase class: libs/langchain/langchain_classic/chains/api/base.py - Legacy agent definitions (deprecated): libs/langchain/langchain_classic/agents/
- Conformance tests for Runnables: libs/standard-tests/langchain_tests/utils/
Source: https://github.com/langchain-ai/langchain / Human Manual
Building Modern Agents: Factory, Middleware, and Tool Execution
Related topics: Core Abstractions and the Runnable Interface (LCEL), Integrations, Text Splitters, and Classic LangChain
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Core Abstractions and the Runnable Interface (LCEL), Integrations, Text Splitters, and Classic LangChain
Building Modern Agents: Factory, Middleware, and Tool Execution
LangChain v1 introduces a redesigned agent construction model centered on the create_agent factory, a composable middleware pipeline, and a structured tool execution layer. This page explains how these pieces fit together and how they relate to the now-deprecated AgentExecutor-based classic agents.
1. The Modern Agent Factory
The top-level entry point is the create_agent factory exported from the langchain package. According to the project README, the factory "provides a more flexible agent factory with middleware support, structured output, and integration with LangGraph." Source: README.md:Quickstart
create_agent replaces the legacy initialize_agent function. The classic initializer accepts a tool list, an LLM, an agent type string (e.g. AgentType.ZERO_SHOT_REACT_DESCRIPTION), and optional agent_kwargs, then constructs an AgentExecutor. Source: libs/langchain/langchain_classic/agents/initialize.py:initialize_agent() docstring
The deprecation notice inside that same docstring directs users to the new factory:
See Migrating to langchain v1 and Migrating from AgentExecutor.
Source: libs/langchain/langchain_classic/agents/initialize.py:docstring
A typical modern invocation looks like the README quickstart pattern:
from langchain.agents import create_agent
from langchain.chat_models import init_chat_model
model = init_chat_model("openai:gpt-5.4")
agent = create_agent(model, tools=[...])
result = agent.invoke({"messages": [...]})
Source: README.md:Quickstart
Factory vs. `AgentExecutor`
| Concern | Classic AgentExecutor | Modern create_agent |
|---|---|---|
| Package location | langchain_classic.agents | langchain.agents |
| Composition model | Hardcoded agent type + executor loop | Middleware pipeline + LangGraph runtime |
| Structured output | Parser-specific | First-class via structured_output.py |
| Subagents | Not supported | Transformed via _subagent_transformer.py |
| Status | Deprecated, removal in 2.0 | Current |
Source: libs/langchain/langchain_classic/agents/initialize.py:docstring, libs/langchain/langchain_classic/agents/__init__.py:exports
2. The Middleware System
Middleware is the defining extension point of the modern agent. The package langchain.agents.middleware exposes the types and execution primitives that make the agent loop composable. Source: libs/langchain_v1/langchain/agents/middleware/__init__.py
The middleware module is organized into three cooperating files:
types.pydefines theMiddlewareprotocol and hook types (e.g.before_model,after_model,wrap_tool_call) that let developers intercept and augment the agent lifecycle._execution.pycontains the runtime that invokes middleware in order, including tool call execution and result handling.__init__.pyre-exports the public surface forfrom langchain.agents.middleware import ...consumers.
Source: libs/langchain_v1/langchain/agents/middleware/types.py, libs/langchain_v1/langchain/agents/middleware/_execution.py
The factory wires these pieces together: factory.py builds the LangGraph state graph, then layers middleware hooks around model calls and tool calls. Subagent definitions are converted into middleware nodes by _subagent_transformer.py, allowing a parent agent to delegate to child agents through the same hook pipeline. Source: libs/langchain_v1/langchain/agents/factory.py, libs/langchain_v1/langchain/agents/_subagent_transformer.py
3. Structured Output and Tool Execution
Structured output is handled in a dedicated module so it can short-circuit the loop when the model has already produced a final typed value. The structured_output.py module integrates with the middleware pipeline to enforce schema validation before returning an AgentFinish-equivalent state. Source: libs/langchain_v1/langchain/agents/structured_output.py
Tool execution flows through middleware hooks. The classic agents show the prior generation of output parsing that the modern system generalizes:
JSONAgentOutputParser.parse()expects{"action": "...", "action_input": ...}and returnsAgentActionorAgentFinish. Source: libs/langchain/langchain_classic/agents/output_parsers/json.py:JSONAgentOutputParserConvoOutputParser.parse()parses the same JSON shape from conversational prompts. Source: libs/langchain/langchain_classic/agents/conversational_chat/output_parser.py:ConvoOutputParserXMLAgentemits<tool>...</tool><tool_input>...</tool_input>blocks and usesstop_sequenceto avoid hallucinations. Source: libs/langchain/langchain_classic/agents/xml/base.py:create_xml_agent
The modern factory unifies these into a single tool-call protocol by relying on chat-model-native tool calling and a single execution path in _execution.py. Source: libs/langchain_v1/langchain/agents/middleware/_execution.py
4. Migration and Common Failure Modes
Community issues make the migration pressure concrete. Issue #16263 documents that early_stopping_method="generate" is no longer supported on AgentExecutor after the iteration limit. Source: GitHub issue #16263
Other reported pain points that the modern factory is designed to address:
- Importing
langchain.agentsin classic code can interact poorly with Pydantic models onmain(#37835). convert_to_openai_messagesmutates caller input in place (#37894) — a class of bug the new state-graph runtime avoids.- Streaming is blocked by structured output in the legacy path (#34818) — a limitation
structured_output.pyis designed to relax.
Source: GitHub issues #37835, #37894, #34818
The recommended migration path is therefore: keep tool definitions identical (the @tool decorator and create_retriever_tool are unchanged), then replace initialize_agent(..., agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION) with create_agent(model, tools=...) and add middleware for any custom hook logic that the classic AgentExecutor exposed through callbacks. Source: README.md:Quickstart, libs/langchain/langchain_classic/agents/initialize.py:docstring
See Also
- README.md — Quickstart and ecosystem overview
- libs/langchain/langchain_classic/agents/initialize.py —
initialize_agent(deprecated) and migration pointers - LangGraph overview — runtime that backs
create_agent - Migrating to langchain v1 — official migration guide
Source: https://github.com/langchain-ai/langchain / Human Manual
Integrations, Text Splitters, and Classic LangChain
Related topics: Repository Structure and Package Layout, Core Abstractions and the Runnable Interface (LCEL), Building Modern Agents: Factory, Middleware, and Tool Execution
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Continue reading this section for the full explanation and source context.
Related Pages
Related topics: Repository Structure and Package Layout, Core Abstractions and the Runnable Interface (LCEL), Building Modern Agents: Factory, Middleware, and Tool Execution
Integrations, Text Splitters, and Classic LangChain
Overview
The langchain-ai/langchain monorepo is a multi-package framework for building agents and LLM-powered applications. Beyond the modern, slim langchain package documented in the root README.md, the repository ships a wider ecosystem: dedicated integration partner packages for chat and embedding providers, a standalone text-splitters library, a model-profiles CLI, a standard-tests harness, and a backward-compatibility namespace called langchain_classic that preserves older chains, langchain-community re-exports, indexing, and deprecated agent abstractions (libs/langchain/README.md).
The high-level role of this layered layout is to let users pick the abstraction level that matches their needs — from full agent frameworks such as Deep Agents and LangGraph mentioned in the root README, down to individual toolkits, splitters, and classic primitives that can still be used standalone.
Integration Packages
Third-party and first-party integrations live as separate, independently versioned packages under libs/partners/ and libs/community/. As stated in libs/README.md, "Most integrations have been moved to their own repositories for improved versioning, dependency management, collaboration, and testing," and many third-party providers maintain their own LangChain integration packages.
The repository ships both thin wrappers and heavier partner libraries. Some representative examples:
| Package | Type | Purpose |
|---|---|---|
langchain-openai | Partner | OpenAI chat & embedding models (in libs/partners/openai/) |
langchain-anthropic | Partner | Anthropic Claude chat models (in libs/partners/anthropic/) |
langchain-ollama | Partner | Local Ollama model serving (in libs/partners/ollama/) |
langchain-deepseek | Partner | DeepSeek chat models (latest release 1.1.0) |
langchain-xai | Partner | xAI Grok chat models (libs/partners/xai/README.md) |
langchain-perplexity | Community | Perplexity chat (referenced in community bug reports) |
langchain-model-profiles is a CLI tool — currently flagged as in development — that fetches model capability data (context window, modalities, tool calling, structured output) from models.dev and updates the .profile field on LangChain chat models (libs/model-profiles/README.md). Companion infrastructure includes langchain-tests, which exposes shared test utilities for verifying that partner integrations conform to the standard chat-model and embeddings interfaces (libs/standard-tests/langchain_tests/utils/__init__.py).
Agent Toolkits
The langchain_classic.agents.agent_toolkits namespace collects integrations with external resources — local and remote file systems, APIs, and databases — that can be attached to agents. The package's __init__ re-exports toolkit factories such as create_conversational_retrieval_agent, create_vectorstore_agent, and create_vectorstore_router_agent, and it explicitly warns developers to "inspect the capabilities and permissions of the tools that underlie the given agent toolkit" before deploying (libs/langchain/langchain_classic/agents/agent_toolkits/__init__.py). Sub-modules follow a one-file-per-provider pattern, e.g., the GitHub toolkit is scaffolded under agents/agent_toolkits/github/ (libs/langchain/langchain_classic/agents/agent_toolkits/github/__init__.py).
Text Splitters
The langchain-text-splitters package is shipped as its own publishable unit. Per libs/text-splitters/README.md, it "contains utilities for splitting into chunks a wide variety of text documents" and is installed with pip install langchain-text-splitters. It is consumed by retrieval pipelines, indexing APIs, and the legacy langchain_classic chains, and its API reference lives at reference.langchain.com/python/langchain_text_splitters/.
Classic LangChain (`langchain_classic`)
langchain_classic is the backward-compatibility namespace that houses older chains, langchain-community re-exports, the indexing API, and deprecated agent abstractions. The package README is explicit that "in most cases, you should be using the main langchain package" (libs/langchain/README.md).
Deprecated Agent Executors
Several agent classes are now marked deprecated and slated for removal in 2.0.0. The deprecation message points users to create_agent from the modern langchain package and the migration guide titled *Migrating to langchain v1* (libs/langchain/langchain_classic/agents/initialize.py). Concrete examples include:
ReActDocstoreAgent— implements the ReAct paper (arxiv:2210.03629) and requiresLookupandSearchtools by default (libs/langchain/langchain_classic/agents/react/base.py).ConversationalAgent— holds a conversation while invoking tools, parses JSON-styleaction/action_inputoutput (libs/langchain/langchain_classic/agents/conversational/base.py, libs/langchain/langchain_classic/agents/conversational_chat/output_parser.py).JSONAgentOutputParser— recognises the two canonical JSON shapes, treating{"action": "Final Answer", ...}as anAgentFinishand any other action as anAgentAction(libs/langchain/langchain_classic/agents/output_parsers/json.py).
Community pain points documented in long-running issues — such as ValueError: Could not parse LLM output: with non-OpenAI models (issue #1358), unsupported early_stopping_method="generate" in AgentExecutor (issue #16263), and streaming behaviour around structured output (issue #34818) — are concentrated in this classic agent layer and motivate the move to create_agent and LangGraph.
API & Evaluation Chains
Outside of agents, langchain_classic retains domain-specific chains. chains.api.base.APIChain builds and calls HTTP endpoints and summarises the responses; it restricts outbound traffic via a limit_to_domains allow-list extracted from URLs (libs/langchain/langchain_classic/chains/api/base.py). The news-specific flavour bundles a pre-baked NEWS_DOCS block describing the News API endpoint, parameters, and response shape (libs/langchain/langchain_classic/chains/api/news_docs.py). For evaluation, evaluation.agents.trajectory_eval_prompt provides a few-shot prompt that scores a tool-use trajectory by comparing the tools chosen against the tools available for the question (libs/langchain/langchain_classic/evaluation/agents/trajectory_eval_prompt.py).
See Also
- LangChain Overview & Ecosystem — conceptual guides for the modern
langchainpackage. - LangGraph Overview — low-level agent orchestration framework that replaces classic
AgentExecutorpatterns. - Deep Agents — higher-level agent package built on LangChain with planning, subagents, and file-system tools.
- Integration Providers Directory — full list of LangChain chat/embedding/tool integrations.
- Migrating to langchain v1 — guidance for moving off
langchain_classicagents.
Source: https://github.com/langchain-ai/langchain / Human Manual
Doramagic Pitfall Log
Source-linked risks stay visible on the manual page so the preview does not read like a recommendation.
May increase setup, validation, or first-run risk for the user.
May increase setup, validation, or first-run risk for the user.
May increase setup, validation, or first-run risk for the user.
May increase setup, validation, or first-run risk for the user.
Doramagic Pitfall Log
Found 33 structured pitfall item(s), including 8 high/blocking item(s). Top priority: Installation risk - Installation risk requires verification.
1. Installation risk: Installation risk requires verification
- Severity: high
- Finding: Project evidence flags a installation risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Recommended check: Reproduce the official install and quickstart path in an isolated environment.
- Evidence: community_evidence:github | https://github.com/langchain-ai/langchain/issues/37906
2. Installation risk: Installation risk requires verification
- Severity: high
- Finding: Project evidence flags a installation risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Recommended check: Reproduce the official install and quickstart path in an isolated environment.
- Evidence: community_evidence:github | https://github.com/langchain-ai/langchain/issues/16263
3. Installation risk: Installation risk requires verification
- Severity: high
- Finding: Project evidence flags a installation risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Recommended check: Reproduce the official install and quickstart path in an isolated environment.
- Evidence: community_evidence:github | https://github.com/langchain-ai/langchain/issues/37894
4. Configuration risk: Configuration risk requires verification
- Severity: high
- Finding: Project evidence flags a configuration risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Recommended check: Reproduce the official install and quickstart path in an isolated environment.
- Evidence: community_evidence:github | https://github.com/langchain-ai/langchain/issues/37835
5. Security or permission risk: Security or permission risk requires verification
- Severity: high
- Finding: Developers should check this security_permissions risk before relying on the project: Add
BackendIntegrationTestsfor Deep AgentsBackendProtocolimplementations - User impact: Developers may expose sensitive permissions or credentials: Add
BackendIntegrationTestsfor Deep AgentsBackendProtocolimplementations - Recommended check: Before packaging this project, run the relevant install/config/quickstart check for: Add
BackendIntegrationTestsfor Deep AgentsBackendProtocolimplementations. Context: Observed when using python - Evidence: failure_mode_cluster:github_issue | https://github.com/langchain-ai/langchain/issues/37905
6. Security or permission risk: Security or permission risk requires verification
- Severity: high
- Finding: Developers should check this security_permissions risk before relying on the project: Feature: Memory write validation hooks to prevent prompt injection persistence (OWASP ASI-06)
- User impact: Developers may expose sensitive permissions or credentials: Feature: Memory write validation hooks to prevent prompt injection persistence (OWASP ASI-06)
- Recommended check: Before packaging this project, run the relevant install/config/quickstart check for: Feature: Memory write validation hooks to prevent prompt injection persistence (OWASP ASI-06). Context: Observed when using python
- Evidence: failure_mode_cluster:github_issue | https://github.com/langchain-ai/langchain/issues/37906
7. Security or permission risk: Security or permission risk requires verification
- Severity: high
- Finding: Project evidence flags a security or permission risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Recommended check: Reproduce the official install and quickstart path in an isolated environment.
- Evidence: community_evidence:github | https://github.com/langchain-ai/langchain/issues/36306
8. Security or permission risk: Security or permission risk requires verification
- Severity: high
- Finding: Project evidence flags a security or permission risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Recommended check: Reproduce the official install and quickstart path in an isolated environment.
- Evidence: community_evidence:github | https://github.com/langchain-ai/langchain/issues/34818
9. Installation risk: Installation risk requires verification
- Severity: medium
- Finding: Developers should check this installation risk before relying on the project: Unsupported early_stopping_method="generate" in AgentExecutor after reaching iteration limit
- User impact: Developers may fail before the first successful local run: Unsupported early_stopping_method="generate" in AgentExecutor after reaching iteration limit
- Recommended check: Before packaging this project, run the relevant install/config/quickstart check for: Unsupported early_stopping_method="generate" in AgentExecutor after reaching iteration limit. Context: Observed when using python
- Evidence: failure_mode_cluster:github_issue | https://github.com/langchain-ai/langchain/issues/16263
10. Installation risk: Installation risk requires verification
- Severity: medium
- Finding: Developers should check this installation risk before relying on the project: convert_to_openai_messages mutates the caller's input message in place
- User impact: Developers may fail before the first successful local run: convert_to_openai_messages mutates the caller's input message in place
- Recommended check: Before packaging this project, run the relevant install/config/quickstart check for: convert_to_openai_messages mutates the caller's input message in place. Context: Observed when using python, macos
- Evidence: failure_mode_cluster:github_issue | https://github.com/langchain-ai/langchain/issues/37894
11. Installation risk: Installation risk requires verification
- Severity: medium
- Finding: Developers should check this installation risk before relying on the project: langchain-deepseek==1.1.0
- User impact: Upgrade or migration may change expected behavior: langchain-deepseek==1.1.0
- Recommended check: Before packaging this project, run the relevant install/config/quickstart check for: langchain-deepseek==1.1.0. Context: Observed when using python
- Evidence: failure_mode_cluster:github_release | https://github.com/langchain-ai/langchain/releases/tag/langchain-deepseek%3D%3D1.1.0
12. Installation risk: Installation risk requires verification
- Severity: medium
- Finding: Developers should check this installation risk before relying on the project: perplexity: _convert_message_to_dict drops AIMessage.tool_calls and raises on ToolMessage
- User impact: Developers may fail before the first successful local run: perplexity: _convert_message_to_dict drops AIMessage.tool_calls and raises on ToolMessage
- Recommended check: Before packaging this project, run the relevant install/config/quickstart check for: perplexity: _convert_message_to_dict drops AIMessage.tool_calls and raises on ToolMessage. Context: Observed when using python, macos
- Evidence: failure_mode_cluster:github_issue | https://github.com/langchain-ai/langchain/issues/37912
Source: Doramagic discovery, validation, and Project Pack records
Community Discussion Evidence
These external discussion links are review inputs, not standalone proof that the project is production-ready.
Count of project-level external discussion links exposed on this manual page.
Open the linked issues or discussions before treating the pack as ready for your environment.
Community Discussion Evidence
Doramagic exposes project-level community discussion separately from official documentation. Review these links before using langchain with real data or production workflows.
- Unsupported early_stopping_method="generate" in AgentExecutor after reac - github / github_issue
- Streaming blocked by Structured Output - github / github_issue
- Importing langchain.agents breaks BaseLLM class construction on Pydantic - github / github_issue
- perplexity: _convert_message_to_dict drops AIMessage.tool_calls and rais - github / github_issue
- perplexity: _convert_message_to_dict drops AIMessage.tool_calls and rais - github / github_issue
- Add Agent Magnet as a memory integration for LangChain agents - github / github_issue
- Add Agent Magnet as a memory integration for LangChain agents - github / github_issue
- Feature: Memory write validation hooks to prevent prompt injection persi - github / github_issue
- Add
BackendIntegrationTestsfor Deep AgentsBackendProtocolimplemen - github / github_issue - convert_to_openai_messages mutates the caller's input message in place - github / github_issue
- Feature Request: Payment primitive integration — x402 payment layer for - github / github_issue
- [[Integration Proposal] UnisonX402Retriever — TSV x402 retriever with A2A](https://github.com/langchain-ai/langchain/issues/37900) - github / github_issue
Source: Project Pack community evidence and pitfall evidence