Skip to content
AgentAgent framework

langchain

Python library for building agents from a model, tools, prompt and middleware

Pricing
Open source
Platforms
CLI, API
GitHub stars
150K
Last commit
today
Language
Python
License
MIT

About langchain

langchain is an open-source agent framework for ai models and llm tooling. It is available on CLI and API.

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.

What it does

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

A2A skills

  • langchain

    Use when building agents, workflows, and AI applications. Reach for

Agent card: https://docs.langchain.com/.well-known/agent-card.json

Pricing

Open source

MIT licence; LangSmith services are separate

Prices change. Check docs.langchain.com before you buy.

langchain 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 to langchain

  1. AutoGPT

    Agent

    Hosted team of AI Experts for content, sales and research, coordinated by Otto

    • Free trial
    • Hosted agent
    • 188K GitHub stars
    • AI models and LLM tooling
  2. Open-source self-improving agent with memory, scheduling and many chat gateways

    • Freemium
    • Open-source agent
    • 264K GitHub stars
    • AI models and LLM tooling
  3. Open-source agent harness from DeepSeek, built on a plugin architecture

    • Open source
    • Open-source agent
    • 282K GitHub stars
    • Multi-agent frameworks
  4. dify

    Agent

    Visual platform for building and deploying agentic workflows and knowledge pipelines

    • Freemium
    • Agent framework
    • 161K GitHub stars
    • Workflow automation
  5. Open-source terminal agent for Gemini Code Assist workflows on Google Cloud

    • Open source
    • Open-source agent
    • 109K GitHub stars
    • AI models and LLM tooling
  6. Open-source super agent harness that researches, codes and creates with sandboxes

    • Open source
    • Open-source agent
    • 85.4K GitHub stars
    • AI models and LLM tooling