LangChain

1.0.x · active · verified Sat Feb 28

LangChain is an orchestration framework for building LLM-powered applications and agents. It provides abstractions for chaining model calls, tool use, memory, and multi-agent coordination. As of v1.0, LangGraph is the foundational runtime for stateful agent execution.

Warnings

Install

Imports

Quickstart

Minimal LLM call using ChatOpenAI in LangChain 1.0.

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(model='gpt-4o', temperature=0)
response = llm.invoke('What is the capital of France?')
print(response.content)

view raw JSON →