Repository navigation
feat(showcase/ms-agent-python,ms-agent-dotnet): full LangGraph parity + PR #4271 fixes - #4273
Closed
AlemTuzlak wants to merge 90 commits into
Closed
AlemTuzlak wants to merge 90 commits into
AlemTuzlak wants to merge 90 commits into
Conversation
… chat-slots, chat-customization-css demos
Vision-capable MS Agent Framework demo that accepts image and PDF attachments. Mounts a dedicated /multimodal endpoint on the agent server (gpt-4o-mini) and a dedicated /api/copilotkit-multimodal runtime route so the vision model stays scoped to this cell. PDFs are flattened to text via pypdf in a pre-run hook so the model can reason about them even when the chat client does not accept the document content-part shape. Ports the page and sample-attachment-buttons verbatim from the LangGraph showcase.
Forward typed config (tone/expertise/responseLength) from the React provider into the MS Agent Framework agent via AG-UI forwardedProps. A subclass of AgentFrameworkAgent intercepts run_agent, composes a system prompt from the props, and prepends it to the messages before delegating to the default orchestrator chain. Scoped to its own endpoint (/agent-config) and runtime route so the dynamic-prompt behaviour stays out of the shared agent.
Flagship MS Agent Framework showcase that combines A2UI (fixed + dynamic), Open Generative UI, MCP Apps, shared-state todos, and HITL in a polished sales-dashboard demo. Mounts a dedicated /beautiful-chat endpoint on the agent server with the full tool surface (manage_todos, query_data, search_flights, generate_a2ui) and wires a dedicated /api/copilotkit-beautiful-chat runtime route with openGenerativeUI, a2ui.injectA2UITool=false, and mcpApps (Excalidraw by default). Ports the entire frontend tree verbatim from the LangGraph showcase so the A2UI catalog, renderers, generative-ui components, hooks, and CSS stay in parity across framework ports.
Speech-to-text transcription feeding the CopilotChat composer. A dedicated runtime route at /api/copilotkit-voice mounts TranscriptionServiceOpenAI so the mic button renders only for this cell; the underlying agent is the shared MS Agent Framework backend. Ships a sample-audio button that bypasses mic permissions by POSTing a bundled WAV to the transcription envelope.
Bearer-token gated CopilotKit runtime using the V2 runtime's onRequest hook. The frontend toggles an in-memory auth flag and injects the matching Authorization header via the provider's headers prop; the runtime short- circuits requests without a valid token with a thrown 401 Response. Uses createCopilotRuntimeHandler directly from @copilotkit/runtime/v2 so the onRequest hook is wired (the V1 Next.js adapter does not forward hooks).
Vision-capable ChatClientAgent (gpt-4o-mini) mounted at /multimodal on the .NET backend, paired with a dedicated /api/copilotkit-multimodal Next.js runtime route and a CopilotChat page that wires AttachmentsConfig for image and PDF uploads.
Adds a visible reasoning chain demo for the Microsoft Agent Framework backend. Because the MS Agent Framework AG-UI bridge does not currently emit REASONING_MESSAGE_* events, reasoning is surfaced via a required think tool: the agent calls think(thought=...) before every answer and the frontend renders the tool call as a tagged amber reasoning block, matching the LangGraph reference visual. - src/agents/reasoning_agent.py: new agent with required think tool - src/agent_server.py: mount reasoning agent at /reasoning (before root) - src/app/api/copilotkit-reasoning/route.ts: dedicated runtime route - src/app/demos/agentic-chat-reasoning/: page + ReasoningBlock + README
Adds the default-render counterpart to agentic-chat-reasoning. Reuses the same /reasoning backend agent but renders the think tool call with a minimal collapsible Thinking.../Thought-for-a-moment card that approximates CopilotKit built-in CopilotChatReasoningMessage slot. The LangGraph reference achieves zero-config rendering because its backend emits AG-UI REASONING_MESSAGE_* events; MS Agent Framework AG-UI bridge does not emit those events, so this demo ships the closest equivalent rendering pattern.
Flagship showcase cell combining A2UI (fixed + dynamic schema), Open Generative UI, and MCP Apps on a single dedicated runtime route. The .NET agent mirrors the LangGraph reference's tool surface (query_data, get_todos, manage_todos, search_flights, generate_a2ui, get_weather) and is mounted at /beautiful-chat on the existing MS Agent Framework AG-UI backend. Frontend is a near-verbatim port of the LangGraph cell: example-layout + example-canvas + generative-ui charts, declarative A2UI catalog (definitions + renderers), and the full suite of suggestion pills spanning Controlled Generative UI, HITL, A2UI, OGUI, MCP, and shared-state todos.
Port the LangGraph Python agentic-chat-reasoning demo to the MS Agent
Framework (.NET) showcase.
- agent/ReasoningAgent.cs — DelegatingAIAgent wrapper whose inner
ChatClientAgent is prompted to bracket its chain-of-thought in
<reasoning>...</reasoning> tags. Streams the bracketed segment as
TextReasoningContent (surfaced by AG-UI as REASONING_MESSAGE_*
events) and the rest as ordinary text.
- agent/Program.cs — mounts the reasoning agent at /reasoning alongside
the existing SalesAgent at /.
- src/app/api/copilotkit-reasoning/route.ts — dedicated runtime route
proxying to /reasoning, shared by both reasoning demos.
- src/app/demos/agentic-chat-reasoning/{page.tsx,reasoning-block.tsx,README.md}
— custom amber ReasoningBlock wired into the CopilotChat
messageView.reasoningMessage slot.
Port the LangGraph Python reasoning-default-render demo to the MS Agent Framework (.NET) showcase. Uses the shared ReasoningAgent backend mounted at /reasoning; the page passes no custom reasoningMessage slot, so CopilotKit renders the collapsible default Thought-for-X card.
…JSON envelope prompt
…guard + legacy-shape shim + MIME routing
…tion guard + v2-instance wiring
…thed + ChatErrorBoundary + label invert
AlemTuzlak
requested review from
jpr5,
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
April 24, 2026 17:21
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.
|
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
Replicates the full LangGraph Python showcase matrix for MS Agent Framework (Python) and MS Agent Framework (.NET) — ports 29 new demos to each framework (58 total) so both rows in the showcase coverage dashboard go green. Also forward-ports PR #4271's six demo runtime fixes to the new MS Agent demos.
Coverage delta
Before: each MS Agent row had 8 demos (agentic-chat, hitl-in-chat, tool-rendering, gen-ui-tool-based, gen-ui-agent, shared-state-read-write, shared-state-streaming, subagents).
After: each row has 38 demos — full feature parity with langgraph-python.
New demos (×2 frameworks):
Build & deploy notes
showcase/packages/ms-agent-python/):src/agent_server.pynow mounts 15 agents at dedicated FastAPI paths (specific paths BEFORE the/catch-all — the AG-UI wildcard shadows later routes otherwise).showcase/packages/ms-agent-dotnet/):agent/Program.csmaps 14 AG-UI endpoints viaapp.MapAGUI(...). New factories: AgentConfigAgent, BeautifulChatAgent, ByocHashbrownAgent, ByocJsonRenderAgent, DeclarativeGenUiAgent, HitlInAppAgent, InterruptAgent, McpAppsAgent, MultimodalAgent, OpenGenUiAgent, OpenGenUiAdvancedAgent, ReasoningAgent, A2uiFixedSchemaAgent./api/copilotkitfor frontend-only demos that reuse the default backend; dedicated/api/copilotkit-<slug>for demos needing custom runtime config (OGUI, A2UI, BYOC, MCP apps, voice, auth, agent-config, beautiful-chat, multimodal, reasoning).Framework-specific adaptations
gen-ui-interrupt,interrupt-headless) — MS Agent Framework has no LangGraph-equivalentinterrupt()primitive. Ported viauseFrontendToolasync handlers with approval-mode semantics; visually equivalent, mechanism differs.thinktool +useRenderToolsubstitute because the MS-AF AG-UI bridge doesn't emit nativeREASONING_MESSAGE_*events. .NET emitsTextReasoningContentviaReasoningAgentwrapper that splits<reasoning>...</reasoning>system-prompted output.pypdfequivalent.PR #4271 fixes ported (both frameworks)
Six demo runtime fixes from #4271 ported to the MS Agent ports:
byoc-json-render— wrap<Renderer />with<JSONUIProvider>, forward children throughMetricCardregistry.byoc-hashbrown— backend system prompt rewrite from<ui>...</ui>XML to hashbrown JSON envelope{ui: [{metric: {props: {...}}}, ...]}.multimodal— LFS-pointer magic-byte guard client-side,LegacyConverterShimviaonRunInitializedto rewrite modern multimodal parts to legacybinaryshape, MIME routing on Python backend (image/*→ native vision,application/pdf→ pypdf).voice— writetranscriptionServicedirectly onto V2 runtime instance (V1 wrapper drops it).GuardedOpenAITranscriptionServicethrows typed auth error → runtime maps to 401 instead of silent 503.agent-config— MS Agent Framework readsforwardedPropsnatively (Python) / AG-UI shared state viaag_ui_state(.NET); the LangGraph bridge repack logic was N/A and not ported. Both paths already work.auth—useDemoAuthdefaults totrueso page mounts authenticated; button labels inverted;<CopilotChat />wrapped inChatErrorBoundarywith auto-reset on auth flip.Process
Test plan
pnpm install && pnpm devinshowcase/packages/ms-agent-python— agent server starts, all / endpoints reachable.dotnet run --project agent && pnpm devinshowcase/packages/ms-agent-dotnet— Program.cs compiles, all MapAGUI endpoints serve AG-UI.Known limitations
next build/dotnet build.Microsoft.Agents.AI.Hosting.AGUI.AspNetCorepreview packages that may not yet emit/consume the exact AG-UI events LangGraph uses; graceful-degrade fallbacks are in place and flagged in file headers.public/demo-files/sample.pngandsample.pdf) are not bundled in either MS Agent package; multimodal sample buttons will show actionable errors until those files are added (same behavior as langgraph-python pre-PR-fix(showcase/langgraph-python): repair six demo runtime regressions (byoc-json-render, hashbrown, multimodal, voice, agent-config, auth) #4271).