-
Notifications
You must be signed in to change notification settings - Fork 17.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Replace initialize_agent
use with langgraph.prebuilt.create_react_agent
#29277
Comments
I want to try working on this |
@efriis do you expect the changes in the documentation for the tools and integrations using `initialize_agent' listed at the bottom of the page you shared? Such as: |
…mpatibility - Updated code to use `create_react_agent` instead of the deprecated `initialize_agent`. - Removed explicit `AgentType` parameters as they are implicitly supported by `create_react_agent`. - Replaced `verbose=True` with `debug=True` for detailed logging. Partially addresses langchain-ai#29277
Hi everyone, I’ve partially updated the documentation to replace deprecated references to
Additionally, I noticed a recurring pattern in examples, such as: agent.run("what is google's stock") This doesn't inherently print the output of the agent.run command, and I considered adding something like: response = agent.run("what is google's stock")
print(response) to improve clarity for users. However, as this is my first commit, I didn’t want to overstep the scope without further guidance. Let me know if you’d like me to include such improvements! Looking forward to completing the remaining pages soon. |
If no one is working on this issue , can I work on this ? |
I noticed that some parts of the documentation still reference |
## Description - Replaced `initialize_agent`, `AgentType` usage in ainetwork integration - Updated usage example to `create_react_agent` in langgraph ## Issue - #29277 ## Dependencies - N/A ## Twitter handler - I don't use Twitter
…e_generator.ipynb (#30697) ## Description: Replaced deprecated 'initialize_agent' with 'create_react_agent' in dalle_image_generator.ipynb ## Issue: #29277 ## Dependencies: None ## Twitter handle: @Thatopman --------- Co-authored-by: Chester Curme <[email protected]>
Privileged issue
Issue Content
Currently there's a bunch of tools and other integrations that use
initialize_agent
in their docs page (search langchain/docs for "initialize_agent")This function has been deprecated since 0.1 and should be replaced with basic langgraph usage as a demo
Deprecated function: https://python.langchain.com/api_reference/langchain/agents/langchain.agents.initialize.initialize_agent.html
Example page using create_react_agent in an example: https://python.langchain.com/docs/integrations/tools/gmail/#use-within-an-agent
This issue doesn't need to be resolved by a single PR and can be tackled incrementally! Just tag this issue for tracking purposes :)
The text was updated successfully, but these errors were encountered: