Skip to content

Cannot Import creat_react_agent from langgraph.prebuilt #3969

Description

@adv-11

Checked other resources

  • This is a bug, not a usage question. For questions, please use GitHub Discussions.
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

Example Code

from langgraph.prebuilt import create_react_agent

langgraph_agent_executor = create_react_agent(model, tools)


messages = langgraph_agent_executor.invoke({"messages": [("human", query)]})
{
    "input": query,
    "output": messages["messages"][-1].content,
}

Error Message and Stack Trace (if applicable)

ImportError: cannot import name 'create_react_agent' from 'langgraph.prebuilt' (unknown location)

Description

from langgraph.prebuilt import create_react_agent
ImportError: cannot import name 'create_react_agent' from 'langgraph.prebuilt' (unknown location)

System Info

from langgraph.prebuilt import create_react_agent
ImportError: cannot import name 'create_react_agent' from 'langgraph.prebuilt' (unknown location)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions