[PR #6492] docs: update main README React agent example for LangGraph #5071

Closed
opened 2026-02-20 17:51:11 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/6492

State: closed
Merged: No


The langgraph.prebuilt.create_react_agent import and its prompt= argument were officially deprecated in LangGraph(November 2025). The recommended and maintained path forward is now langchain.agents.create_agent.

This PR updates the primary quickstart example in the README to:

  • Use from langchain.agents import create_agent
  • Replace deprecated prompt= with correct system_prompt=

The example remains functionally identical (still prints "It's always sunny in sf!") but now reflects current best practices and works out-of-the-box with the latest versions of langchain and langgraph.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/6492 **State:** closed **Merged:** No --- The `langgraph.prebuilt.create_react_agent` import and its `prompt=` argument were officially deprecated in LangGraph(November 2025). The recommended and maintained path forward is now `langchain.agents.create_agent`. This PR updates the primary quickstart example in the README to: - Use `from langchain.agents import create_agent` - Replace deprecated `prompt=` with correct `system_prompt=` The example remains functionally identical (still prints "It's always sunny in sf!") but now reflects current best practices and works out-of-the-box with the latest versions of `langchain` and `langgraph`.
yindo added the pull-request label 2026-02-20 17:51:11 -05:00
yindo closed this issue 2026-02-20 17:51:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#5071