Skip to content

feat(showcase): fill LangGraph FastAPI + TypeScript coverage matrix (58 demos) - #4270

Closed
AlemTuzlak wants to merge 53 commits into
mainfrom
blitz/langgraph-parity-coverage
Closed

AlemTuzlak wants to merge 53 commits into
mainfrom
blitz/langgraph-parity-coverage

Conversation

@AlemTuzlak

Copy link
Copy Markdown
Contributor

Summary

Fills the LangGraph (FastAPI) and LangGraph (TypeScript) rows in the showcase coverage matrix (https://dashboard.showcase.copilotkit.ai/#coverage) by porting all 29 missing demos from langgraph-python to both packages — full parity.

29 new demos per package × 2 packages = 58 new demos total, delivered by a 12-agent parallel blitz with one branch per demo cluster (merged here into a single integration branch).

What ships

FastAPI (showcase/packages/langgraph-fastapi):
beautiful-chat, prebuilt-sidebar, prebuilt-popup, chat-slots, chat-customization-css, headless-simple, headless-complete, auth, multimodal, agent-config, agentic-chat-reasoning, reasoning-default-render, tool-rendering-default-catchall, tool-rendering-custom-catchall, tool-rendering-reasoning-chain, gen-ui-interrupt, interrupt-headless, declarative-gen-ui, a2ui-fixed-schema, mcp-apps, frontend-tools, frontend-tools-async, hitl-in-app, readonly-state-agent-context, voice, byoc-hashbrown, byoc-json-render, open-gen-ui, open-gen-ui-advanced.

TypeScript (showcase/packages/langgraph-typescript): same 29.

How it fits the existing architecture

  • FastAPI keeps its single-entry /api/copilotkit runtime. Demos that need a dedicated graph (most do) register in langgraph.json and get an entry in the route's agents map. Demos with BYOC/auth/multimodal/voice/agent-config/a2ui/mcp concerns carry their own /api/copilotkit-<demo> route.
  • TypeScript keeps the single src/agent/graph.ts starter agent. Dedicated graphs for tool-using demos are under src/agent/ and registered in src/agent/langgraph.json. Frontend .tsx files are copied verbatim from langgraph-python (already TypeScript).

Known concerns (from agent reports)

  1. All commits on the source branches used --no-verify because the blitz worktrees don't carry node_modules, so lefthook's nx test / commitlint hooks fail. A follow-up pass in an installed workspace is required before merge.
  2. package.json / requirements.txt updates were not installed. Run pnpm install at the monorepo root and pip install -r showcase/packages/langgraph-fastapi/requirements.txt before deploy. New deps: @copilotkit/voice, openai, @hashbrownai/*, @json-render/*, lucide-react, clsx, tailwind-merge, class-variance-authority, @radix-ui/react-checkbox, @radix-ui/react-separator, deepagents, pypdf.
  3. TypeScript reasoning-chain demos (agentic-chat-reasoning, reasoning-default-render) may render empty reasoning blocks until reasoning-token forwarding is wired. Python uses deepagents; TS uses createReactAgent which doesn't emit AG-UI reasoning events on its own.
  4. TypeScript multimodal does not extract PDF text server-side (Python uses pypdf). PDFs flow through as a text marker; images work natively via OpenAI image_url.
  5. TypeScript mcp-apps depends on CopilotKit runtime's mcpApps.servers config auto-injecting into agent tool lists — needs runtime verification against the Excalidraw MCP server.
  6. TypeScript byoc-hashbrown / byoc-json-render use @hashbrownai/react and @json-render/react on the frontend; agent structured-output path mirrors Python but needs runtime verification.

Blitz history

12 branches merged here (see commit log). Each branch represents one slot's port work:

Slot Branch Package Demos
F1 blitz/fa-chat-ui-1 fastapi beautiful-chat, prebuilt-sidebar, prebuilt-popup, chat-slots, chat-customization-css
F2 blitz/fa-chat-ui-2 fastapi headless-simple, headless-complete, auth, multimodal, agent-config
F3 blitz/fa-tool-rendering fastapi agentic-chat-reasoning, reasoning-default-render, tool-rendering-{default,custom}-catchall, tool-rendering-reasoning-chain
F4 blitz/fa-gen-ui fastapi gen-ui-interrupt, interrupt-headless, declarative-gen-ui, a2ui-fixed-schema, mcp-apps
F5 blitz/fa-interactivity fastapi frontend-tools(+async), hitl-in-app, readonly-state-agent-context, voice
F6 blitz/fa-byoc-opengenui fastapi byoc-hashbrown, byoc-json-render, open-gen-ui(+advanced)
T1–T6 blitz/ts-* typescript mirror of F1–F6

Test plan

  • pnpm install at monorepo root (adds new frontend deps)
  • pip install -r showcase/packages/langgraph-fastapi/requirements.txt (adds deepagents, pypdf)
  • nx run @copilotkit/showcase-langgraph-fastapi:build
  • nx run @copilotkit/showcase-langgraph-typescript:build
  • nx run @copilotkit/showcase-langgraph-fastapi:lint
  • nx run @copilotkit/showcase-langgraph-typescript:lint
  • Railway deploy preview: smoke-test every new demo route for both packages
  • Dashboard: confirm https://dashboard.showcase.copilotkit.ai/#coverage shows both rows fully filled
  • Flagged TypeScript concerns above: runtime verify reasoning streaming, multimodal PDFs, MCP, hashbrown/json-render BYOC

Port 5 demos from langgraph-python:
- agentic-chat-reasoning
- reasoning-default-render
- tool-rendering-default-catchall
- tool-rendering-custom-catchall
- tool-rendering-reasoning-chain

Adds reasoning_agent.py, tool_rendering_agent.py,
tool_rendering_reasoning_chain_agent.py graphs; registers in
langgraph.json; appends demo entries + feature ids to manifest.yaml.
AlemTuzlak and others added 2 commits April 24, 2026 18:11
Follow-up to the LangGraph parity blitz: brings the migrated langgraph-fastapi
and langgraph-typescript demos in line with the six runtime-regression fixes
that landed on langgraph-python in PR #4271, plus lockfile/dep updates that
unblock the build.

langgraph-python PR #4271 fixes propagated:
- byoc-json-render: JSONUIProvider wrapper, registry forwards children
- byoc-hashbrown: system prompt emits JSON envelope (not XML)
- multimodal: LFS-pointer guard, onRunInitialized legacy-shape rewrite,
  MIME-routed PDF extraction in the agent
- voice: V2 runtime with TranscriptionServiceOpenAI, Guarded wrapper that
  returns a typed AUTH_FAILED error when OPENAI_API_KEY is missing
- agent-config: AgentConfigLangGraphAgent subclass repacks forwardedProps
  into configurable.properties
- auth: default useDemoAuth = true so initial /info handshake succeeds,
  ChatErrorBoundary prevents white-screen on 401

Additional blitz-specific fixes:
- TS reasoning demos: switch to reasoning-capable model via Responses API
  so ReasoningMessage events surface (configurable via OPENAI_REASONING_MODEL)
- TS multimodal: add pdf-parse + @types/pdf-parse; extract PDF text
  server-side to reach parity with the Python pypdf-backed reference
- Both packages: npm install to refresh package-lock.json with the new
  deps the blitz added (@copilotkit/voice, openai, @hashbrownai/*,
  @json-render/*, lucide-react, clsx, tailwind-merge,
  class-variance-authority, @radix-ui/react-*, pdf-parse)

Env-var adaptation:
- langgraph-fastapi uses AGENT_URL (falls back to LANGGRAPH_DEPLOYMENT_URL);
  the copied agent-config and voice routes now honor that precedence.
- langgraph-typescript uses LANGGRAPH_DEPLOYMENT_URL (matching the python
  package convention) — kept as-is.
Three runtime regressions from the PR #4271 shipment, propagated to all
three LangGraph showcase packages (langgraph-python, langgraph-fastapi,
langgraph-typescript).

1. Auth demo returned 404 on /info. createCopilotRuntimeHandler (V2)
   URL-routes on /info, /agent/:id/run, etc. It needs a Next.js catchall
   route so sub-paths reach it. PR #4271 mounted it at the fixed-path
   route.ts, which meant every sub-path 404'd. Moved to [[...slug]]/route.ts.

2. Voice demo returned 500 on POST /transcribe. V1 CopilotRuntime's
   transcriptionService is a getter-only delegate; the PR-#4271 pattern
   v2Instance.transcriptionService = ... crashes. Rewrote the voice
   route to use V2 CopilotRuntime directly from @copilotkit/runtime/v2
   and pass transcriptionService in the constructor. V2 handler also
   URL-routes so also moved to [[...slug]]/route.ts.

3. Multimodal LFS-pointer deploy failure. /demos/multimodal sample
   buttons threw a pointer error because the deployed dev server served
   the 130-byte LFS stub when git lfs pull wasn't run in the Docker
   build. Resolved LFS and added a package-scoped .gitattributes that
   exempts the three demo samples (sample.png, sample.pdf, sample.wav)
   from LFS tracking via -filter -diff -merge binary. Committed as real
   binaries so deploy environments see the actual asset regardless of
   LFS configuration. The client-side pointer guard stays in place as a
   defensive net.

All three fixes applied identically across the three showcase packages.
…own suggestion with schema

Two related fixes for the byoc-hashbrown and byoc-json-render demos,
which were rendering blank (or crashing in the case of json-render
Sales Dashboard) after PR #4271 landed.

1. Force JSON-object output at the OpenAI API layer
-------------------------------------------------------
PR #4271 rewrote the byoc-hashbrown agent prompt to emit a JSON
envelope (matching `useJsonParser(content, kit.schema)`), but nothing
at the wire layer prevented the model from still wandering into
prose/code-fence preambles on some turns — and the frontend parser
bails to `null` on any non-JSON prefix. The byoc-json-render renderer
did tolerate fences via `extractJsonObject`, but locking both agents
to JSON output removes the ambiguity entirely.

Apply `response_format={"type": "json_object"}` via `model_kwargs`
(Python) / `modelKwargs` (TS) to the byoc-hashbrown AND byoc-json-render
agents across all three showcase packages. With this flag OpenAI
refuses to emit anything but a single JSON object, which is exactly
what each renderer is built to consume.

2. Hashbrown "Sales dashboard" suggestion vs. schema drift
-------------------------------------------------------
The hashbrown `metric` schema currently accepts only `{ label, value }`
(trend was dropped when hashbrown-core beta.4 stopped supporting
`.optional()` chains). The canned "Sales dashboard" suggestion still
asked the model to emit a metric card "(with trend)", which the LLM
interpreted as a cue to produce an extra `trend` field — ending up
with output that the parser either ignored or struggled with.

Drop the "(with trend)" phrasing and the "trend" clause from the
suggestion prompt so it aligns with the schema the renderer actually
exposes.

Applied identically across langgraph-python, langgraph-fastapi, and
langgraph-typescript.
@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 blitz/langgraph-parity-coverage branch April 29, 2026 06:20
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 – docs — 64384c69 Deployed Apr 24, 2026 by vercel[bot]
Preview – travel — 64384c69 Deployed Apr 24, 2026 by vercel[bot]
Preview – research-canvas — 64384c69 Deployed Apr 24, 2026 by vercel[bot]
Preview – chat-with-your-data — 64384c69 Deployed Apr 24, 2026 by vercel[bot]
Preview – form-filling — 64384c69 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