Welcome to the LangChain Core Module Documentation. This page provides an overview of all key components, making it easier to navigate LangChain’s structure.
1. Core Modules and Their Purpose
LangChain’s core functionality is divided into several modules, each handling a specific aspect of LLM-driven applications.
- Purpose: Agents dynamically decide actions by interacting with external tools and APIs.
- Key Components:
- Prebuilt agents (e.g., ReAct, OpenAI function-calling agents)
- Action selection logic
- Customizable agent implementations
Understanding the different agents
1.2 Chains (chains/
)
- Purpose: Chains allow multiple components (LLMs, memory, tools) to be linked together for multi-step workflows.
- Key Components:
- Sequential and parallel chains
- Predefined chains for common use cases
- Custom pipeline integration
1.3 Tools (tools/
)
- Purpose: Tools (or actions) are external functions that agents or chains can call to perform tasks.
- Key Components:
- Web search
- API requests
- Custom function execution
1.4 Memory (memory/
)
- Purpose: Enables applications to maintain state across interactions.
- Key Components:
- Short-term and long-term memory
- Conversation tracking
- Integration with vector stores
1.5 LLMs (llms/
)
- Purpose: Interfaces for interacting with various language models.
- Key Components:
- OpenAI, Hugging Face, and Anthropic support
- Streaming and batch inference
- Custom API integrations