Skip to content

feat(showcase/llamaindex): port langgraph-python demo matrix for parity - #4255

Closed
AlemTuzlak wants to merge 11 commits into
mainfrom
feat/showcase-llamaindex-parity
Closed

AlemTuzlak wants to merge 11 commits into
mainfrom
feat/showcase-llamaindex-parity

Conversation

@AlemTuzlak

@AlemTuzlak AlemTuzlak commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings showcase/packages/llamaindex to feature-matrix parity with showcase/packages/langgraph-python by porting the full portable demo surface of the canonical 36-demo matrix.

  • 27 demos ported (13 in the first commit, 14 in the follow-up commits)
  • 4 demos skipped with rationales in PARITY_NOTES.md
  • Architecture: default / router hosts the shared-tool agent; specialized routers (reasoning, A2UI dynamic/fixed, BYOC json-render, BYOC hashbrown, open-gen-ui, multimodal, agent-config, mcp-apps, tool-rendering-reasoning-chain) live at dedicated subpaths on the FastAPI app. Dedicated Next.js routes (/api/copilotkit-*) expose the specialized runtimes with their respective middleware flags (a2ui.injectA2UITool: false, openGenerativeUI, mcpApps, transcriptionService, onRequest auth hook)

Lands alongside parallel PRs for agno, ag2, langroid, and spring-ai.

Ported (27)

Wave 1 (first commit):
agentic-chat, frontend-tools, frontend-tools-async, hitl-in-chat, hitl-in-app, tool-rendering, tool-rendering-default-catchall, tool-rendering-custom-catchall, gen-ui-tool-based, gen-ui-agent, shared-state-read-write, shared-state-streaming, subagents, prebuilt-sidebar, prebuilt-popup, chat-slots, chat-customization-css, headless-simple, headless-complete, readonly-state-agent-context.

Wave 2 (this continuation):
agentic-chat-reasoning, reasoning-default-render, tool-rendering-reasoning-chain, declarative-gen-ui, a2ui-fixed-schema, byoc-json-render, byoc-hashbrown, auth, voice, agent-config, multimodal, open-gen-ui, open-gen-ui-advanced, mcp-apps.

Each demo ships:

  • src/app/demos/<id>/page.tsx + supporting components
  • Thin agent.py stub under src/app/demos/<id>/
  • A dedicated Python agent module under src/agents/ (or a registration on the shared router)
  • A manifest.yaml entry with highlight paths matching real files
  • A qa/<id>.md plan
  • A tests/e2e/<id>.spec.ts skeleton

Skipped (4, see PARITY_NOTES.md)

  • cli-start — CLI template only, nothing to render in the dojo
  • gen-ui-interrupt — LangGraph interrupt() primitive has no LlamaIndex equivalent
  • interrupt-headless — same primitive as gen-ui-interrupt
  • beautiful-chat — deferred: requires large polished design-system duplication (example-layout, example-canvas, generative-ui charts, suggestion hooks) — better landed as a dedicated follow-up to keep this PR focused on feature parity rather than UI duplication

Partial ports (1)

  • agent-config — The LangGraph graph recomposes its system prompt per turn from RunnableConfig.configurable.properties. get_ag_ui_workflow_router does not yet expose the same hook surface, so the LlamaIndex port applies the default profile at startup. Frontend provider wiring is wired for parity; dynamic per-turn recomposition is tracked as a follow-up in PARITY_NOTES.md.

Test plan

  • npm install and npm run dev in showcase/packages/llamaindex
  • Visit each ported route at /demos/<id> and verify the page loads
  • Smoke-test a representative from each group:
    • agentic-chat-reasoning (reasoning slot)
    • declarative-gen-ui (A2UI dynamic dashboard)
    • a2ui-fixed-schema (flight card)
    • byoc-json-render (sales dashboard JSON spec)
    • byoc-hashbrown ( envelope)
    • auth (401 without token, OK with token)
    • voice (mic button visible, sample audio transcribes)
    • multimodal (image + PDF attachment)
    • open-gen-ui / open-gen-ui-advanced (sandboxed iframe + sandbox function call)
    • mcp-apps (Excalidraw MCP server renders diagram)
  • Verify PARITY_NOTES.md lists every skipped / partial demo with a rationale
  • Confirm manifest.yaml highlight paths resolve to real files

Ports 13 new demos to bring the LlamaIndex showcase package to feature-matrix parity with showcase/packages/langgraph-python. Uses the existing single shared AG-UI workflow router architecture; per-demo agent.py files are thin stubs.

Ported: frontend-tools, frontend-tools-async, hitl-in-chat, hitl-in-app, tool-rendering-default-catchall, tool-rendering-custom-catchall, prebuilt-sidebar, prebuilt-popup, chat-slots, chat-customization-css, headless-simple, headless-complete, readonly-state-agent-context. Skipped demos are documented in PARITY_NOTES.md.
@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:57pm
docs Ready Ready Preview, Comment Apr 24, 2026 5:57pm
form-filling Ready Ready Preview, Comment Apr 24, 2026 5:57pm
research-canvas Ready Ready Preview, Comment Apr 24, 2026 5:57pm
travel Ready Ready Preview, Comment Apr 24, 2026 5:57pm

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

…hain demos

Ports 3 demos from the langgraph-python parity matrix:
- agentic-chat-reasoning: custom amber reasoningMessage slot
- reasoning-default-render: built-in CopilotChatReasoningMessage slot
- tool-rendering-reasoning-chain: sequential tool calls + reasoning slot

Adds two dedicated AG-UI workflow routers (reasoning_agent,
tool_rendering_reasoning_chain_agent) mounted at /reasoning and
/tool-rendering-reasoning-chain subpaths on the agent_server. The Next.js
runtime registers these agent IDs as HttpAgents pointed at the matching
subpath so the distinct system prompts / tool sets surface cleanly.
@AlemTuzlak
AlemTuzlak force-pushed the feat/showcase-llamaindex-parity branch from 079e206 to 5548ab0 Compare April 24, 2026 15:33
AlemTuzlak and others added 3 commits April 24, 2026 18:51
Ports 4 demos from the langgraph-python parity matrix:
- declarative-gen-ui: A2UI dynamic catalog with KPI/Pie/Bar components;
  agent owns generate_a2ui and emits an a2ui_operations container
- a2ui-fixed-schema: pre-authored flight_schema.json; agent streams data
  into the fixed component tree
- byoc-json-render: streaming { root, elements } JSON spec via
  @json-render/react and a Zod-validated catalog
- byoc-hashbrown: streaming <ui>...</ui> envelope via @hashbrownai/react

Adds four dedicated AG-UI workflow routers mounted at /a2ui-dynamic,
/a2ui-fixed, /byoc-json-render, /byoc-hashbrown subpaths on the
agent_server. Each demo has a dedicated Next.js runtime route
(copilotkit-declarative-gen-ui, copilotkit-a2ui-fixed-schema,
copilotkit-byoc-json-render, copilotkit-byoc-hashbrown) so the distinct
system prompts + rendering pipelines stay cleanly separated.

Adds @copilotkit/voice, @json-render/core, @json-render/react,
@radix-ui/react-checkbox, @radix-ui/react-separator, and openai to the
package.json so the new frontends and runtime-level options resolve.
…t-config/mcp-apps

Ports 7 additional demos from the langgraph-python parity matrix:
- auth: bearer-token gate via runtime onRequest hook
- voice: STT via @copilotkit/voice and a bundled sample.wav
- agent-config: provider properties wiring (static default profile;
  dynamic per-turn recomposition tracked in PARITY_NOTES)
- multimodal: image + PDF uploads against gpt-4o vision
- open-gen-ui: single-shot sandboxed iframe via OpenGenerativeUIMiddleware
- open-gen-ui-advanced: same + sandbox-to-host function calling
- mcp-apps: Excalidraw MCP server driven UI via the runtime's mcpApps flag

Adds seven dedicated agent_server subpath mounts (multimodal, open-gen-ui,
open-gen-ui-advanced, mcp-apps, agent-config — plus auth/voice which
reuse the shared default router). Each demo has a dedicated Next.js
runtime route under src/app/api/copilotkit-<id>/.

Updates PARITY_NOTES.md: beautiful-chat is now the only non-interrupt
demo left out (deferred as a design-system-heavy follow-up); all
reasoning/A2UI/BYOC/auth/voice/multimodal/ogui/mcp demos are live.
Port the auth demo fixes from langgraph-python PR #4271:

- Default to the authenticated state on load.

- Add a ChatErrorBoundary that auto-resets on auth flip.

- Invert banner labels (Sign in / Sign out).

- Align QA checklist + Playwright spec.

Keeps the demo usable on first load and exercises the 401 path on demand without white-screening.
Port the byoc-json-render and byoc-hashbrown fixes from

langgraph-python PR #4271:

- byoc-json-render: wrap <Renderer /> in JSONUIProvider and forward

  children through the MetricCard registry wrapper.

- byoc-hashbrown: rewrite the Python system prompt to emit the JSON

  envelope hashbrown's kit.schema expects, and add wire-format doc.
Port the voice route fix from langgraph-python PR #4271:

- Write transcriptionService onto the V2 runtime instance directly

  (V1 wrapper drops it silently).

- Wrap in GuardedOpenAITranscriptionService so a missing OPENAI_API_KEY

  surfaces as a typed AUTH_FAILED (HTTP 401) with a readable body

  instead of an opaque 500.
Port the agent-config wire-contract fix from langgraph-python

PR #4271. Introduces AgentConfigHttpAgent, which mirrors the

LangGraph-side AgentConfigLangGraphAgent by repacking non-structural

forwardedProps keys (the CopilotKit provider's properties) into

forwardedProps.config.configurable.properties before forwarding.

This gives us a consistent wire contract across frameworks; the

Python-side per-turn recomposer remains a follow-up and is now

called out explicitly in PARITY_NOTES.
Port the sample-attachment LFS-pointer guard from langgraph-python

PR #4271: validate fetched samples against magic bytes and detect

Git LFS pointer stubs, throwing a readable actionable error when a

deploy forgot to materialise LFS assets. Re-wraps the buffer with an

explicit MIME type instead of trusting dev-server Content-Type.

Python-side PDF flattening via pypdf is tracked in PARITY_NOTES; the

llamaindex router has no before_model middleware equivalent.
@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-llamaindex-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 – research-canvas — ccd21aea Deployed Apr 24, 2026 by vercel[bot]
Preview – docs — ccd21aea Deployed Apr 24, 2026 by vercel[bot]
Preview – travel — ccd21aea Deployed Apr 24, 2026 by vercel[bot]
Preview – chat-with-your-data — ccd21aea Deployed Apr 24, 2026 by vercel[bot]
Preview – form-filling — ccd21aea 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