LangChain
Useful once your AI feature needs more than a single prompt, like RAG with multiple retrievers or multi-step agent logic. Overkill for a simple chat wrapper.
What is LangChain?
LangChain is a framework for building applications that chain together LLM calls, retrieval steps, tools, and memory into more complex flows than a single prompt-response call. It provides abstractions for retrieval-augmented generation (RAG), agents that can call tools and make decisions, and orchestration across multiple LLM calls, along with integrations for a wide range of vector stores, model providers, and data sources.
Key features
- Pre-built abstractions for RAG pipelines: document loaders, text splitters, retrievers, and vector store integrations
- Agent framework for LLM-driven tool use and multi-step reasoning, rather than a single fixed prompt
- Large integration library covering most model providers, vector databases, and common data sources
- LangGraph (built on top) for more explicit control over multi-step, stateful agent workflows
- LangSmith, a separate but connected tool, for tracing and debugging chains and agent runs in production
Who it's for
Teams building AI features that genuinely need multi-step orchestration: RAG over multiple sources, agents making tool calls, or workflows with real branching logic. For a simple chatbot or a single-prompt feature, LangChain's abstractions add complexity without much payoff, and a direct API call is usually simpler to build and debug.
Pricing
The core framework is free and open source. LangSmith, the observability layer, has a free tier with usage-based paid plans on top.