


LangChain
The most popular framework for building LLM applications
LangChain is the most widely adopted framework for building LLM-powered applications, with 85K+ GitHub stars. It provides chains, agents, retrieval, and memory abstractions for Python and JavaScript.
Editor rating is our overall editorial judgment of the tool, out of 5. It is not a test score and not a user-review average. Ratings have not been re-scored since the tool was listed here. The reasons are in Best for and Pros & cons below.
Requires some technical comfort with API keys, command line, or coding. If you're new to AI, start with a chat-based tool first.
Best for
Pros & cons
✓ Pros
✗ What this won't do
Use cases
Building RAG chatbots
Multi-step document processing
Agent tool-use pipelines
Conversational search systems
Install LangChain
You need Python 3.11 or newer. Install with pip install -U langchain, then set your model key, for example OPENAI_API_KEY.
Build a small agent
Import create_agent from langchain.agents and give it a model, a tool and a system prompt. The quickstart's tool is get_weather, which returns a weather line for a city.
Ask it a question
Call agent.invoke with the message "What's the weather in San Francisco?" The agent uses your tool, and you print the last message to read its answer.
Load keys from a file
Setting keys by hand in every terminal is easy to forget. Put them in a .env file and load it with load_dotenv() from python-dotenv.
Compare alternatives
| Tool | Category | Editor rating | Pricing |
|---|---|---|---|
| LangChain (current) | Agent Framework | 4.6 | Free (open-source) / LangSmith from $39 mo |
| LangGraph | Agent Framework | 4.5 | Free (open-source) |
| CrewAI | Agent Framework | 4.5 | Free (open-source) / Enterprise pricing |
| Agno | Agent Framework | 4.4 | Free (open-source) |