Deprecation message for langgraph.prebuilt.create_react_agent has a wrong suggestion #1046

Closed
opened 2026-02-20 17:42:53 -05:00 by yindo · 4 comments
Owner

Originally created by @ilnarkhasanov on GitHub (Nov 6, 2025).

When I import langgraph.prebuilt.create_react_agent, I get the following deprecation message:

create_react_agent has been moved to langchain.agents. Please update your import to from langchain.agents import create_agent.

However, there is no create_agent in langchain.agents:
Image

I consider this as a documentation bug and offer my help in fixing this. Specifically, I suggest to change the text to the following:

create_react_agent has been moved to langchain.agents. Please update your import to from langchain.agents import create_react_agent.

Originally created by @ilnarkhasanov on GitHub (Nov 6, 2025). When I import langgraph.prebuilt.create_react_agent, I get the following deprecation message: > create_react_agent has been moved to `langchain.agents`. Please update your import to `from langchain.agents import create_agent`. However, there is no `create_agent` in `langchain.agents`: <img width="389" height="47" alt="Image" src="https://github.com/user-attachments/assets/eb9c1dfe-7979-46bb-88a5-df24a63ba4d9" /> I consider this as a documentation bug and offer my help in fixing this. Specifically, I suggest to change the text to the following: > create_react_agent has been moved to `langchain.agents`. Please update your import to `from langchain.agents import create_react_agent`.
yindo closed this issue 2026-02-20 17:42:53 -05:00
Author
Owner

@ilnarkhasanov commented on GitHub (Nov 6, 2025):

@nfcampos can you verify this issue, please?

@ilnarkhasanov commented on GitHub (Nov 6, 2025): @nfcampos can you verify this issue, please?
Author
Owner

@le-codeur-rapide commented on GitHub (Nov 7, 2025):

Hello,
create_agent is a new function of langchain.agents, maybe run pip install -U langchain to fix your issue

@le-codeur-rapide commented on GitHub (Nov 7, 2025): Hello, `create_agent` is a new function of `langchain.agents`, maybe run `pip install -U langchain` to fix your issue
Author
Owner

@sydney-runkle commented on GitHub (Nov 7, 2025):

You'll need LC > v1 :)

@sydney-runkle commented on GitHub (Nov 7, 2025): You'll need LC > v1 :)
Author
Owner

@tockenga commented on GitHub (Nov 18, 2025):

Maybe an answer that is easier to understand. You need to upgrade to LangChain v1.0 to be able to use this import statement.
Check out these docs regarding this issue:
https://docs.langchain.com/oss/python/releases/langchain-v1
https://docs.langchain.com/oss/python/releases/langchain-v1#create-agent
Here is a migration guide: https://docs.langchain.com/oss/python/migrate/langchain-v1

@tockenga commented on GitHub (Nov 18, 2025): Maybe an answer that is easier to understand. You need to upgrade to LangChain v1.0 to be able to use this import statement. Check out these docs regarding this issue: https://docs.langchain.com/oss/python/releases/langchain-v1 https://docs.langchain.com/oss/python/releases/langchain-v1#create-agent Here is a migration guide: https://docs.langchain.com/oss/python/migrate/langchain-v1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#1046