Skip to content
Obedience ART
← All Open-Source AI Picks
GitHub preview card for langchain-ai/langchain

Build AI apps

LangChain

The most used framework for wiring language models to your own data, tools and apps.

Rank
#3
Stars
149k
Licence
MIT
Checked
6 Nov 2026

What it does

LangChain gives Python and JavaScript developers one standard way to talk to many model providers (OpenAI, Anthropic, Google, local Ollama models and more), plus ready-made parts for chatbots, searching your own documents and building agents that call tools. Its sister project LangGraph handles agents that need memory and multiple steps.

How to use it

Shell: PowerShell (Windows 11, Python 3.10+, Ollama installed for a free local model)

  1. Install LangChain and the Ollama integration.

    pip install -U langchain langchain-ollama
  2. Save this as hello.py: it sends a prompt to a local model, so no API key or cost.

    from langchain.chat_models import init_chat_model
    model = init_chat_model("ollama:llama3.2")
    print(model.invoke("Explain a VPC in one sentence").content)
  3. Run it.

    python hello.py

Best practices

  • Pin package versions in requirements.txt. LangChain moves fast and minor releases can change APIs.
  • Keep API keys in environment variables (for example $env:OPENAI_API_KEY), never in your code or Git.
  • Start with a plain model call and add chains or agents only when you need them; extra layers make bugs harder to find.
  • Turn on tracing (LangSmith or your own logging) so you can see every prompt and tool call when an answer goes wrong.

In the news

View langchain-ai/langchain on GitHub