officialrepo

langchain-ai/langchain

★ 150k starsPythonPublic
View on GitHub ↗

A community setup & usage guide for the LangChain GitHub repository. Official repo: langchain-ai/langchain

The agent engineering platform / framework for LLM apps.

What is LangChain?

LangChain is a framework for building LLM-powered applications and agents — chains, tools, retrieval (RAG), memory and integrations with many providers and vector stores. Available for Python and JavaScript.

Installation

  1. Install (Python)
    pip install -U langchain
  2. Add a provider package, e.g. OpenAI
    pip install -U langchain-openai
  3. JavaScript / TypeScript
    npm install langchain
Verify
python -c "import langchain; print(langchain.__version__)"

Usage

Import in Python
from langchain.chat_models import init_chat_model
Build a chain or agent
# compose prompts, tools, and models

Before you start

Python 3.9+ (or Node.js for the JS version). Provider API keys as needed.

Official repository: github.com/langchain-ai/langchain

FAQ

Python or JavaScript?

Both are supported as separate packages with similar concepts.

Do I need LangSmith?

No — it's optional observability tooling, not required to use LangChain.

Where is the official LangChain GitHub repository?

The official LangChain GitHub repo is hosted at github.com/langchain-ai/langchain. This page links straight to it and summarises how to install and use LangChain.

Is this the official LangChain repo?

No. officialrepo.com is an independent community guide. The official LangChain GitHub repository is github.com/langchain-ai/langchain — always treat that repo and its documentation as the source of truth.

This is an independent community guide. LangChain and its logo are trademarks of their respective owner; officialrepo.com is not affiliated with or endorsed by the project or GitHub, Inc. The link above points to the genuine official repository.