Skip to content

showcase(D6): structural LGP frontend parity for 9 baseline integrations - #5127

Merged
jpr5 merged 7 commits into
mainfrom
blitz/d6-baselines/integration
May 31, 2026
Merged

jpr5 merged 7 commits into
mainfrom
blitz/d6-baselines/integration

Conversation

@jpr5

@jpr5 jpr5 commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary (DRAFT — for scope review)

Mirrors the langgraph-python (LGP) gold-reference frontend onto the 9 baseline integrations — structural parity, not full D6-green (see Scope below).

Integrations: mastra, agno, langroid, strands, spring-ai, ag2, crewai-crews, llamaindex, langgraph-fastapi

What this does:

  • Mirrors LGP's src/app/demos/** (+ _shared/), src/components/ui/** (25 shadcn primitives), src/lib/utils.ts, and the manifest-driven homepage src/app/page.tsx verbatim into each baseline.
  • Aligns package.json deps to LGP; pins @copilotkit/* to exact 1.59.2.
  • Bumps the Dojo reference (examples/integrations/*) @copilotkit/* to 1.59.2 so showcase == Dojo and validate-pins drift retires properly (not a baseline hash-bump).
  • Fixes the manifest.yaml SSG Docker build (strands/spring-ai/llamaindex) — same fix as pydantic-ai in showcase(D6): CST/pydantic page-mirror + MAF toolCallId parity + pydantic build fix #5125.
  • Backend / API layer preserved untouched (route.ts, agent servers, Java/Mastra runtimes).

Scope — what this is NOT

This is structural parity. It does not make the baselines D6-green. Measured on langroid: most features pass, but ~7 stay red (gen-ui-agent, subagents, frontend-tools, gen-ui-declarative, gen-ui-headless-complete, tool-rendering-custom-catchall, beautiful-chat). These are backend-behavior reds — the mirrored LGP pages expect agent-emitted state/tool/gen-ui events that each baseline's (different-framework) backend doesn't implement. Greening them requires per-framework backend work (and some demos aren't feasible per framework) — intentionally out of scope here.

🤖 Generated with Claude Code

@vercel

vercel Bot commented May 31, 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 May 31, 2026 6:08pm
docs Ready Ready Preview, Comment May 31, 2026 6:08pm
form-filling Ready Ready Preview, Comment May 31, 2026 6:08pm
research-canvas Ready Ready Preview, Comment May 31, 2026 6:08pm
travel Ready Ready Preview, Comment May 31, 2026 6:08pm

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

@github-actions

github-actions Bot commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 27 services digest-pinned.

Run 2026-05-31 11:06:22 PDT — 0 finding(s).

jpr5 added 4 commits May 31, 2026 10:39
Page-mirror the langgraph-python gold reference (demo pages + _shared/ +
src/components/ui shadcn primitives + src/lib/utils.ts + manifest-driven
homepage) into mastra, agno, langroid, strands, spring-ai, ag2,
crewai-crews, llamaindex, langgraph-fastapi. Align deps to LGP and pin
@copilotkit/* to exact 1.59.2. Backend / API-layer (route.ts, agent
servers, Java/Mastra runtimes) preserved untouched.

Known follow-up: agent-slug conveyance gaps (mirrored LGP demos reference
slugs each integration's route.ts registers under different names) — to be
measured + addressed per integration.
…nds/spring-ai/llamaindex

The mirrored LGP homepage prerenders / and reads manifest.yaml at build
time; these 3 baselines use an explicit COPY of config files that omitted
manifest.yaml, breaking SSG export (same fix as pydantic-ai in #5125). The
other 6 baselines copy the dir wholesale and already include it.
Wire the set_steps state-card tool into each framework's existing
state-snapshot primitive so the (already-mirrored) gen-ui-agent demo can
drive [data-testid=agent-state-card] + agent-step rows:
- agno: state-aware AGUI route (StateSnapshotEvent)
- ag2: ContextVariables + ReplyResult via AGUIStream (dedicated sub-app)
- llamaindex: get_ag_ui_workflow_router backend_tools + StateSnapshotWorkflowEvent
- strands: ag_ui_strands ToolBehavior(state_from_args)
- crewai-crews: dedicated GenUiAgentFlow + copilotkit_emit_state
- mastra: working-memory STATE_SNAPSHOT (genUiAgent + setStepsTool)
- langroid: raw-OpenAI loop emitting TOOL_CALL_* + STATE_SNAPSHOT
- spring-ai: GenUiAgentController set_steps FunctionToolCallback + route override
Frontend (mirrored) untouched; route.ts slug overridden per integration.
@jpr5
jpr5 marked this pull request as ready for review May 31, 2026 18:11
@jpr5
jpr5 merged commit 5f4d876 into main May 31, 2026
35 checks passed
@jpr5
jpr5 deleted the blitz/d6-baselines/integration branch May 31, 2026 18:12
jpr5 added a commit that referenced this pull request Jun 1, 2026
…5141)

## Summary

Adds the 5 missing LGP-canonical e2e specs to each of the 9 baseline
integrations and removes 2 orphan specs that point at zero-file demos.

- Adds 5 canonical e2e specs (`declarative-hashbrown`,
`declarative-json-render`, `reasoning-custom`, `reasoning-default`,
`threadid-frontend-tool-roundtrip`) to each of the 9 baseline
integrations (`ag2`, `agno`, `crewai-crews`, `langgraph-fastapi`,
`langroid`, `llamaindex`, `mastra`, `spring-ai`, `strands`) — 45 specs
total, **byte-identical** to the `langgraph-python` canonical gold
source. The matching demos already existed from #5127's page-mirror, but
the specs themselves were never copied across.
- Deletes 2 orphan specs that reference demos with zero backing files:
`shared-state-write` (×9) and `reasoning-default-render` (×8).
- `validate-parity.ts` reports **19 pass / 0 fail**. The other 15
frameworks were already clean.
- Note: `claude-sdk-python` has the same orphan-spec condition and is
left for a future sweep (out of scope here).

## Test plan

- [x] Parity validator (`validate-parity.ts`) green: 19/0.
- [ ] Real signal: the added cells running green in a clean staging d6
run.
huangyingting pushed a commit to repomesh/CopilotKit that referenced this pull request Jun 1, 2026
reasoning-default-render.spec.ts and shared-state-write.spec.ts navigate to
/demos/reasoning-default-render and /demos/shared-state-write respectively,
but neither demo directory exists in any integration (including the
langgraph-python gold reference) and neither is declared in any manifest.
They are stale, non-canonical leftovers from the CopilotKit#5127 page-mirror.

Removed from all baselines where present: reasoning-default-render from 8
(langgraph-fastapi never had it) and shared-state-write from all 9. The
parity validator stays green (0 fail) and langgraph-fastapi's prior
spec-under-coverage warning clears once its phantom spec is gone and the 5
canonical specs are added.
tylerslaton added a commit that referenced this pull request Jul 10, 2026
…emos (OSS-451) (#5881)

## What

Adds the three missing per-demo CopilotKit runtime routes in the Mastra
showcase integration:

- `src/app/api/copilotkit-a2ui-fixed-schema/route.ts`
- `src/app/api/copilotkit-declarative-gen-ui/route.ts`
- `src/app/api/copilotkit-agent-config/route.ts`

Fixes [OSS-451](https://linear.app/copilotkit/issue/OSS-451) — three
demos are **dead on load** in production (`showcase-mastra-production`).

## Why (root cause)

Each of these demo pages sets `<CopilotKit
runtimeUrl="/api/copilotkit-<demo>">`, but those route handlers were
**never created** in the Mastra integration — the pages were mirrored
verbatim from the `langgraph-python` north-star (which *does* have
per-demo routes) without porting the backend routes. The client's
runtime-info fetch 404'd → `runtime_info_fetch_failed` → the page never
mounted. Deterministic, reproduces on every plain page load.

`git log --all` confirms these route dirs have **0 commits ever** in
Mastra; they arrived via the omnibus parity PRs #4280 / #5127.

## Approach

Dedicated routes, mirroring the proven `copilotkit-beautiful-chat`
pattern rather than repointing the pages at the shared
`/api/copilotkit`. This is required for the two A2UI demos: they pass a
client-side catalog, which makes the runtime default `injectA2UITool` to
`true`, but `weatherAgent` already owns its own `generate_a2ui` tool —
serving them from the shared route would **double-bind** the tool. So
the A2UI routes set `injectA2UITool: false` and pin `defaultCatalogId`
to the catalog the page registers (avoids "Catalog not found").
`agent-config` is a plain runtime that registers the exact agent id the
page requests (`agent-config-demo`).

Zero page edits — the pages already point at these routes.

## Scope

Page-load / 404 only, matching the ticket's explicit scope. These agents
currently alias `weatherAgent` (consistent with how every other Mastra
demo currently runs); **full behavioral parity** (dedicated Mastra
agents that emit real A2UI operations / honor agent-config context) is
tracked under OSS-381.

## Verification

- `next build` compiles all three into the route manifest
(`.next/server/app/api/copilotkit-*/route.js`).
- Runtime smoke against the built server: `POST` to each new route
returns **400** (route resolves, handler runs) — identical to the
flagship `copilotkit-beautiful-chat` — vs **404** for a nonexistent
route. No `getLocalAgent returned null` init error.
- Recommend a click-through in an aimock/real-LLM env before locking D5
regression coverage.

## Follow-ups (not in this PR)
- `declarative-hashbrown` / `declarative-json-render` are broken the
same way but are `status: unshipped` (non-navigable); they + the
`manifest.yaml` `byoc-*` drift need reconciling before they can flip to
`wired`.
- Preventing recurrence (a page→route/agent invariant in the pre-merge
gate) ships as a **separate PR**.

This branch was successfully deployed

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

1 participant