Skip to content
masterclass Buddy

AI Tools · Class

StateGraph

The @ai-sdk/langchain adapter connects LangChain and LangGraph with AI SDK UI. It converts messages and streams between the two formats.

Last updated

Syntax

pnpm add @ai-sdk/langchain @langchain/core

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • toBaseMessages
  • toUIMessageStream
  • LangGraph
  • streamEvents
  • StateGraph
  • MessagesAnnotation
  • createUIMessageStreamResponse

Source: LangChain | AI SDK Adapters. Checked 2026-11-03.