Sync migrate skill with updated LangGraph + Strands guides#55
Merged
Conversation
The Strands and LangGraph AI Configs guides moved on three points after the 0.17/0.18 SDK skill update landed; bring the migrate skill back in line with each: - Python LangGraph: switch from langgraph.prebuilt.create_react_agent (deprecated in LangGraph 1.0, removed in 2.0) to langchain.agents.create_agent. Same return shape; only call-site rename is prompt= -> system_prompt=. Node still uses createReactAgent. - Reference the SDK helpers ldai_langchain.sum_token_usage_from_messages and get_tool_calls_from_response inside the track_metrics_of_async extractor instead of describing a hand-rolled per-message aggregator. - Drop the redundant trackError after trackMetricsOf in the Node LangGraph example (the wrapper records the error and re-throws); add the tool_calls walk that the JS guide uses until LangChainProvider ships getToolCallsFromResponse. Files touched: SKILL.md (coverage row, sub-step 7 example, Stage 3 grep, edge case), before-after-examples.md (Example 3 rewritten on create_agent), agent-mode-frameworks.md (coverage table, "one turn" table, prebuilt section, dynamic-tool example), phase-1-analysis- checklist.md (provider grep, system-prompt grep, mode-decision table), aiconfig-ai-metrics/references/langchain-tracking.md (Python LangGraph example switched to create_agent + helper-based track_metrics_of_async; Node example annotated for trackError drop and tool_calls walk).
jsonbailey
approved these changes
May 4, 2026
Contributor
jsonbailey
left a comment
There was a problem hiding this comment.
LGTM. We might consider removing all the "deprecated" mentions in here once we ship 1.0. There are so few using these old versions I think it can clutter things.
- Add Phase 1 audit Section 4 'External prompt files & registries' so
YAML/JSON/TOML/Markdown/.prompt files and registry pulls (LangChain
hub, LangSmith) are scanned alongside code-side imports and string
literals. Code-only grep had been missing prompts that live in
CrewAI agents.yaml, ConfigMap overlays, Pydantic Settings classes,
etc.
- Add explicit coverage totals to the Phase 1 output ('N hardcoded
targets, M externalized files, K registry pulls') so under-detection
surfaces as a number the user can react to.
- Replace the open-ended 'wait for confirmation' STOP with four
enumerated reply forms (confirm / add: / fix: / stop). Bare 'skip'
was being interpreted as 'skip the Stage-1 confirmation and proceed
to Stage 2'.
jfong-ld
approved these changes
May 6, 2026
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.
Summary
The Strands and LangGraph AI Configs guides in
ld-docs-privategot three substantive updates on 2026-04-27, after the 0.17/0.18 SDK skill update (#51) landed. This PR brings the migrate skill back in sync.create_react_agent→langchain.agents.create_agent.langgraph.prebuilt.create_react_agentis deprecated in LangGraph 1.0 and removed in 2.0. Same return shape; only call-site rename isprompt=→system_prompt=. Node still usescreateReactAgent— no JS deprecation, all Node references preserved.ldai_langchainSDK helpers.sum_token_usage_from_messages(token aggregation) andget_tool_calls_from_response(tool-call name extraction) replace the hand-rolled per-message aggregator the skill previously described. Used inside thetrack_metrics_of_asyncextractor / loop.trackErroraftertrackMetricsOfin the Node LangGraph example (the wrapper records the error and re-throws). Added thetool_callswalk that the JS guide uses untilLangChainProvider.getToolCallsFromResponseships.Files touched
skills/ai-configs/aiconfig-migrate/SKILL.md— coverage row, sub-step 7 example, Stage 3 grep list, mode-mismatch edge caseskills/ai-configs/aiconfig-migrate/references/before-after-examples.md— Example 3 rewritten oncreate_agentwith deprecation calloutskills/ai-configs/aiconfig-migrate/references/agent-mode-frameworks.md— coverage table, "one turn" table, prebuilt section, dynamic-tool exampleskills/ai-configs/aiconfig-migrate/references/phase-1-analysis-checklist.md— provider-imports grep, system-prompt grep, mode-decision tableskills/ai-configs/aiconfig-ai-metrics/references/langchain-tracking.md— Python LangGraph example switched tocreate_agent+ helper-basedtrack_metrics_of_async; Node example annotated fortrackErrordrop andtool_callswalkTest plan
create_agentsnippet imports cleanly withlangchain>=1.0sum_token_usage_from_messagesandget_tool_calls_from_responseare exported fromldai_langchainat the version pinned in the skillcreate_react_agent/prompt=references that should becreate_agent/system_prompt=