Skip to content

Sync migrate skill with updated LangGraph + Strands guides#55

Merged
sattensil merged 2 commits into
mainfrom
sattensil/sync-langgraph-strands-guides
May 6, 2026
Merged

Sync migrate skill with updated LangGraph + Strands guides#55
sattensil merged 2 commits into
mainfrom
sattensil/sync-langgraph-strands-guides

Conversation

@sattensil
Copy link
Copy Markdown
Contributor

Summary

The Strands and LangGraph AI Configs guides in ld-docs-private got 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.

  • Python LangGraph: create_react_agentlangchain.agents.create_agent. langgraph.prebuilt.create_react_agent is deprecated in LangGraph 1.0 and removed in 2.0. Same return shape; only call-site rename is prompt=system_prompt=. Node still uses createReactAgent — no JS deprecation, all Node references preserved.
  • Reference the new ldai_langchain SDK helpers. sum_token_usage_from_messages (token aggregation) and get_tool_calls_from_response (tool-call name extraction) replace the hand-rolled per-message aggregator the skill previously described. Used inside the track_metrics_of_async extractor / loop.
  • Drop redundant trackError after trackMetricsOf in the Node LangGraph example (the wrapper records the error and re-throws). Added the tool_calls walk that the JS guide uses until LangChainProvider.getToolCallsFromResponse ships.

Files touched

  • skills/ai-configs/aiconfig-migrate/SKILL.md — coverage row, sub-step 7 example, Stage 3 grep list, mode-mismatch edge case
  • skills/ai-configs/aiconfig-migrate/references/before-after-examples.md — Example 3 rewritten on create_agent with deprecation callout
  • skills/ai-configs/aiconfig-migrate/references/agent-mode-frameworks.md — coverage table, "one turn" table, prebuilt section, dynamic-tool example
  • skills/ai-configs/aiconfig-migrate/references/phase-1-analysis-checklist.md — provider-imports grep, system-prompt grep, mode-decision table
  • skills/ai-configs/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

Test plan

  • Spot-check a Python create_agent snippet imports cleanly with langchain>=1.0
  • Confirm sum_token_usage_from_messages and get_tool_calls_from_response are exported from ldai_langchain at the version pinned in the skill
  • Re-read SKILL.md and the four references end-to-end for any straggling create_react_agent / prompt= references that should be create_agent / system_prompt=

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).
@sattensil sattensil requested a review from a team as a code owner May 1, 2026 21:51
@sattensil sattensil requested a review from jsonbailey May 1, 2026 21:52
@sattensil sattensil enabled auto-merge (squash) May 1, 2026 21:53
Copy link
Copy Markdown
Contributor

@jsonbailey jsonbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sattensil sattensil disabled auto-merge May 5, 2026 20:23
@sattensil sattensil enabled auto-merge (squash) May 5, 2026 20:24
- 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'.
@sattensil sattensil merged commit 46ec1f2 into main May 6, 2026
2 checks passed
@sattensil sattensil deleted the sattensil/sync-langgraph-strands-guides branch May 6, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants