Agent Framework

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.

4.6
Editor rating
Free (open-source) / LangSmith from $39 mo
Pricing
Agent Framework
Category

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.

Beginner verdict, For developers

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

RAG applicationsLLM agent developmentMulti-step chainsPrototype to production

Pros & cons

✓ Pros

✓Largest community and ecosystem
✓Supports all major LLM providers
✓LangSmith for observability
✓Excellent documentation

✗ What this won't do

✗Abstraction overhead can be frustrating
✗Breaking changes between versions
✗Overkill for simple use cases

Use cases

Building RAG chatbots

Multi-step document processing

Agent tool-use pipelines

Conversational search systems

1

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.

2

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.

3

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.

4

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

ToolCategoryEditor ratingPricing
LangChain (current)Agent Framework4.6Free (open-source) / LangSmith from $39 mo
LangGraphAgent Framework4.5Free (open-source)
CrewAIAgent Framework4.5Free (open-source) / Enterprise pricing
AgnoAgent Framework4.4Free (open-source)

Comparisons