-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate agent-architectures notebooks to Langchain v1 #2
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: sammydeprez <14163485+sammydeprez@users.noreply.github.com>
Co-authored-by: sammydeprez <14163485+sammydeprez@users.noreply.github.com>
|
Make use of the new create_agent |
sammydeprez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make use of the new create_agent , I want all the new methods that were made available in v1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the agent-architectures notebooks from Langchain 0.3.x to 1.x and Langgraph 0.6.x to 1.x following the official migration guide. The changes primarily involve updating import statements and package version constraints.
- Updated tool decorator imports from
langchain.toolstolangchain_core.toolsin 3 notebooks - Updated Send class import from
langgraph.constantstolanggraph.typesin 1 notebook - Updated requirements.txt with v1 constraints using range specifiers instead of pinned versions
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| requirements.txt | Updated package versions to use v1 constraints with range specifiers |
| 2_1_tool_call.ipynb | Updated tool import to langchain_core.tools and Unicode degree symbol normalization |
| 2_2_react_agent.ipynb | Updated tool import to langchain_core.tools and Unicode degree symbol normalization |
| 3_routing.ipynb | Updated tool import to langchain_core.tools and Unicode degree symbol normalization |
| 5_parallelism.ipynb | Updated Send import from langgraph.constants to langgraph.types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Added error handling for missing TAVILY_API_KEY in the planner notebook. - Updated execution counts for code cells to reflect changes in execution order. - Fixed undefined 'tools' error by ensuring proper imports and usage in the agent creation. - Updated image rendering method in the notebook for better visualization. - Updated package versions in requirements.txt for langchain and related libraries to ensure compatibility and access to new features.
Migrates all notebooks in
agent-architectures/from Langchain 0.3.x to 1.x and Langgraph 0.6.x to 1.x per the official migration guide.Import Updates
Tool decorator (3 notebooks):
Send class (1 notebook):
END constant: No change required - still valid from
langgraph.graphin v1.Dependency Updates
Updated
requirements.txtwith v1 constraints and proper upper bounds:Files Changed
2_1_tool_call.ipynb- tool import2_2_react_agent.ipynb- tool import3_routing.ipynb- tool import5_parallelism.ipynb- Send importrequirements.txt- package versionsNotebooks 1, 4, 6, 7, 8 already use v1-compatible imports.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.