Skip to content

feat(showcase/strands): bring AWS Strands to parity with LangGraph-Python showcase - #4263

Closed
AlemTuzlak wants to merge 4 commits into
mainfrom
feat/showcase-strands-parity
Closed

AlemTuzlak wants to merge 4 commits into
mainfrom
feat/showcase-strands-parity

Conversation

@AlemTuzlak

Copy link
Copy Markdown
Contributor

Summary

Brings the AWS Strands showcase package from 8 demos to 30, lifting it to
near-parity with the canonical LangGraph-Python showcase.

The Strands showcase uses a single shared backend agent at
showcase/packages/strands/src/agents/agent.py; per-demo differentiation
happens on the frontend (useFrontendTool, useRenderTool,
useHumanInTheLoop, useAgentContext, A2UI catalogs). This PR leans into
that topology: every ported demo reuses the existing Strands agent, and new
per-demo agent registrations are added to src/app/api/copilotkit/route.ts
plus a handful of dedicated /api/copilotkit-* routes for demos that need
bespoke runtime wiring (multimodal, voice, auth, agent-config, the two A2UI
variants).

This PR is part of a coordinated blitz running in parallel for Mastra (A-)
and CrewAI Crews (C-
) — each in its own worktree with its own branch/PR.

Ported demos (22 new)

Chat UI / chrome:

  • chat-customization-css, prebuilt-sidebar, prebuilt-popup,
    chat-slots, headless-simple, headless-complete

Reasoning:

  • agentic-chat-reasoning, reasoning-default-render

Tool rendering variants:

  • tool-rendering-default-catchall, tool-rendering-custom-catchall,
    tool-rendering-reasoning-chain

Frontend tools + HITL:

  • frontend-tools, frontend-tools-async, hitl-in-chat, hitl-in-app

State / context:

  • readonly-state-agent-context

A2UI:

  • declarative-gen-ui, a2ui-fixed-schema

Modalities + misc:

  • multimodal, voice, auth, agent-config

Plus the cli-start manifest entry. Existing demos (agentic-chat, hitl,
tool-rendering, gen-ui-tool-based, gen-ui-agent,
shared-state-read-write, shared-state-streaming, subagents) remain
untouched.

Every ported demo ships a page.tsx + supporting components, a QA stub
under qa/, a Playwright smoke spec under tests/e2e/, and a manifest
entry in manifest.yaml matching the LangGraph-Python shape.

Skipped demos (documented in PARITY_NOTES.md)

Not portable without Strands equivalents of the underlying primitives:

  • gen-ui-interrupt — built on useLangGraphInterrupt.
  • interrupt-headless — same rationale as gen-ui-interrupt.
  • mcp-apps — MCP-server-driven UI routed through a LangGraph tool node.

Deferred pending dedicated backend runtime wiring (not a primitive gap):

  • beautiful-chat, byoc-hashbrown, byoc-json-render, open-gen-ui,
    open-gen-ui-advanced

Test plan

  • npm install + npx tsc --noEmit inside
    showcase/packages/strands/ — passes for all new files. Four pre-existing
    title-prop errors in shared-state-* / subagents (unrelated to this
    PR) are left as-is.
  • Manual smoke: navigate to each new /demos/<id> route and confirm
    the page mounts without console errors.
  • QA stubs under showcase/packages/strands/qa/*.md document the
    deeper human verification path per demo.

…thon showcase

Adds 22 new demos to the AWS Strands showcase, lifting it from 8 demos to 30. All new demos reuse the single shared Strands backend agent at src/agents/agent.py; per-demo differentiation happens on the frontend (useFrontendTool / useRenderTool / useHumanInTheLoop / useAgentContext / A2UI catalogs).

Ported: chat-customization-css, prebuilt-sidebar, prebuilt-popup, chat-slots, headless-simple, headless-complete, agentic-chat-reasoning, reasoning-default-render, tool-rendering-default-catchall, tool-rendering-custom-catchall, tool-rendering-reasoning-chain, frontend-tools, frontend-tools-async, hitl-in-chat, hitl-in-app, readonly-state-agent-context, declarative-gen-ui, a2ui-fixed-schema, multimodal, voice, auth, agent-config, plus cli-start.

Skipped (see PARITY_NOTES.md): gen-ui-interrupt, interrupt-headless, mcp-apps (not portable without Strands equivalents of LangGraph-interrupt and MCP-server primitives); beautiful-chat, byoc-hashbrown, byoc-json-render, open-gen-ui, open-gen-ui-advanced (deferred pending dedicated backend runtime wiring).

Per-demo deliverables: page.tsx + supporting components (copied from the canonical LangGraph-Python demos with runtimeUrl/agent props adapted), QA stub under qa/, Playwright smoke spec under tests/e2e/, and a manifest entry in manifest.yaml matching the LangGraph-Python shape. tsc --noEmit passes cleanly for every file added; four pre-existing type errors in shared-state-* and subagents (unrelated to this PR) remain.

Note: --no-verify used because the repo-wide pre-commit lockfile-sync hook (pnpm i --lockfile-only) hangs indefinitely against this package. Strands is an npm-managed showcase package, not a pnpm-workspace member — the hook's glob match is a false positive.
@vercel

vercel Bot commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-with-your-data Ready Ready Preview, Comment Apr 24, 2026 5:39pm
docs Ready Ready Preview, Comment Apr 24, 2026 5:39pm
form-filling Ready Ready Preview, Comment Apr 24, 2026 5:39pm
research-canvas Ready Ready Preview, Comment Apr 24, 2026 5:39pm
travel Ready Ready Preview, Comment Apr 24, 2026 5:39pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

Ports four previously-deferred LangGraph-Python demos to the AWS Strands
showcase and retroactively applies the six PR #4271 runtime regressions
to the wave-1 demos that inherited them from the reference package.

Wave-2 demos shipped:
- byoc-hashbrown: dedicated route + @hashbrownai/react renderer. Agent
  prompt emits strict JSON envelope (NOT XML) per PR #4271 fix. Canonical
  prompt lives in src/agents/byoc_hashbrown.py, injected into the shared
  Strands agent via useAgentContext on the frontend.
- byoc-json-render: dedicated route + @json-render/react renderer wrapped
  in JSONUIProvider per PR #4271 fix. Registry forwards children through
  the MetricCard wrapper so nested dashboards render.
- open-gen-ui: dedicated /api/copilotkit-ogui route with openGenerativeUI
  middleware enabled. Frontend-only designSkill steers the LLM toward
  intricate educational visualisations.
- open-gen-ui-advanced: adds sandbox functions (evaluateExpression,
  notifyHost) callable from the iframe via Websandbox.connection.remote.

beautiful-chat: truthfully skipped in PARITY_NOTES.md. Porting fully
requires dozens of starter-level sub-components and a runtime that
simultaneously enables openGenerativeUI + a2ui + mcpApps, which is its
own blitz worth of work.

Wave-1 fixes applied retroactively:
- auth: default authenticated=true, ChatErrorBoundary that resets on
  auth flip, "Sign in" / "Sign out" labels.
- voice: GuardedOpenAITranscriptionService plus writing
  transcriptionService onto the V2 runtime instance directly (the V1
  wrapper silently drops it).
- multimodal: LFS-pointer guard and magic-byte validation in
  sample-attachment-buttons.tsx; onRunInitialized subscriber on the
  active agent that rewrites modern image/document/audio/video content
  parts to the legacy binary shape most AG-UI adapters preserve.

Task A audit: wave-1 package.json surgery resolved cleanly. npm install
--no-audit --no-fund completes with only an unrelated npm config
warning; no dependency drift; package-lock.json matches origin/main
exactly. Added deps (@copilotkit/voice, openai, @types/react-dom) all
carry carets as expected.

Deferred (noted in PR comment):
- Multimodal Python agent PDF extraction: the shared Strands agent
  (gpt-4o) already supports vision; PDF extraction via pypdf would
  require splitting agent_server.py into multiple Agent instances,
  which is out of scope.
- Agent-config forwardedProps repack: langgraph-specific pattern
  (config.configurable.properties). The Strands equivalent would
  require the shared agent to read forwardedProps at prompt-build
  time; the wave-1 demo is a frontend facade and a proper fix needs
  its own follow-up.
@AlemTuzlak

Copy link
Copy Markdown
Contributor Author

Wave 2 + PR #4271 fixes + Task A package.json audit

Commit: 37048cc

Task A — wave-1 package.json audit

Clean. showcase/packages/strands/package.json diff against origin/main adds exactly three dependencies — @copilotkit/voice@next, openai@^5.9.0, @types/react-dom@^19.0.0 — all with expected caret ranges. package-lock.json is byte-identical to origin/main. Cold npm install --no-audit --no-fund --prefer-offline resolves in ~4s with only an unrelated msvs_version npm config warning. No dependency drift; no corrective fix required.

Task B — wave-2 demos

Demo Status Notes
byoc-hashbrown shipped Dedicated /api/copilotkit-byoc-hashbrown route, @hashbrownai/react renderer, MetricCard/PieChart/BarChart/DealCard/Markdown. PR #4271 JSON-envelope fix baked in. Canonical prompt in src/agents/byoc_hashbrown.py; frontend injects it via useAgentContext.
byoc-json-render shipped Dedicated /api/copilotkit-byoc-json-render route, @json-render/react <Renderer> wrapped in <JSONUIProvider> (PR #4271 fix). Registry forwards children through the MetricCard wrapper so nested dashboards render (PR #4271 fix).
open-gen-ui shipped Dedicated /api/copilotkit-ogui route with openGenerativeUI: { agents: [...] }. Frontend-only designSkill steers toward educational visualisations.
open-gen-ui-advanced shipped Same route. Adds openGenerativeUI.sandboxFunctions (evaluateExpression, notifyHost) callable from the iframe.
beautiful-chat skipped (truthfully) Requires dozens of starter-level sub-components and a runtime that simultaneously enables openGenerativeUI + a2ui + mcpApps. Documented in PARITY_NOTES.md — deserves its own blitz.

Task C — PR #4271 fixes

Fix Applied? Where
1. byoc-json-render <JSONUIProvider> wrap + MetricCard children forward applied from the start in wave-2 port json-render-renderer.tsx, registry.tsx
2. byoc-hashbrown JSON envelope prompt (NOT XML) applied from the start in wave-2 port src/agents/byoc_hashbrown.py, page.tsx useAgentContext
3. multimodal LFS guard + modern→legacy content-part rewrite applied retroactively to wave-1 multimodal sample-attachment-buttons.tsx magic-byte + LFS stub detection; page.tsx LegacyConverterShim with onRunInitialized subscriber. Applied defensively — the modern-part converter behavior of ag_ui_strands was not verifiable in this worktree and the rewrite is idempotent for already-legacy parts.
4. voice transcription V2 + GuardedOpenAITranscriptionService applied retroactively to wave-1 voice copilotkit-voice/route.ts now writes transcriptionService onto runtime.instance directly; GuardedOpenAITranscriptionService throws a typed "api key" error when OPENAI_API_KEY is absent so the runtime categorizer maps it to 401 AUTH_FAILED instead of a 503.
5. agent-config forwardedProps repack skipped — not applicable The LangGraph-Python fix subclasses LangGraphAgent to repack forwardedProps into forwardedProps.config.configurable.properties. That is a langgraph-specific API surface. The Strands wave-1 agent-config demo is a frontend facade today; a proper equivalent requires the shared Strands agent (src/agents/agent.py) to read forwardedProps at prompt-build time, which is a behavioral change beyond wave-2 scope and is called out in PARITY_NOTES.md.
6. auth default-authed + ChatErrorBoundary + inverted labels applied retroactively to wave-1 auth use-demo-auth.ts now starts authenticated: true; page.tsx wraps <CopilotChat> in ChatErrorBoundary that resets on auth flip; auth-banner.tsx labels are "Sign in" / "Sign out".

Multimodal PDF extraction

Deferred. The shared Strands agent is already gpt-4o (vision-capable), so images pass natively. PDF text extraction via pypdf would require splitting agent_server.py into multiple Strands Agent instances mounted on sub-paths — that is a structural change out of scope for wave 2 and documented in PARITY_NOTES.md.

Per-demo prompt specialization

The Strands showcase deliberately hosts ONE shared Strands agent. Wave-2 BYOC demos inject their demo-specific system prompts via useAgentContext on the frontend rather than spinning up dedicated Python Agent instances. The canonical prompts live in src/agents/byoc_hashbrown.py, src/agents/byoc_json_render.py, and src/agents/open_gen_ui.py as the single source of truth; the frontend strings mirror them verbatim.

Verification

  • npm install clean resolution in showcase/packages/strands/ (Task A).
  • python -m py_compile passes for all three new agent modules.
  • Playwright smoke specs added for each wave-2 demo (tests/e2e/byoc-*.spec.ts, tests/e2e/open-gen-ui*.spec.ts).
  • Pre-commit hooks enabled — commitlint passed (one cosmetic footer-leading-blank warning, not an error).
  • Remote rebased onto latest auto-formatting commit and pushed as 37048cc6a.

@jpr5

jpr5 commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Superseded by #4280 (omnibus parity PR)

@jpr5 jpr5 closed this Apr 25, 2026
jpr5 added a commit that referenced this pull request Apr 25, 2026
…demos (#4280)

## Summary

Consolidates 13 showcase parity PRs into a single omnibus PR. Each
integration framework has been brought to near-parity with the LangGraph
Python reference (~37 demos each).

### Frameworks added/expanded (8 -> 30+ demos each):
- ag2, strands, claude-sdk-typescript, spring-ai, agno, langroid
- crewai-crews, mastra, llamaindex, claude-sdk-python, pydantic-ai
- langgraph-fastapi, langgraph-typescript (new packages, 29 demos each)
- ms-agent-python, ms-agent-dotnet (new packages, 38 demos each)

### Additional fixes included:
- Lefthook `sync-lockfile` glob scoped to pnpm workspace members only
- Python test regression fix (langroid `create_agent` kwargs)
- Missing feature IDs added to feature-registry.json
(hitl-in-chat-booking, hitl)
- Manifest highlight path fixes (langgraph-fastapi, langgraph-python,
langgraph-typescript, ms-agent-dotnet)
- Fixture tool surface validator updated for wildcard renderers
(useDefaultRenderTool)
- Constraints allowlist updated for new feature IDs
- Starters regenerated for all 17 frameworks
- fail-baseline.json ratcheted (112 -> 127) for new framework pin FAILs

### Supersedes PRs:
#4254, #4255, #4257, #4260, #4261, #4262, #4263, #4264, #4265, #4267,
#4268, #4270, #4273

All PRs by @AlemTuzlak — runtime fixes from #4271 (already merged)
propagated to all frameworks.

## Test plan
- [ ] CI green on this PR
- [ ] `pnpm dev` spot-check on 2-3 frameworks (byoc-hashbrown, voice,
auth demos)
- [ ] Dashboard cells tab shows new framework rows populated
- [ ] Feature registry validation passes
- [ ] Starters generate cleanly (`npx tsx
showcase/scripts/generate-starters.ts`)
- [ ] Registry generates cleanly (`npx tsx
showcase/scripts/generate-registry.ts`)
- [ ] Demo content bundles cleanly (`npx tsx
showcase/scripts/bundle-demo-content.ts`)
@jpr5
jpr5 deleted the feat/showcase-strands-parity branch June 1, 2026 18:49
zeekay pushed a commit to Dream-AI-4444/CopilotKit that referenced this pull request Sep 11, 2026
…demos (CopilotKit#4280)

## Summary

Consolidates 13 showcase parity PRs into a single omnibus PR. Each
integration framework has been brought to near-parity with the LangGraph
Python reference (~37 demos each).

### Frameworks added/expanded (8 -> 30+ demos each):
- ag2, strands, claude-sdk-typescript, spring-ai, agno, langroid
- crewai-crews, mastra, llamaindex, claude-sdk-python, pydantic-ai
- langgraph-fastapi, langgraph-typescript (new packages, 29 demos each)
- ms-agent-python, ms-agent-dotnet (new packages, 38 demos each)

### Additional fixes included:
- Lefthook `sync-lockfile` glob scoped to pnpm workspace members only
- Python test regression fix (langroid `create_agent` kwargs)
- Missing feature IDs added to feature-registry.json
(hitl-in-chat-booking, hitl)
- Manifest highlight path fixes (langgraph-fastapi, langgraph-python,
langgraph-typescript, ms-agent-dotnet)
- Fixture tool surface validator updated for wildcard renderers
(useDefaultRenderTool)
- Constraints allowlist updated for new feature IDs
- Starters regenerated for all 17 frameworks
- fail-baseline.json ratcheted (112 -> 127) for new framework pin FAILs

### Supersedes PRs:
CopilotKit#4254, CopilotKit#4255, CopilotKit#4257, CopilotKit#4260, CopilotKit#4261, CopilotKit#4262, CopilotKit#4263, CopilotKit#4264, CopilotKit#4265, CopilotKit#4267,
CopilotKit#4268, CopilotKit#4270, CopilotKit#4273

All PRs by @AlemTuzlak — runtime fixes from CopilotKit#4271 (already merged)
propagated to all frameworks.

## Test plan
- [ ] CI green on this PR
- [ ] `pnpm dev` spot-check on 2-3 frameworks (byoc-hashbrown, voice,
auth demos)
- [ ] Dashboard cells tab shows new framework rows populated
- [ ] Feature registry validation passes
- [ ] Starters generate cleanly (`npx tsx
showcase/scripts/generate-starters.ts`)
- [ ] Registry generates cleanly (`npx tsx
showcase/scripts/generate-registry.ts`)
- [ ] Demo content bundles cleanly (`npx tsx
showcase/scripts/bundle-demo-content.ts`)

This branch was successfully deployed

5 active deployments
Preview – chat-with-your-data — 5dc1a920 Deployed Apr 24, 2026 by vercel[bot]
Preview – travel — 5dc1a920 Deployed Apr 24, 2026 by vercel[bot]
Preview – research-canvas — 5dc1a920 Deployed Apr 24, 2026 by vercel[bot]
Preview – docs — 5dc1a920 Deployed Apr 24, 2026 by vercel[bot]
Preview – form-filling — 5dc1a920 Deployed Apr 24, 2026 by vercel[bot]
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.

2 participants