Full-Code · Orchestration Frameworksactive

LangChain

Type: full-code · Vendor: LangChain Inc. · Language: Python, TypeScript · License: MIT · Status: active · Status in practice: mature · First released: 2022

Links: homepage docs repo

Provide a standard, model-agnostic Python/TypeScript interface plus a prebuilt agent (create_agent) for building LLM applications that loop over tool calls in the ReAct shape, with first-class integrations for retrieval, structured output, MCP tools, and middleware-based human approval.

Description. LangChain is the MIT-licensed agent and LLM-application framework built by LangChain Inc., the same company that ships LangGraph and LangSmith. In its 1.x form the headline surface is create_agent, a prebuilt agent that runs a chat model in a ReAct loop over a developer-supplied list of tools, stopping when the model emits a final answer or an iteration limit is reached. The framework ships standard integrations for models, embeddings, vector stores, retrievers, MCP servers, and content-block citations; orchestration concerns beyond the loop (durable state, interrupts, multi-agent graphs) are delegated to LangGraph, which create_agent compiles down to internally.

Agent loop shape. ReAct tool-calling loop. The model is bound to a tool list; runtime alternates model-emit-tool-calls and tool-execute steps, and stops on final-answer-or-iteration-limit. Middleware hooks run before/after model and tool calls inside the compiled LangGraph that create_agent returns.

Primary use cases

  • ReAct-shape agents calling provider-agnostic models and tools
  • RAG via retrievers + cross-encoder reranking + EnsembleRetriever
  • structured-output agents with ProviderStrategy / ToolStrategy
  • MCP-tool integration via langchain-mcp-adapters

Key concepts

  • create_agent react (docs)Prebuilt ReAct-style agent constructor that binds a model to a tool list and loops.
  • Tool / @tool tool-use (docs)Callable functions with well-defined inputs and outputs passed to a chat model.
  • response_format (structured output) structured-output (docs)Schema-driven structured output via ProviderStrategy (native) or ToolStrategy (tool-call emulation).
  • Middleware (docs)Hooks running inside the compiled LangGraph that create_agent returns; used for HITL, summarization, custom guards.
  • Retriever (docs)Interface returning documents given an unstructured query; integrations for many vector stores, BM25, Pinecone Hybrid Search, etc.
  • RunnableWithFallbacks (.with_fallbacks) fallback-chain (docs)Runnable that falls back to other Runnables on failure; fallbacks tried in order.

Patterns this full-code implements —

Neighbourhood

Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.

Anti-patterns avoided

Alternatives & relatives

Listed as alternative by (15)

References

Provenance

  • Last analyzed:
  • Last updated:
  • Verification status: needs-verification