Repository navigation
feat(showcase/langroid): parity demos (chat chrome, frontend-tools, hitl-in-app, reasoning, readonly-context) - #4254
Closed
AlemTuzlak wants to merge 9 commits into
Closed
AlemTuzlak wants to merge 9 commits into
AlemTuzlak wants to merge 9 commits into
Conversation
Ports the chat chrome variants from langgraph-python: chat-customization-css (scoped theme), prebuilt-sidebar, prebuilt-popup, chat-slots (welcome screen + disclaimer + assistant message slots), and headless-simple. All five reuse the unified Langroid agent via agent-name dispatch in the Next.js route.
Ports the useFrontendTool variants: the sync change_background handler plus the async query_notes handler with an in-browser notes DB and the NotesCard render component. Both reuse the unified Langroid agent; only frontend wiring differs.
Ports the In-App HITL variant: useFrontendTool with an async handler that returns a Promise resolved by the operator clicking Approve or Reject in a React portal dialog rendered outside the chat surface. Includes tickets panel and approval dialog component.
Ports three demos: agentic-chat-reasoning (custom reasoningMessage slot), reasoning-default-render (zero-config default render), and readonly-state-agent-context (useAgentContext with name/timezone/activity). Reasoning demos include a note that the Langroid AG-UI adapter does not yet emit REASONING_MESSAGE events, so the reasoning block only renders once the adapter is extended.
Adds the 11 newly ported demos to the manifest (chat-customization-css, prebuilt-sidebar, prebuilt-popup, chat-slots, headless-simple, frontend-tools, frontend-tools-async, hitl-in-app, agentic-chat-reasoning, reasoning-default-render, readonly-state-agent-context) and their features. Documents skipped demos (gen-ui-interrupt, interrupt-headless) and deferred demos in PARITY_NOTES.md. Adds a typecheck script.
AlemTuzlak
requested review from
jpr5,
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
April 24, 2026 13:55
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📣 Social Copy GeneratorGenerate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.
|
Ports six additional canonical demos onto the unified Langroid runtime: - tool-rendering-default-catchall / tool-rendering-custom-catchall — both exercise the existing agent's tool surface with different wildcard renderer configurations. - declarative-gen-ui — A2UI dynamic-schema rendering backed by the agent's existing generate_a2ui tool; dedicated route sets a2ui.injectA2UITool: false so the agent-owned tool is authoritative. - auth — framework-native Bearer-token gate via the V2 runtime's onRequest hook on a dedicated /api/copilotkit-auth route. - headless-complete — full hand-rolled chat surface built on useAgent, no CopilotChat. - agent-config — typed provider properties forwarded through a dedicated route. Backend wiring for forwarded_props is tracked in PARITY_NOTES as a known limitation. Updates manifest.yaml with feature slugs + full demo entries, adds qa stubs and Playwright specs for every new demo, and expands PARITY_NOTES.md with explicit deferred/skipped reasoning for the remaining demos that require dedicated Langroid agent modules.
… from #4271 Port two runtime regressions fixed in showcase/langgraph-python's PR #4271 to the Langroid showcase. Auth demo (frontend-only fix — matches canonical langgraph-python): - useDemoAuth defaults to authenticated so the initial /info handshake succeeds; previously the unauth-first default caused /info 401 before onError handlers attached, producing a React tree teardown. - Rename "Authenticate" button to "Sign in"; when authed, show "Sign out" (button labels match the authed/unauthed semantics instead of always reading "Authenticate"). - Wrap <CopilotChat /> in a ChatErrorBoundary that auto-resets on auth transitions so signing back in re-mounts the live chat without a full reload. - Update qa/auth.md + tests/e2e/auth.spec.ts to the new authed-first flow with Sign out exercising the 401 path. Agent-config demo (frontend contract + backend wiring): - The <CopilotKitProvider properties={tone, expertise, responseLength}> arrives as flat top-level keys on AG-UI forwardedProps. In the langgraph-python showcase, the TS LangGraphAgent drops non-config keys from the stream payload, so upstream added a per-demo subclass that repacks flat keys into forwardedProps.config.configurable.properties. - Langroid uses HttpAgent (which does preserve the full payload), but we mirror the same repack shape for two reasons: 1. Identical frontend contract across every showcase package. 2. Deterministic backend read location: the Python adapter reads forwarded_props.config.configurable.properties, not a flat key that could collide with future AG-UI protocol additions. - api/copilotkit-agent-config/route.ts: subclass HttpAgent and override requestInit to repack, with the same RESERVED_FORWARDED_PROPS_KEYS set as upstream so structural stream keys (config/command/streamMode/...) pass through unchanged. - src/agents/agent.py: add build_agent_config_system_prompt + extract_agent_config_properties helpers and make create_agent accept an optional system_message override. Unknown tone/expertise/length values are silently ignored rather than 500ing a turn. - src/agents/agui_adapter.py: in handle_run, when forwarded_props carries agent-config properties, build the dynamic prompt and pass it to create_agent for that request only. Other demos send no such properties and get the canonical SYSTEM_PROMPT unchanged. - qa/agent-config.md: update to document the end-to-end wiring and add a DevTools assertion for the repacked request shape. - PARITY_NOTES.md: move agent-config out of "Known limitations"; the backend now consumes forwarded properties. Upstream reference: #4271
7 tasks
Contributor
|
Superseded by #4280 (omnibus parity PR) |
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`)
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands the Langroid showcase package toward parity with the canonical
showcase/packages/langgraph-pythonmanifest. Lands alongside parallel PRs for agno, ag2, llamaindex, and spring-ai.Langroid's
agent_server.pyexposes a single unified AG-UI-over-SSE endpoint at/; every new demo registers a new agent-name in the Next.js runtime route that forwards to the sameHttpAgent. Frontend demos therefore only needpage.tsxplus supporting components; no new Python backend modules are introduced in this pass.Ported (11 new demos)
Chat chrome variants:
Frontend-tools variants:
HITL variant:
Reasoning + context:
Each demo ships a page + supporting components, a minimal Playwright smoke spec, and a QA checklist. The manifest lists every demo with its highlight files.
Skipped
Deferred
The remaining langgraph-python demos (byoc-json-render, byoc-hashbrown, beautiful-chat, multimodal, auth, voice, open-gen-ui variants, agent-config, declarative-gen-ui, a2ui-fixed-schema, mcp-apps, tool-rendering variants, headless-complete) are portable in principle but each requires a dedicated runtime route and additional backend or BYOC work beyond the unified agent. They are documented in
showcase/packages/langroid/PARITY_NOTES.mdfor follow-up.Reasoning note
The Langroid AG-UI adapter (
src/agents/agui_adapter.py) does not currently emit REASONING_MESSAGE events, so the two reasoning demos exercise the wiring and slot registration path but will only surface a reasoning block once the adapter is extended to forward Langroid's internal thinking channel (if any). The QA docs call this out.Test plan
npm run devin showcase/packages/langroid and boot the Next.js app + Python agent servernpm run test:e2e