# LangChain — card for AI agents

A framework for building LLM applications and agents from composable parts: model integrations, tools, retrievers and prebuilt agent abstractions. Available for Python and JavaScript.

Maker: LangChain · category: Agent frameworks and SDKs · open source (MIT)

## Price
- LangChain is open source and free to use; you pay only for the models and infrastructure it runs on.
- Free tier: yes
- Checked: 2026-11-05

## Install
- npm: `npm install langchain`
- PyPI: `pip install langchain`

## Facts
- Interfaces: Python library, JavaScript library
- Repository: https://github.com/langchain-ai/langchain

## Numbers (AgentGid data)
- Gid Score: 79 (rank #4) (public popularity and activity, not quality)
- Downloads last 7 days: 41,122,115
- GitHub stars: 149,864

## Details (plan limits, live status, safety; from AgentGid's data)
LangChain by LangChain. Category: Agent frameworks and SDKs. Type: LLM application framework. A framework for building LLM applications and agents from composable parts: model integrations, tools, retrievers and prebuilt agent abstractions. Available for Python and JavaScript. Open source (MIT) Pricing (checked 2026-11-05): LangChain is open source and free to use; you pay only for the models and infrastructure it runs on. Free tier: yes. Interfaces: Python library, JavaScript library Supports: mcp, local, multi_agent Data: Gid Score 79/100, #4 overall; #1 in its category; 149,864.0 GitHub stars; usage -3% over 30 days; latest release 1.5.2 (2026-11-18).

## Alternatives in the same category
- LangGraph: https://agentgid.com/agents/langgraph/agent.md
- AI SDK: https://agentgid.com/agents/vercel-ai-sdk/agent.md
- Claude Agent SDK: https://agentgid.com/agents/claude-agent-sdk/agent.md
- Mastra: https://agentgid.com/agents/mastra/agent.md
- OpenAI Agents SDK: https://agentgid.com/agents/openai-agents-sdk/agent.md
- Deep Agents: https://agentgid.com/agents/deepagents/agent.md

## Links
- AgentGid page: https://agentgid.com/agents/langchain/

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.

## LangChain: build your own AI agent in Python

LangChain is a free, open-source Python library for building your own AI agent or AI feature. Your code picks a model, such as OpenAI, Anthropic or Google, and gives it tools, like functions it may call. You need Python and an account with a model provider; LangChain itself does not run models.

### Where to use it
- An assistant that calls your functions: Give a model a few of your own functions, such as a weather lookup, and let it decide when to call them.
- Switch model companies without a rewrite: Try OpenAI, then Anthropic or Google, by changing one model name, while everything else in your agent stays the same.
- Ask a person before risky actions: Pause the agent before it writes a file or runs a database query, and let a person approve, edit or reject it.
- Answer questions from your own documents: Build a help bot that looks up your private or recent documents and answers from them.
- See every step your agent took: Turn on tracing to view each prompt, tool call and answer of your agent in LangSmith when something goes wrong.

### How to start
- Install LangChain (Python 3.10 or newer per the docs; the 1.5.0 package on PyPI asks for 3.11+).

```
pip install -U langchain
```

- Install the package for your model provider, for example OpenAI or Anthropic.

```
pip install -U langchain-openai
pip install -U langchain-anthropic
```

- Create an agent with create_agent, a model name and your tools (see the first use above).

### License
LangChain is free and open source under the MIT license, so you may use it in paid and closed products. You pay the model provider you use; LangSmith tracing is an optional paid service with a free tier.

### Good to know
- It is a toolkit for programmers; there is no app to open. Your AI coding assistant writes the Python code with it.
- Each model company needs its own add-on package and its own account and key.
- An agent can do whatever its keys and tools allow, including deleting data. The docs advise read-only access and running inside a container.
- For more control over steps, memory and pauses, the makers point to LangGraph; for a ready-made planner, to Deep Agents.

Checked 2026-11-18 against: https://www.langchain.com, https://www.langchain.com/pricing, https://docs.langchain.com/oss/python/langchain/overview.md, https://docs.langchain.com/oss/python/langchain/install.md, https://docs.langchain.com/oss/python/langchain/quickstart.md, https://docs.langchain.com/oss/python/langchain/agents.md, https://docs.langchain.com/oss/python/langchain/rag.md, https://docs.langchain.com/oss/python/langchain/observability.md, https://docs.langchain.com/oss/python/langchain/human-in-the-loop.md, https://docs.langchain.com/oss/python/security-policy.md, https://github.com/langchain-ai/langchain/blob/master/README.md, https://github.com/langchain-ai/langchain/blob/master/LICENSE, https://pypi.org/pypi/langchain/json
