← All recipes
Moderne licensed

Find create_react_agent usage (replace with create_agent)

Recipe IDorg.openrewrite.python.migrate.langchain.FindLangchainCreateReactAgentArtifactopenrewrite-migrate-python

Find from langgraph.prebuilt import create_react_agent which should be replaced with from langchain.agents import create_agent in LangChain v1.0.

Single recipepython1.0langchainmigrationProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.python.migrate.langchain.FindLangchainCreateReactAgent

If the recipe isn’t available locally, install it with:

mod config recipes pip install openrewrite-migrate-python