Skip to content

01-tutorials - [Content Improvement] LangGraph tutorial uses deprecated create_react_agent API #804

@mo7amed7assan1911

Description

@mo7amed7assan1911

Which component is impacted by this improvement?

  • 01-AgentCore-runtime
  • 02-AgentCore-gateway
  • 03-AgentCore-identity
  • 04-AgentCore-memory
  • 05-AgentCore-tools
  • 06-AgentCore-observability
  • 07-AgentCore-E2E

Improvement Description
A clear and concise description of the improvement.

The existing tutorial using-langgraph-agent-hooks in 04-AgentCore-memory/02-long-term-memory/01-single-agent/ uses:

  • create_react_agent
  • pre_model_hook / post_model_hook parameters

These are deprecated in LangGraph v1.0.

Impact:

  • Users following the tutorial encounter deprecation warnings
  • Code may break in future LangGraph versions
  • No example exists for the new middleware pattern

Suggested Improvement:
Add a new tutorial demonstrating LangGraph v1.0 approach using create_agent with @before_model / @after_model middleware decorators.

I have a working implementation ready to submit as a PR.

Metadata

Metadata

Assignees

Labels

01-tutorials01-tutorialsdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions