[GH-ISSUE #986] [langgraph]: cannot import name 'BaseMessage' from 'langchain.messages' in Quickstart example #124

Closed
opened 2026-02-17 17:19:14 -05:00 by yindo · 0 comments
Owner

Originally created by @mcavdar on GitHub (Oct 18, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/986

Type of issue

issue / bug

Language

Python

Description

Hi, I'm following the quickstart guide at https://docs.langchain.com/oss/python/langgraph/quickstart

When I run the following code from the docs:

from langchain.messages import (
    SystemMessage,
    HumanMessage,
    BaseMessage,
    ToolCall,
)

I get this error:
ImportError: cannot import name 'BaseMessage' from 'langchain.messages'

It seems that BaseMessage have been moved to langchain_core. Do we need to update the doc with the correct import path?

Originally created by @mcavdar on GitHub (Oct 18, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/986 ### Type of issue issue / bug ### Language Python ### Description Hi, I'm following the quickstart guide at https://docs.langchain.com/oss/python/langgraph/quickstart When I run the following code from the docs: ``` from langchain.messages import ( SystemMessage, HumanMessage, BaseMessage, ToolCall, ) ``` I get this error: `ImportError: cannot import name 'BaseMessage' from 'langchain.messages'` It seems that BaseMessage have been moved to langchain_core. Do we need to update the doc with the correct import path?
yindo added the langgraph label 2026-02-17 17:19:14 -05:00
yindo closed this issue 2026-02-17 17:19:14 -05:00
yindo changed title from [langgraph]: cannot import name 'BaseMessage' from 'langchain.messages' in Quickstart example to [GH-ISSUE #986] [langgraph]: cannot import name 'BaseMessage' from 'langchain.messages' in Quickstart example 2026-06-05 17:25:11 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#124