# langchain

> langchain is an open-source agent framework for ai models and llm tooling. Python library for building agents from a model, tools, prompt and middleware. It is available on CLI and API.

- **Kind:** Agent
- **Pricing:** Open source
- **Platforms:** CLI, API
- **Website:** https://docs.langchain.com/langchain/
- **Repository:** https://github.com/langchain-ai/langchain
- **GitHub stars:** 149,722
- **License:** MIT
- **Categories:** AI models and LLM tooling, multi-agent frameworks
- **Listing updated:** 2026-11-14

## About

LangChain's current entry point is create_agent, a small configurable harness. You pass a model identifier, a list of tools and a system prompt, and middleware lets you adjust behaviour around it. The docs show the same few lines working with OpenAI, Google Gemini, Anthropic and OpenRouter models through provider-specific install extras.

It is one part of a wider family: LangSmith covers tracing, evaluation and debugging, and LangSmith Deployment hosts agents, while related libraries cover more complex orchestration. The repository is Python and MIT-licensed, so using the library itself costs nothing; the hosted LangSmith products are separate.

## Features

- **create_agent harness:** Minimal function for assembling an agent.
- **Provider extras:** Install support for OpenAI, Google GenAI, Anthropic or OpenRouter models.
- **Tool calling:** Plain Python functions can be passed as tools.
- **Middleware:** Customise agent behaviour around the model loop.
- **LangSmith integration:** Tracing, evaluation and debugging through a separate service.

## Good for

- Build a tool-calling assistant in a few lines of Python
- Switch the same agent between model providers
- Add tracing and evaluation to a production agent

## FAQ

### What licence does it use?

MIT.

### Which providers appear in the quickstart?

OpenAI, Google Gemini, Anthropic and OpenRouter.

### What is LangSmith?

A separate product for tracing, evaluation and deployment.

### Is langchain free?

Yes. langchain is open source, so you can use and self-host it for free.

### What are the best alternatives to langchain?

The closest alternatives to langchain are AutoGPT, hermes-agent, deepseek-harness, dify and gemini-cli.

## Alternatives

- [AutoGPT](https://ai-powered.com/agents/autogpt-2): AutoGPT is a hosted agent for ai models and llm tooling.
- [hermes-agent](https://ai-powered.com/agents/hermes-agent): hermes-agent is a freemium open-source agent for ai models and llm tooling.
- [deepseek-harness](https://ai-powered.com/agents/deepseek-harness): deepseek-harness is an open-source agent for multi-agent frameworks.
- [dify](https://ai-powered.com/agents/dify): dify is a freemium agent framework for workflow automation.
- [gemini-cli](https://ai-powered.com/agents/gemini-cli): gemini-cli is an open-source agent for ai models and llm tooling.
- [deer-flow](https://ai-powered.com/agents/deer-flow): deer-flow is an open-source agent for ai models and llm tooling.
- [ruflo](https://ai-powered.com/agents/ruflo-2): ruflo is an open-source agent framework for knowledge and memory.
- [learn-claude-code](https://ai-powered.com/agents/learn-claude-code): learn-claude-code is an open-source hosted agent for ai models and llm tooling.

---
Source: https://ai-powered.com/agents/langchain
