Home/LangChain
LangChain open-source AI agent framework icon

LangChain

LangChain is an open-source framework and engineering ecosystem for creating model-powered agents with tools, retrieval, structured output, state, middleware, tracing, evaluation, and production deployment.

Visit website
LangChain ecosystem for building, evaluating, and deploying reliable agents

Product overview

What is LangChain?

LangChain is an open-source framework for building agents and applications around language models. Its agent abstraction connects a model to tools and lets it choose and sequence calls, while integrations cover model providers, retrieval systems, vector stores, MCP servers, and other application services. Developers can add structured output, state, context, middleware, retries, and human review to make behavior more controlled.

The broader LangChain ecosystem includes LangGraph for low-level stateful orchestration, Deep Agents for long-running work, and LangSmith for tracing, evaluation, deployment, sandboxes, and production monitoring. Teams can use the open-source framework independently or add the hosted platform when they need managed operations.

How to Use LangChain

  1. Choose a supported model and install the relevant provider integration.
  2. Define the tools the agent may call and validate their inputs.
  3. Create the agent with instructions, structured output, and application context.
  4. Add retrieval when answers must use private or domain-specific data.
  5. Introduce middleware, persistence, approval gates, and limits for risky actions.
  6. Trace and evaluate representative tasks before deploying to users.

Core Features

  • Agent framework: Connects models to tools and manages iterative tool calls.
  • Provider integrations: Works with multiple model, database, retrieval, and service providers.
  • Structured output: Returns validated application-ready data instead of only free-form text.
  • Retrieval and RAG: Grounds agents in indexed documents and external knowledge.
  • Middleware and context: Adds guardrails, dynamic prompts, state, and custom control logic.
  • MCP support: Uses compatible tool servers through a standard interface.
  • LangSmith integration: Adds observability, evaluation, deployment, and monitoring.

Use Cases

  • Create research, support, coding, and document-processing agents.
  • Add tool-using assistants to existing applications.
  • Build RAG systems over company documents and databases.
  • Return structured records for downstream automation.
  • Test, observe, and deploy agent workflows with LangSmith.

Pricing

The LangChain framework is open source. LangSmith has a Developer plan at $0 per seat per month with up to 5,000 base traces and pay-as-you-go usage after the included amount. Plus is $39 per seat per month plus metered usage, while Enterprise uses custom pricing. Model-provider charges are separate.

Frequently Asked Questions

Is LangChain a hosted AI agent?

No. LangChain is primarily a framework used to build an agent. LangSmith supplies optional hosted engineering and deployment services.

LangChain provides higher-level agent building blocks, while LangGraph exposes lower-level state and orchestration control beneath many LangChain agents.

Does using tools require safeguards?

Yes. Tool permissions, input validation, approval gates, timeouts, and testing are important whenever an agent can change external systems.

Back to product directory

Related products

OpenAI Codex is an AI coding product for delegating scoped repository tasks and reviewing the resulting changes.

Claude Code is Anthropic’s AI coding product for iterative repository work through supported development surfaces.

Gemini CLI is Google’s open-source AI agent for terminal workflows and local development tasks.

Newsletter

Keep up with useful AI products

Get a concise selection of new products, practical use cases, and builder updates.