[GH-ISSUE #2473] [langchain]: Replace deprecated initialize_agent with create_agent in multiple Python integration examples #304

Closed
opened 2026-02-17 17:19:36 -05:00 by yindo · 2 comments
Owner

Originally created by @tar-ang-2004 on GitHub (Feb 4, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/2473

Type of issue

issue / bug

Language

Python

Description

Several Python integration examples in the docs still use initialize_agent, which is deprecated in favor of create_agent.

Example file:
docs/src/oss/python/integrations/tools/nasa.mdx

There appear to be many other integration examples with the same pattern (search results show around 30+ matches).

This can confuse new users, since the deprecated API is being demonstrated in official documentation.

Suggested fix:
Replace usages of initialize_agent with create_agent and update the corresponding imports/examples.

Happy to submit a PR if this direction is correct.

Originally created by @tar-ang-2004 on GitHub (Feb 4, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/2473 ### Type of issue issue / bug ### Language Python ### Description Several Python integration examples in the docs still use `initialize_agent`, which is deprecated in favor of `create_agent`. Example file: docs/src/oss/python/integrations/tools/nasa.mdx There appear to be many other integration examples with the same pattern (search results show around 30+ matches). This can confuse new users, since the deprecated API is being demonstrated in official documentation. Suggested fix: Replace usages of `initialize_agent` with `create_agent` and update the corresponding imports/examples. Happy to submit a PR if this direction is correct.
yindo added the langchainexternal labels 2026-02-17 17:19:36 -05:00
yindo closed this issue 2026-02-17 17:19:36 -05:00
Author
Owner

@mdrxy commented on GitHub (Feb 4, 2026):

create_react_agent is also deprecated - we should be using create_agent

@mdrxy commented on GitHub (Feb 4, 2026): `create_react_agent` is also deprecated - we should be using [`create_agent`](https://reference.langchain.com/python/langchain/agents/)
Author
Owner

@tar-ang-2004 commented on GitHub (Feb 4, 2026):

create_react_agent is also deprecated - we should be using create_agent

Thanks for the clarification! I’ll update the example to use create_agent and will push a revision shortly.

@tar-ang-2004 commented on GitHub (Feb 4, 2026): > `create_react_agent` is also deprecated - we should be using [`create_agent`](https://reference.langchain.com/python/langchain/agents/) Thanks for the clarification! I’ll update the example to use create_agent and will push a revision shortly.
yindo changed title from [langchain]: Replace deprecated initialize_agent with create_agent in multiple Python integration examples to [GH-ISSUE #2473] [langchain]: Replace deprecated initialize_agent with create_agent in multiple Python integration examples 2026-06-05 17:26:12 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#304