LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Browser
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
  • Tools
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Compat
  • Event
  • Llms
  • Openai Completions Stream
  • Profile
  • Stream
  • Structured Output
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Testing
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Gateway
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Uuid
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
BrowserUniversalHubNodeLoadSerializableEncoder BackedFile SystemIn MemoryTools
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsCompatEventLlmsOpenai Completions StreamProfileStreamStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryTestingToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingGatewayHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesUuidVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScriptlangchain

langchain

Description

Classes

Class

AIMessage

LangChain Messages

Class

AIMessageChunk

Represents a chunk of an AI message, which can be concatenated with other AI message chunks.

Class

BaseMessage

Base class for all types of messages in a conversation. It includes properties like content, name, and additional_kwargs. It also includes methods like toDict() and _getType().

Class

BaseMessageChunk

Represents a chunk of a message, which can be concatenated with other message chunks. It includes a method _merge_kwargs_dict() for merging additional keyword arguments from another `BaseMessageChun

Class

ClearToolUsesEdit

Strategy for clearing tool outputs when token limits are exceeded.

This strategy mirrors Anthropic's clear_tool_uses_20250919 behavior by replacing older tool results with a placeholder text when t

Class

Document

Interface for interacting with a document.

Class

DynamicStructuredTool

A tool that can be created dynamically from a function, name, and description, designed to work with structured data. It extends the StructuredTool class and overrides the _call method to execute the

Class

DynamicTool

A tool that can be created dynamically from a function, name, and description.

Class

FakeToolCallingModel

Fake chat model for testing tool calling functionality

Class

HumanMessage

Represents a human message in a conversation.

Class

HumanMessageChunk

Represents a chunk of a human message, which can be concatenated with other human message chunks.

Class

InMemoryStore

In-memory implementation of the BaseStore using a dictionary. Used for storing key-value pairs in memory.

Class

MiddlewareError

Error thrown when a middleware fails.

Use MiddlewareError.wrap() to create instances. The constructor is private to ensure that GraphBubbleUp errors (like GraphInterrupt) are never wrapped.

Class

MultipleStructuredOutputsError

Raised when model returns multiple structured output tool calls when only one is expected.

Class

MultipleToolsBoundError

Class

PIIDetectionError

Error thrown when PII is detected and strategy is 'block'

Class

ProviderStrategy

Class

StructuredOutputParsingError

Raised when structured output tool call arguments fail to parse according to the schema.

Class

StructuredTool

Base class for Tools that accept input of any shape defined by a Zod schema.

Class

SystemMessage

Represents a system message in a conversation.

Class

SystemMessageChunk

Represents a chunk of a system message, which can be concatenated with other system message chunks.

Class

Tool

Base class for Tools that accept input as a string.

Class

ToolCallLimitExceededError

Exception raised when tool call limits are exceeded.

This exception is raised when the configured exit behavior is 'error' and either the thread or run tool call limit has been exceeded.

Class

ToolInvocationError

Raised when a tool call is throwing an error.

Class

ToolMessage

Represents a tool message in a conversation.

Class

ToolMessageChunk

Represents a chunk of a tool message, which can be concatenated with other tool message chunks.

Class

ToolStrategy

Information for tracking structured output tool metadata. This contains all necessary information to handle structured responses generated via tool calls, including the original schema, its type class

Class

AIMessage

LangChain Messages

Class

AIMessageChunk

Represents a chunk of an AI message, which can be concatenated with other AI message chunks.

Class

BaseMessage

Base class for all types of messages in a conversation. It includes properties like content, name, and additional_kwargs. It also includes methods like toDict() and _getType().

Class

BaseMessageChunk

Represents a chunk of a message, which can be concatenated with other message chunks. It includes a method _merge_kwargs_dict() for merging additional keyword arguments from another `BaseMessageChun

Class

ClearToolUsesEdit

Strategy for clearing tool outputs when token limits are exceeded.

This strategy mirrors Anthropic's clear_tool_uses_20250919 behavior by replacing older tool results with a placeholder text when t

Class

Document

Interface for interacting with a document.

Class

DynamicStructuredTool

A tool that can be created dynamically from a function, name, and description, designed to work with structured data. It extends the StructuredTool class and overrides the _call method to execute the

Class

DynamicTool

A tool that can be created dynamically from a function, name, and description.

Class

FakeToolCallingModel

Fake chat model for testing tool calling functionality

Class

HumanMessage

Represents a human message in a conversation.

Class

HumanMessageChunk

Represents a chunk of a human message, which can be concatenated with other human message chunks.

Class

InMemoryStore

In-memory implementation of the BaseStore using a dictionary. Used for storing key-value pairs in memory.

Class

MiddlewareError

Error thrown when a middleware fails.

Use MiddlewareError.wrap() to create instances. The constructor is private to ensure that GraphBubbleUp errors (like GraphInterrupt) are never wrapped.

Class

MultipleStructuredOutputsError

Raised when model returns multiple structured output tool calls when only one is expected.

Class

MultipleToolsBoundError

Class

PIIDetectionError

Error thrown when PII is detected and strategy is 'block'

Class

ProviderStrategy

Class

StructuredOutputParsingError

Raised when structured output tool call arguments fail to parse according to the schema.

Class

StructuredTool

Base class for Tools that accept input of any shape defined by a Zod schema.

Class

SystemMessage

Represents a system message in a conversation.

Class

SystemMessageChunk

Represents a chunk of a system message, which can be concatenated with other system message chunks.

Class

Tool

Base class for Tools that accept input as a string.

Class

ToolCallLimitExceededError

Exception raised when tool call limits are exceeded.

This exception is raised when the configured exit behavior is 'error' and either the thread or run tool call limit has been exceeded.

Class

ToolInvocationError

Raised when a tool call is throwing an error.

Class

ToolMessage

Represents a tool message in a conversation.

Class

ToolMessageChunk

Represents a chunk of a tool message, which can be concatenated with other tool message chunks.

Class

ToolStrategy

Information for tracking structured output tool metadata. This contains all necessary information to handle structured responses generated via tool calls, including the original schema, its type class

Class

Serializable

Class

EncoderBackedStore

Class that provides a layer of abstraction over the base storage, allowing for the encoding and decoding of keys and values. It extends the BaseStore class.

Class

LocalFileStore

File system implementation of the BaseStore using a dictionary. Used for storing key-value pairs in the file system.

Class

InMemoryStore

In-memory implementation of the BaseStore using a dictionary. Used for storing key-value pairs in memory.

Functions

Function

anthropicPromptCachingMiddleware

Creates a prompt caching middleware for Anthropic models to optimize API usage.

This middleware automatically adds cache control headers to the last messages when using Anthropic models, enabling the

Function

applyStrategy

Apply strategy to content based on matches

Function

bedrockPromptCachingMiddleware

Creates a prompt caching middleware for AWS Bedrock Converse models to optimize API usage.

This middleware automatically enables Bedrock's prompt caching when using AWS Bedrock Converse models. This

Function

context

LangChain utilities

Function

contextEditingMiddleware

Middleware that automatically prunes tool results to manage context size.

This middleware applies a sequence of edits when the total input token count exceeds configured thresholds. By default, it us

Function

countTokensApproximately

Default token counter that approximates based on character count.

If tools are provided, the token count also includes stringified tool schemas.

Function

createAgent

Creates a production-ready ReAct (Reasoning + Acting) agent that combines language models with tools and middleware to create systems that can reason about tasks, decide which tools to use, and iterat

Function

createMiddleware

Creates a middleware instance with automatic schema inference.

Function

createSubagentTransformer

Creates a native transformer that surfaces nested named agents on run.subagents.

It watches tasks events to record each namespace's lc_agent_name (set by createAgent({ name })) and the trigge

Function

createToolCallTransformer

Creates a native transformer that correlates tools channel events into per-call ToolCallStream objects.

Marked __native: true — projection keys land directly on the GraphRunStream instance as `

Function

detectCreditCard

Detect credit card numbers in content (validated with Luhn algorithm)

Function

detectEmail

Detect email addresses in content

Function

detectIP

Detect IP addresses in content (validated)

Function

detectMacAddress

Detect MAC addresses in content

Function

detectUrl

Detect URLs in content

Function

dynamicSystemPromptMiddleware

Dynamic System Prompt Middleware

Allows setting the system prompt dynamically right before each model invocation. Useful when the prompt depends on the current agent state or per-invocation context.

Function

fakeModel

LangChain Testing Utilities

Function

filterMessages

LangChain Messages

Function

humanInTheLoopMiddleware

Creates a Human-in-the-Loop (HITL) middleware for tool approval and oversight.

This middleware intercepts tool calls made by an AI agent and provides human oversight capabilities before execution. It

Function

initChatModel

Initialize a ChatModel from the model name and provider. Must have the integration package corresponding to the model provider installed.

Function

llmToolSelectorMiddleware

Middleware for selecting tools using an LLM-based strategy.

When an agent has many tools available, this middleware filters them down to only the most relevant ones for the user's query. This reduces

Function

modelCallLimitMiddleware

Creates a middleware to limit the number of model calls at both thread and run levels.

This middleware helps prevent excessive model API calls by enforcing limits on how many times the model can be i

Function

modelFallbackMiddleware

Middleware that provides automatic model fallback on errors.

This middleware attempts to retry failed model calls with alternative models in sequence. When a model call fails, it tries the next model

Function

modelRetryMiddleware

Middleware that automatically retries failed model calls with configurable backoff.

Supports retrying on specific exceptions and exponential backoff.

Function

openAIModerationMiddleware

Provider specific middleware

Function

piiMiddleware

Creates a middleware that detects and handles personally identifiable information (PII) in conversations.

This middleware detects common PII types and applies configurable strategies to handle them.

Function

providerStrategy

Creates a provider strategy for structured output using native JSON schema support.

This function is used to configure structured output for agents when the underlying model supports native JSON sche

Function

providerToolSearchMiddleware

Provider-side tool search middleware.

Leverages server-side tool search: the full client tool catalog is forwarded to the provider, with deferred tools marked defer_loading so the provider disclose

Function

resolveRedactionRule

Resolve a redaction rule to a concrete detector function

Function

summarizationMiddleware

Summarization middleware that automatically summarizes conversation history when token limits are approached.

This middleware monitors message token counts and automatically summarizes older messages

Function

todoListMiddleware

Creates a middleware that provides todo list management capabilities to agents.

This middleware adds a write_todos tool that allows agents to create and manage structured task lists for complex mul

Function

toolCallLimitMiddleware

Middleware that tracks tool call counts and enforces limits.

This middleware monitors the number of tool calls made during agent execution and can terminate the agent when specified limits are reache

Function

toolEmulatorMiddleware

Middleware that emulates specified tools using an LLM instead of executing them.

This middleware allows selective emulation of tools for testing purposes. By default (when tools is undefined), all

Function

toolErrorMiddleware

Converts selected tool execution errors into error ToolMessages.

Handling is opt-in: ToolErrorMiddlewareConfig.onError must return content for an error to be sent to the model. Returning nothing pr

Function

toolRetryMiddleware

Middleware that automatically retries failed tool calls with configurable backoff.

Supports retrying on specific exceptions and exponential backoff.

Function

toolStrategy

Creates a tool strategy for structured output using function calling.

This function configures structured output by converting schemas into function tools that the model calls. Unlike `providerStrate

Function

trimMessages

LangChain Messages

Function

_inferModelProvider

Attempts to infer the model provider based on the given model name.

Function

getChatModelByClassName

Helper function to get a chat model class by its class name or model provider.

Function

initChatModel

Initialize a ChatModel from the model name and provider. Must have the integration package corresponding to the model provider installed.

Function

pull

Pull a prompt from the hub.

Function

push

Push a prompt to the hub. If the specified repo doesn't already exist, it will be created.

Function

inferModelProviderFromNamespace

Infer modelProvider from the id namespace to avoid className collisions. For non-langchain packages, extracts the provider name from the namespace. e.g., ["langchain", "chat_models", "vertexai", "Chat

Function

pull

Pull a prompt from the hub.

Function

push

Push a prompt to the hub. If the specified repo doesn't already exist, it will be created.

Function

anthropicPromptCachingMiddleware

Creates a prompt caching middleware for Anthropic models to optimize API usage.

This middleware automatically adds cache control headers to the last messages when using Anthropic models, enabling the

Function

applyStrategy

Apply strategy to content based on matches

Function

bedrockPromptCachingMiddleware

Creates a prompt caching middleware for AWS Bedrock Converse models to optimize API usage.

This middleware automatically enables Bedrock's prompt caching when using AWS Bedrock Converse models. This

Function

context

LangChain utilities

Function

contextEditingMiddleware

Middleware that automatically prunes tool results to manage context size.

This middleware applies a sequence of edits when the total input token count exceeds configured thresholds. By default, it us

Function

countTokensApproximately

Default token counter that approximates based on character count.

If tools are provided, the token count also includes stringified tool schemas.

Function

createAgent

Creates a production-ready ReAct (Reasoning + Acting) agent that combines language models with tools and middleware to create systems that can reason about tasks, decide which tools to use, and iterat

Function

createMiddleware

Creates a middleware instance with automatic schema inference.

Function

createSubagentTransformer

Creates a native transformer that surfaces nested named agents on run.subagents.

It watches tasks events to record each namespace's lc_agent_name (set by createAgent({ name })) and the trigge

Function

createToolCallTransformer

Creates a native transformer that correlates tools channel events into per-call ToolCallStream objects.

Marked __native: true — projection keys land directly on the GraphRunStream instance as `

Function

detectCreditCard

Detect credit card numbers in content (validated with Luhn algorithm)

Function

detectEmail

Detect email addresses in content

Function

detectIP

Detect IP addresses in content (validated)

Function

detectMacAddress

Detect MAC addresses in content

Function

detectUrl

Detect URLs in content

Function

dynamicSystemPromptMiddleware

Dynamic System Prompt Middleware

Allows setting the system prompt dynamically right before each model invocation. Useful when the prompt depends on the current agent state or per-invocation context.

Function

fakeModel

LangChain Testing Utilities

Function

filterMessages

LangChain Messages

Function

humanInTheLoopMiddleware

Creates a Human-in-the-Loop (HITL) middleware for tool approval and oversight.

This middleware intercepts tool calls made by an AI agent and provides human oversight capabilities before execution. It

Function

llmToolSelectorMiddleware

Middleware for selecting tools using an LLM-based strategy.

When an agent has many tools available, this middleware filters them down to only the most relevant ones for the user's query. This reduces

Function

modelCallLimitMiddleware

Creates a middleware to limit the number of model calls at both thread and run levels.

This middleware helps prevent excessive model API calls by enforcing limits on how many times the model can be i

Function

modelFallbackMiddleware

Middleware that provides automatic model fallback on errors.

This middleware attempts to retry failed model calls with alternative models in sequence. When a model call fails, it tries the next model

Function

modelRetryMiddleware

Middleware that automatically retries failed model calls with configurable backoff.

Supports retrying on specific exceptions and exponential backoff.

Function

openAIModerationMiddleware

Provider specific middleware

Function

piiMiddleware

Creates a middleware that detects and handles personally identifiable information (PII) in conversations.

This middleware detects common PII types and applies configurable strategies to handle them.

Function

providerStrategy

Creates a provider strategy for structured output using native JSON schema support.

This function is used to configure structured output for agents when the underlying model supports native JSON sche

Function

providerToolSearchMiddleware

Provider-side tool search middleware.

Leverages server-side tool search: the full client tool catalog is forwarded to the provider, with deferred tools marked defer_loading so the provider disclose

Function

resolveRedactionRule

Resolve a redaction rule to a concrete detector function

Function

summarizationMiddleware

Summarization middleware that automatically summarizes conversation history when token limits are approached.

This middleware monitors message token counts and automatically summarizes older messages

Function

todoListMiddleware

Creates a middleware that provides todo list management capabilities to agents.

This middleware adds a write_todos tool that allows agents to create and manage structured task lists for complex mul

Function

toolCallLimitMiddleware

Middleware that tracks tool call counts and enforces limits.

This middleware monitors the number of tool calls made during agent execution and can terminate the agent when specified limits are reache

Function

toolEmulatorMiddleware

Middleware that emulates specified tools using an LLM instead of executing them.

This middleware allows selective emulation of tools for testing purposes. By default (when tools is undefined), all

Function

toolErrorMiddleware

Converts selected tool execution errors into error ToolMessages.

Handling is opt-in: ToolErrorMiddlewareConfig.onError must return content for an error to be sent to the model. Returning nothing pr

Function

toolRetryMiddleware

Middleware that automatically retries failed tool calls with configurable backoff.

Supports retrying on specific exceptions and exponential backoff.

Function

toolStrategy

Creates a tool strategy for structured output using function calling.

This function configures structured output by converting schemas into function tools that the model calls. Unlike `providerStrate

Function

trimMessages

LangChain Messages

Function

initChatModel

Initialize a ChatModel from the model name and provider. Must have the integration package corresponding to the model provider installed.

Function

load

Load a LangChain module from a serialized text representation. NOTE: This functionality is currently in beta. Loaded classes may change independently of semver.

**WARNING — insecure deserialization r

Function

get_lc_unique_name

Get a unique name for the module, rather than parent class implementations. Should not be subclassed, subclass lc_name above instead.

Function

createDocumentStoreFromByteStore

Function

piiRedactionMiddleware

deprecated

Creates a middleware that detects and redacts personally identifiable information (PII) from messages before they are sent to model providers, and restores original values in model responses for tool

Function

piiRedactionMiddleware

deprecated

Creates a middleware that detects and redacts personally identifiable information (PII) from messages before they are sent to model providers, and restores original values in model responses for tool

Exports

Interfaces

Types

Module

browser

Module

chat_models/universal

Module

hub

Module

hub/node

Module

index

Module

load

Module

load/serializable

Module

storage/encoder_backed

Module

storage/file_system

Module

storage/in_memory

Module

tools

LangChain Tools

This module provides tool utilities for LangChain agents.

Interface

Action

Represents an action with a name and arguments.

Interface

ActionRequest

Represents an action request with a name, arguments, and description.

Interface

AgentMiddleware

Base middleware interface.

Interface

AgentTypeConfig

Type bag that encapsulates all agent type parameters.

This interface bundles all the generic type parameters used throughout the agent system into a single configuration object. This pattern simplifi

Interface

ApproveDecision

Response when a human approves the action.

Interface

BuiltInState

Interface

ClearToolUsesEditConfig

Configuration for clearing tool outputs when token limits are exceeded.

Interface

ContentBlock

LangChain Messages

Interface

ContextEdit

Protocol describing a context editing strategy.

Implement this interface to create custom strategies for managing conversation context size. The apply method should modify the messages array in-pla

Interface

ContextEditingMiddlewareConfig

Configuration for the Context Editing Middleware.

Interface

DefaultAgentTypeConfig

Default type configuration for agents. Used when no explicit type parameters are provided.

Interface

DocumentInput

LangChain Documents

Interface

EditDecision

Response when a human edits the action.

Interface

ExecutedToolCall

Information about a tool call that has been executed.

Interface

HITLRequest

Request for human feedback on a sequence of actions requested by a model.

Interface

HITLResponse

Response payload for a HITLRequest.

Interface

Interrupt

Represents information about an interrupt.

Interface

LangChainMatchers

LangChain Testing Utilities

Interface

MiddlewareTypeConfig

Type bag that encapsulates all middleware type parameters.

This interface bundles all the generic type parameters used throughout the middleware system into a single configuration object. This patter

Interface

ModelRequest

Configuration for modifying a model call at runtime. All fields are optional and only provided fields will override defaults.

Interface

OpenAIModerationMiddlewareOptions

Options for configuring the OpenAI Moderation middleware.

Interface

PIIMatch

Represents a detected PII match in content

Interface

ReactAgent

ReactAgent is a production-ready ReAct (Reasoning + Acting) agent that combines language models with tools and middleware.

The agent is parameterized by a single type bag Types that encapsulates al

Interface

RedactionRuleConfig

Configuration for a redaction rule

Interface

RejectDecision

Response when a human rejects the action.

Interface

ResolvedRedactionRule

Resolved redaction rule with a concrete detector function

Interface

ReviewConfig

Policy for reviewing a HITL request.

Interface

SubagentRunStream

A nested named-agent execution surfaced on run.subagents.

A subagent is a nested createAgent run whose lc_agent_name differs from its parent's — e.g. a createAgent({ name }) invoked inside a

Interface

TodoListMiddlewareOptions

Interface

ToolCall

Information about a tool call that has been executed.

Interface

ToolCallRequest

Represents a tool call request for the wrapToolCall hook. Contains the tool call information along with the agent's current state and runtime.

Interface

ToolEmulatorOptions

Options for configuring the Tool Emulator middleware.

Interface

ToolErrorMiddlewareConfig

Configuration for toolErrorMiddleware.

Interface

ToolResult

Information about a tool result from a tool execution.

Interface

TypedToolStrategy

Branded type for ToolStrategy arrays that preserves type information

Interface

ConfigurableChatModelCallOptions

Interface

InitChatModelFields

Interface

InvalidToolCall

Content block to represent an invalid tool call

Interface

ServerToolCall

Interface

ServerToolCallChunk

Interface

ServerToolCallResult

Interface

ToolCall

Represents a request to call a tool.

Interface

ToolCallChunk

Content block to represent partial data of a tool call

Interface

Citation

Annotation for citing data from a document.

Interface

NonStandard

Provider-specific content block.

This is used to represent content blocks that are not part of the standard LangChain content model. If a provider's non-standard output includes reasoning and tool ca

Interface

Reasoning

Reasoning output from a LLM.

Interface

Text

Text output from a LLM.

This typically represents the main text content of a message, such as the response from a language model or the text of a user message.

Interface

Action

Represents an action with a name and arguments.

Interface

ActionRequest

Represents an action request with a name, arguments, and description.

Interface

AgentMiddleware

Base middleware interface.

Interface

AgentTypeConfig

Type bag that encapsulates all agent type parameters.

This interface bundles all the generic type parameters used throughout the agent system into a single configuration object. This pattern simplifi

Interface

ApproveDecision

Response when a human approves the action.

Interface

BuiltInState

Interface

ClearToolUsesEditConfig

Configuration for clearing tool outputs when token limits are exceeded.

Interface

ContentBlock

LangChain Messages

Interface

ContextEdit

Protocol describing a context editing strategy.

Implement this interface to create custom strategies for managing conversation context size. The apply method should modify the messages array in-pla

Interface

ContextEditingMiddlewareConfig

Configuration for the Context Editing Middleware.

Interface

DefaultAgentTypeConfig

Default type configuration for agents. Used when no explicit type parameters are provided.

Interface

DocumentInput

LangChain Documents

Interface

EditDecision

Response when a human edits the action.

Interface

ExecutedToolCall

Information about a tool call that has been executed.

Interface

HITLRequest

Request for human feedback on a sequence of actions requested by a model.

Interface

HITLResponse

Response payload for a HITLRequest.

Interface

Interrupt

Represents information about an interrupt.

Interface

LangChainMatchers

LangChain Testing Utilities

Interface

MiddlewareTypeConfig

Type bag that encapsulates all middleware type parameters.

This interface bundles all the generic type parameters used throughout the middleware system into a single configuration object. This patter

Interface

ModelRequest

Configuration for modifying a model call at runtime. All fields are optional and only provided fields will override defaults.

Interface

OpenAIModerationMiddlewareOptions

Options for configuring the OpenAI Moderation middleware.

Interface

PIIMatch

Represents a detected PII match in content

Interface

ReactAgent

ReactAgent is a production-ready ReAct (Reasoning + Acting) agent that combines language models with tools and middleware.

The agent is parameterized by a single type bag Types that encapsulates al

Interface

RedactionRuleConfig

Configuration for a redaction rule

Interface

RejectDecision

Response when a human rejects the action.

Interface

ResolvedRedactionRule

Resolved redaction rule with a concrete detector function

Interface

ReviewConfig

Policy for reviewing a HITL request.

Interface

SubagentRunStream

A nested named-agent execution surfaced on run.subagents.

A subagent is a nested createAgent run whose lc_agent_name differs from its parent's — e.g. a createAgent({ name }) invoked inside a

Interface

TodoListMiddlewareOptions

Interface

ToolCall

Information about a tool call that has been executed.

Interface

ToolCallRequest

Represents a tool call request for the wrapToolCall hook. Contains the tool call information along with the agent's current state and runtime.

Interface

ToolEmulatorOptions

Options for configuring the Tool Emulator middleware.

Interface

ToolErrorMiddlewareConfig

Configuration for toolErrorMiddleware.

Interface

ToolResult

Information about a tool result from a tool execution.

Interface

TypedToolStrategy

Branded type for ToolStrategy arrays that preserves type information

Interface

BaseSerialized

Interface

SerializableInterface

Interface

SerializableLike

Interface for objects that can be serialized. This is a duck-typed interface to avoid circular imports.

Interface

SerializedConstructor

Interface

SerializedNotImplemented

Interface

SerializedSecret

Interface

Base64ContentBlock

deprecated
Interface

BaseDataContentBlock

deprecated
Interface

IDContentBlock

deprecated
Interface

PlainTextContentBlock

deprecated
Interface

URLContentBlock

deprecated
Type

AfterAgentHook

Hook type for the afterAgent lifecycle event. Can be either a handler function or an object with a handler and optional jump targets. This hook is called once at the end of the agent invocation.

Type

AfterModelHook

Hook type for the afterModel lifecycle event. Can be either a handler function or an object with a handler and optional jump targets. This hook is called after each model invocation.

Type

AgentRunStream

A GraphRunStream with native agent-level projections assigned directly on the instance by createGraphRunStream (via __native transformers).

This is a pure type overlay — no runtime subclass exist

Type

AnyAgentMiddleware

Widened middleware type for agent configuration arrays. Accepts middleware instances with any registered tools or stream transformers while preserving precise inference when middleware arrays are pass

Type

AnyAnnotationRoot

Type

BedrockConversePromptCachingMiddlewareConfig

Type

BeforeAgentHook

Hook type for the beforeAgent lifecycle event. Can be either a handler function or an object with a handler and optional jump targets. This hook is called once at the start of the agent invocation.

Type

BeforeModelHook

Hook type for the beforeModel lifecycle event. Can be either a handler function or an object with a handler and optional jump targets. This hook is called before each model invocation.

Type

BuiltInPIIType

Built-in PII types

Type

CombineStreamTransformers

Helper type to combine agent stream transformers with middleware stream transformers.

Type

CombineTools

Helper type to combine agent tools with middleware tools into a single readonly array.

Type

CreateAgentParams

Type

Decision

Union of all possible decision types.

Type

DecisionType

Type

DefaultMiddlewareTypeConfig

Default type configuration for middleware. Used when no explicit type parameters are provided.

Type

DescriptionFactory

Function type that dynamically generates a description for a tool call approval request.

Type

DynamicSystemPromptMiddlewareConfig

Type

ExtractZodArrayTypes

Type helper to extract union type from an array of Zod schemas

Type

HeadlessTool

A headless tool that always interrupts agent execution on the server.

The implementation is provided separately on the client via useStream({ tools: [...] }) using .implement().

Type

HeadlessToolFields

Configuration fields for creating a headless tool.

Type

HeadlessToolImplementation

A tool implementation that pairs a headless tool with its execution function.

Created by calling .implement() on a HeadlessTool. Pass to useStream({ tools: [...] }) on the client side.

Type

HumanInTheLoopMiddlewareConfig

Type

InferAgentContext

Helper type to infer the full merged context from an agent, including:

  • The agent's own context schema (if provided via contextSchema)
  • All middleware context schemas

This matches the context typ

Type

InferAgentContextSchema

Shorthand helper to extract the raw Context schema type from an AgentTypeConfig or ReactAgent. This returns just the contextSchema type passed to createAgent, not merged with middleware.

For the

Type

InferAgentMiddleware

Shorthand helper to extract the Middleware type from an AgentTypeConfig or ReactAgent.

Type

InferAgentResponse

Shorthand helper to extract the Response type from an AgentTypeConfig or ReactAgent.

Type

InferAgentState

Helper type to infer the full merged state from an agent, including:

  • The agent's own state schema (if provided via stateSchema)
  • All middleware states

This matches the state type returned by `in

Type

InferAgentStateSchema

Shorthand helper to extract the raw State schema type from an AgentTypeConfig or ReactAgent. This returns just the stateSchema type passed to createAgent, not merged with middleware.

For the comp

Type

InferAgentStreamTransformers

Shorthand helper to extract the StreamTransformers type (the tuple of transformer factories) from an AgentTypeConfig or ReactAgent.

Type

InferAgentTools

Shorthand helper to extract the Tools type from an AgentTypeConfig or ReactAgent.

Type

InferAgentType

Helper type to extract any property from an AgentTypeConfig or ReactAgent.

Type

InferChannelType

Type

InferContextInput

Helper type to extract input type from context schema (with optional defaults)

Type

InferMergedInputState

Helper type to infer merged input state from an array of middleware (includes built-in state)

Type

InferMergedState

Helper type to infer merged state from an array of middleware (includes built-in state)

Type

InferMiddlewareContext

Helper type to infer the context schema type from a middleware

Type

InferMiddlewareContextInput

Helper type to infer the input context schema type from a middleware (with optional defaults)

Type

InferMiddlewareContextInputs

Helper type to infer merged input context from an array of middleware (with optional defaults)

Type

InferMiddlewareContexts

Helper type to infer merged context from an array of middleware

Type

InferMiddlewareContextSchema

Shorthand helper to extract the ContextSchema type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareFullContext

Shorthand helper to extract the FullContext type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareInputState

Helper type to infer the input state schema type from a middleware (all properties optional) This filters out private properties (those starting with underscore) Supports both Zod schemas (InteropZodO

Type

InferMiddlewareInputStates

Helper type to infer merged input state from an array of middleware (with optional defaults)

Type

InferMiddlewareSchema

Shorthand helper to extract the Schema type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareState

Helper type to infer the state schema type from a middleware This filters out private properties (those starting with underscore) Supports both Zod schemas (InteropZodObject) and StateSchema from Lang

Type

InferMiddlewareStates

Helper type to infer merged state from an array of middleware (just the middleware states)

Type

InferMiddlewareStreamTransformers

Helper type to infer stream transformers from a single middleware instance.

Type

InferMiddlewareStreamTransformersArray

Helper type to infer and merge stream transformers from an array of middleware.

Type

InferMiddlewareStreamTransformersFromConfig

Shorthand helper to extract the StreamTransformers type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareTools

Helper type to infer tools from a single middleware instance. Extracts the TTools type parameter from AgentMiddleware.

Type

InferMiddlewareToolsArray

Helper type to infer and merge tools from an array of middleware. Recursively extracts tools from each middleware and combines them into a single tuple.

Type

InferMiddlewareToolsFromConfig

Shorthand helper to extract the Tools type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareType

Helper type to extract any property from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferSchemaInput

Type

InferSchemaUpdateType

Type

InferSchemaValue

Type

InferSchemaValueType

Type

InterruptOnConfig

Type

JumpTo

jump targets (internal)

Type

JumpToTarget

Type

LLMToolSelectorConfig

Type

MiddlewareResult

Result type for middleware functions.

Type

ModelCallLimitMiddlewareConfig

Type

ModelRetryMiddlewareConfig

Type

N

Type

NormalizedSchemaInput

Type

NormalizedSchemaUpdate

Type

PIIDetector

Custom detector function that takes content and returns matches

Type

PIIMiddlewareConfig

Type

PIIStrategy

Strategy for handling detected PII

Type

PromptCachingMiddlewareConfig

Type

ProviderToolSearchMiddlewareConfig

Type

ResolveAgentTypeConfig

Helper type to resolve an AgentTypeConfig from either:

  • An AgentTypeConfig directly
  • A ReactAgent instance (using typeof agent)
Type

ResolveMiddlewareTypeConfig

Helper type to resolve a MiddlewareTypeConfig from either:

  • A MiddlewareTypeConfig directly
  • An AgentMiddleware instance (using typeof middleware)
Type

ResponseFormat

Type

ResponseFormatUndefined

Special type to indicate that no response format is provided. When this type is used, the structuredResponse property should not be present in the result.

Type

Runtime

Runtime information available to middleware (readonly).

Type

SummarizationMiddlewareConfig

Type

ToAnnotationRoot

Type

Todo

Type

TokenCounter

Type

ToolCallHandler

Handler function type for wrapping tool calls. Takes a tool call request and returns the tool result or a command.

Type

ToolCallLimitConfig

Type

ToolCallStreamUnion

Discriminated union of ToolCallStream variants, one per tool in TTools. Enables TypeScript to narrow .input and .output when the consumer checks call.name === "someToolName".

Falls back to `

Type

ToolErrorHandler

Handler called when tool execution throws.

Return content to surface the error to the model as an error ToolMessage. Return nothing to propagate the original error.

Type

ToolRetryMiddlewareConfig

Type

ToolRuntime

Runtime context automatically injected into tools.

When a tool function has a parameter named tool_runtime with type hint ToolRuntime, the tool execution system will automatically inject an insta

Type

ToolsToMessageToolSet

Helper type to convert an array of tools (ClientTool | ServerTool)[] to a MessageToolSet. This maps each tool's name (as a literal type) to its MessageToolDefinition containing the input and output ty

Type

UserInput

Base input type for .invoke and .stream methods.

Type

WhenPredicate

Predicate controlling whether a given tool call triggers an interrupt.

Receives a ToolCallRequest and returns true to interrupt or false to auto-approve the tool call.

The request is constructed

Type

WithStateGraphNodes

Type

WrapModelCallHandler

Handler function type for wrapping model calls. Takes a model request and returns the AI message response.

Type

WrapModelCallHook

Wrapper function type for the wrapModelCall hook. Allows middleware to intercept and modify model execution. This enables you to:

  • Modify the request before calling the model (e.g., change system pro
Type

WrapToolCallHook

Wrapper function type for the wrapToolCall hook. Allows middleware to intercept and modify tool execution.

Type

ChatModelProvider

Type

ConfigurableFields

Type

Audio

Content block for audio data

Type

BaseDataRecord

Type

Data

Content block for multimodal data

Type

DataRecord

Type

DataRecordBase64

Type

DataRecordFileId

Type

DataRecordUrl

Type

File

Content block for file data

Type

Image

Content block for image data

Type

PlainText

Content block for plain text data

Type

Standard

Type

Video

Content block for video data

Type

Standard

Type

Data

Type

Multimodal

Type

Standard

Type

Tools

Type

AfterAgentHook

Hook type for the afterAgent lifecycle event. Can be either a handler function or an object with a handler and optional jump targets. This hook is called once at the end of the agent invocation.

Type

AfterModelHook

Hook type for the afterModel lifecycle event. Can be either a handler function or an object with a handler and optional jump targets. This hook is called after each model invocation.

Type

AgentRunStream

A GraphRunStream with native agent-level projections assigned directly on the instance by createGraphRunStream (via __native transformers).

This is a pure type overlay — no runtime subclass exist

Type

AnyAgentMiddleware

Widened middleware type for agent configuration arrays. Accepts middleware instances with any registered tools or stream transformers while preserving precise inference when middleware arrays are pass

Type

AnyAnnotationRoot

Type

BedrockConversePromptCachingMiddlewareConfig

Type

BeforeAgentHook

Hook type for the beforeAgent lifecycle event. Can be either a handler function or an object with a handler and optional jump targets. This hook is called once at the start of the agent invocation.

Type

BeforeModelHook

Hook type for the beforeModel lifecycle event. Can be either a handler function or an object with a handler and optional jump targets. This hook is called before each model invocation.

Type

BuiltInPIIType

Built-in PII types

Type

CombineStreamTransformers

Helper type to combine agent stream transformers with middleware stream transformers.

Type

CombineTools

Helper type to combine agent tools with middleware tools into a single readonly array.

Type

CreateAgentParams

Type

Decision

Union of all possible decision types.

Type

DecisionType

Type

DefaultMiddlewareTypeConfig

Default type configuration for middleware. Used when no explicit type parameters are provided.

Type

DescriptionFactory

Function type that dynamically generates a description for a tool call approval request.

Type

DynamicSystemPromptMiddlewareConfig

Type

ExtractZodArrayTypes

Type helper to extract union type from an array of Zod schemas

Type

HeadlessTool

A headless tool that always interrupts agent execution on the server.

The implementation is provided separately on the client via useStream({ tools: [...] }) using .implement().

Type

HeadlessToolFields

Configuration fields for creating a headless tool.

Type

HeadlessToolImplementation

A tool implementation that pairs a headless tool with its execution function.

Created by calling .implement() on a HeadlessTool. Pass to useStream({ tools: [...] }) on the client side.

Type

HumanInTheLoopMiddlewareConfig

Type

InferAgentContext

Helper type to infer the full merged context from an agent, including:

  • The agent's own context schema (if provided via contextSchema)
  • All middleware context schemas

This matches the context typ

Type

InferAgentContextSchema

Shorthand helper to extract the raw Context schema type from an AgentTypeConfig or ReactAgent. This returns just the contextSchema type passed to createAgent, not merged with middleware.

For the

Type

InferAgentMiddleware

Shorthand helper to extract the Middleware type from an AgentTypeConfig or ReactAgent.

Type

InferAgentResponse

Shorthand helper to extract the Response type from an AgentTypeConfig or ReactAgent.

Type

InferAgentState

Helper type to infer the full merged state from an agent, including:

  • The agent's own state schema (if provided via stateSchema)
  • All middleware states

This matches the state type returned by `in

Type

InferAgentStateSchema

Shorthand helper to extract the raw State schema type from an AgentTypeConfig or ReactAgent. This returns just the stateSchema type passed to createAgent, not merged with middleware.

For the comp

Type

InferAgentStreamTransformers

Shorthand helper to extract the StreamTransformers type (the tuple of transformer factories) from an AgentTypeConfig or ReactAgent.

Type

InferAgentTools

Shorthand helper to extract the Tools type from an AgentTypeConfig or ReactAgent.

Type

InferAgentType

Helper type to extract any property from an AgentTypeConfig or ReactAgent.

Type

InferChannelType

Type

InferContextInput

Helper type to extract input type from context schema (with optional defaults)

Type

InferMergedInputState

Helper type to infer merged input state from an array of middleware (includes built-in state)

Type

InferMergedState

Helper type to infer merged state from an array of middleware (includes built-in state)

Type

InferMiddlewareContext

Helper type to infer the context schema type from a middleware

Type

InferMiddlewareContextInput

Helper type to infer the input context schema type from a middleware (with optional defaults)

Type

InferMiddlewareContextInputs

Helper type to infer merged input context from an array of middleware (with optional defaults)

Type

InferMiddlewareContexts

Helper type to infer merged context from an array of middleware

Type

InferMiddlewareContextSchema

Shorthand helper to extract the ContextSchema type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareFullContext

Shorthand helper to extract the FullContext type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareInputState

Helper type to infer the input state schema type from a middleware (all properties optional) This filters out private properties (those starting with underscore) Supports both Zod schemas (InteropZodO

Type

InferMiddlewareInputStates

Helper type to infer merged input state from an array of middleware (with optional defaults)

Type

InferMiddlewareSchema

Shorthand helper to extract the Schema type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareState

Helper type to infer the state schema type from a middleware This filters out private properties (those starting with underscore) Supports both Zod schemas (InteropZodObject) and StateSchema from Lang

Type

InferMiddlewareStates

Helper type to infer merged state from an array of middleware (just the middleware states)

Type

InferMiddlewareStreamTransformers

Helper type to infer stream transformers from a single middleware instance.

Type

InferMiddlewareStreamTransformersArray

Helper type to infer and merge stream transformers from an array of middleware.

Type

InferMiddlewareStreamTransformersFromConfig

Shorthand helper to extract the StreamTransformers type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareTools

Helper type to infer tools from a single middleware instance. Extracts the TTools type parameter from AgentMiddleware.

Type

InferMiddlewareToolsArray

Helper type to infer and merge tools from an array of middleware. Recursively extracts tools from each middleware and combines them into a single tuple.

Type

InferMiddlewareToolsFromConfig

Shorthand helper to extract the Tools type from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferMiddlewareType

Helper type to extract any property from a MiddlewareTypeConfig or AgentMiddleware.

Type

InferSchemaInput

Type

InferSchemaUpdateType

Type

InferSchemaValue

Type

InferSchemaValueType

Type

InterruptOnConfig

Type

JumpTo

jump targets (internal)

Type

JumpToTarget

Type

LLMToolSelectorConfig

Type

MiddlewareResult

Result type for middleware functions.

Type

ModelCallLimitMiddlewareConfig

Type

ModelRetryMiddlewareConfig

Type

N

Type

NormalizedSchemaInput

Type

NormalizedSchemaUpdate

Type

PIIDetector

Custom detector function that takes content and returns matches

Type

PIIMiddlewareConfig

Type

PIIStrategy

Strategy for handling detected PII

Type

PromptCachingMiddlewareConfig

Type

ProviderToolSearchMiddlewareConfig

Type

ResolveAgentTypeConfig

Helper type to resolve an AgentTypeConfig from either:

  • An AgentTypeConfig directly
  • A ReactAgent instance (using typeof agent)
Type

ResolveMiddlewareTypeConfig

Helper type to resolve a MiddlewareTypeConfig from either:

  • A MiddlewareTypeConfig directly
  • An AgentMiddleware instance (using typeof middleware)
Type

ResponseFormat

Type

ResponseFormatUndefined

Special type to indicate that no response format is provided. When this type is used, the structuredResponse property should not be present in the result.

Type

Runtime

Runtime information available to middleware (readonly).

Type

SummarizationMiddlewareConfig

Type

ToAnnotationRoot

Type

Todo

Type

TokenCounter

Type

ToolCallHandler

Handler function type for wrapping tool calls. Takes a tool call request and returns the tool result or a command.

Type

ToolCallLimitConfig

Type

ToolCallStreamUnion

Discriminated union of ToolCallStream variants, one per tool in TTools. Enables TypeScript to narrow .input and .output when the consumer checks call.name === "someToolName".

Falls back to `

Type

ToolErrorHandler

Handler called when tool execution throws.

Return content to surface the error to the model as an error ToolMessage. Return nothing to propagate the original error.

Type

ToolRetryMiddlewareConfig

Type

ToolRuntime

Runtime context automatically injected into tools.

When a tool function has a parameter named tool_runtime with type hint ToolRuntime, the tool execution system will automatically inject an insta

Type

ToolsToMessageToolSet

Helper type to convert an array of tools (ClientTool | ServerTool)[] to a MessageToolSet. This maps each tool's name (as a literal type) to its MessageToolDefinition containing the input and output ty

Type

UserInput

Base input type for .invoke and .stream methods.

Type

WhenPredicate

Predicate controlling whether a given tool call triggers an interrupt.

Receives a ToolCallRequest and returns true to interrupt or false to auto-approve the tool call.

The request is constructed

Type

WithStateGraphNodes

Type

WrapModelCallHandler

Handler function type for wrapping model calls. Takes a model request and returns the AI message response.

Type

WrapModelCallHook

Wrapper function type for the wrapModelCall hook. Allows middleware to intercept and modify model execution. This enables you to:

  • Modify the request before calling the model (e.g., change system pro
Type

WrapToolCallHook

Wrapper function type for the wrapToolCall hook. Allows middleware to intercept and modify tool execution.

Type

Serialized

Type

HeadlessTool

A headless tool that always interrupts agent execution on the server.

The implementation is provided separately on the client via useStream({ tools: [...] }) using .implement().

Type

HeadlessToolFields

Configuration fields for creating a headless tool.

Type

HeadlessToolImplementation

A tool implementation that pairs a headless tool with its execution function.

Created by calling .implement() on a HeadlessTool. Pass to useStream({ tools: [...] }) on the client side.

Type

PIIRedactionMiddlewareConfig

deprecated
Type

DataContentBlock

deprecated
Type

DataContentBlockType

deprecated
Type

StandardAudioBlock

deprecated
Type

StandardFileBlock

deprecated
Type

StandardImageBlock

deprecated
Type

StandardTextBlock

deprecated
Type

PIIRedactionMiddlewareConfig

deprecated

🦜️🔗 LangChain.js

npm License: MIT Twitter

LangChain is a framework for building LLM-powered applications. It helps you chain together interoperable components and third-party integrations to simplify AI application development — all while future-proofing decisions as the underlying technology evolves.

Documentation: To learn more about LangChain, check out the docs.

If you're looking for more advanced customization or agent orchestration, check out LangGraph.js. our framework for building agents and controllable workflows.

[!NOTE] Looking for the Python version? Check out LangChain.

To help you ship LangChain apps to production faster, check out LangSmith. LangSmith is a unified developer platform for building, testing, and monitoring LLM applications.

⚡️ Quick Install

You can use npm, pnpm, or yarn to install LangChain.js

npm install -S langchain
# or
pnpm install langchain
# or
yarn add langchain

🚀 Why use LangChain?

LangChain helps developers build applications powered by LLMs through a standard interface for agents, models, embeddings, vector stores, and more.

Use LangChain for:

  • Real-time data augmentation. Easily connect LLMs to diverse data sources and external/internal systems, drawing from LangChain’s vast library of integrations with model providers, tools, vector stores, retrievers, and more.
  • Model interoperability. Swap models in and out as your engineering team experiments to find the best choice for your application’s needs. As the industry frontier evolves, adapt quickly — LangChain’s abstractions keep you moving without losing momentum.

📦 LangChain's ecosystem

  • LangSmith - Unified developer platform for building, testing, and monitoring LLM applications. With LangSmith, you can debug poor-performing LLM app runs, evaluate agent trajectories, gain visibility in production, and deploy agents with confidence.
  • LangGraph - Build agents that can reliably handle complex tasks with LangGraph, our low-level agent orchestration framework. LangGraph offers customizable architecture, long-term memory, and human-in-the-loop workflows — and is trusted in production by companies like LinkedIn, Uber, Klarna, and GitLab.
  • Deep Agents - Build sophisticated "deep" agents that go beyond simple tool-calling loops. Deep Agents combines planning tools, sub-agent spawning, file system access, and detailed prompts to handle complex, multi-step tasks — inspired by applications like Claude Code and Deep Research.

🌐 Supported Environments

LangChain.js is written in TypeScript and can be used in:

  • Node.js (ESM and CommonJS) - 20.x, 22.x, 24.x
  • Cloudflare Workers
  • Vercel / Next.js (Browser, Serverless and Edge functions)
  • Supabase Edge Functions
  • Browser
  • Deno
  • Bun

📖 Additional Resources

  • Getting started: Installation, setting up the environment, simple examples
  • Learn: Learn about the core concepts of LangChain.
  • LangChain Forum: Connect with the community and share all of your technical questions, ideas, and feedback.
  • Chat LangChain: Ask questions & chat with our documentation.

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see here.

Please report any security issues or concerns following our security guidelines.