docs: add missing agent imports in AWS and Neo4j provider examples - #5792
Open
SpiliosDmk (SpiliosDimakopoulos) wants to merge 1 commit into
Open
Conversation
Two code examples call an agent-creation function that is never imported in the snippet, so copying them as-is raises NameError. - providers/aws.mdx: two Bedrock AgentCore toolkit examples call create_react_agent(...) without importing it. Added 'from langgraph.prebuilt import create_react_agent'. - providers/neo4j.mdx: the Neo4jSaver checkpoint example calls create_agent(...) without importing it. Added 'from langchain.agents import create_agent'. Same class of fix as PR langchain-ai#1619 (add missing import).
Contributor
|
Thanks for opening a docs PR, SpiliosDmk (@SpiliosDimakopoulos)! When it's ready for review, please add the relevant reviewers:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two integration provider pages call an agent-creation function that
is never imported in the code sample, so copying the example as-is
raises NameError.
src/oss/python/integrations/providers/aws.mdx
Two Bedrock AgentCore toolkit examples (browser + code interpreter)
call
create_react_agent(...)without importing it.Added:
from langgraph.prebuilt import create_react_agentsrc/oss/python/integrations/providers/neo4j.mdx
The Neo4jSaver checkpointer example calls
create_agent(...)without importing it.
Added:
from langchain.agents import create_agentWhy
Both symbols are used but never defined/imported anywhere else on
the page, so running the snippet as written fails immediately.
Same bug class as #1619 ("add missing import"), which was merged
for a different page.
Type of change
3-line, docs-only change, no functional impact outside the code samples.