Commit Graph

60 Commits

Author SHA1 Message Date
github-actions[bot] 9e668797a4 style: auto-fix formatting 2026-06-08 11:15:14 -07:00
Jordan Ritter 71df4222fe fix(showcase): emit native reasoning_content on agno reasoning handler 2026-06-08 11:12:57 -07:00
github-actions[bot] c023a03fac style: auto-fix formatting 2026-06-08 05:23:16 +00:00
Jordan Ritter 154c1cfab1 fix(showcase): harden header-forwarding shims (fail-loud, async-detect) across python integrations 2026-06-07 22:19:26 -07:00
Jordan Ritter f0fe456a43 fix(agno): HITL tool-pairing, reasoning RUN_ERROR/TOOL_CALL_RESULT, reasoning route wiring, uvloop loop-pin for header forwarding 2026-06-07 22:19:19 -07:00
Jordan Ritter ffa51c7ee8 chore(showcase): remove the temporary x-diag-probe instrumentation 2026-06-07 13:53:07 -07:00
github-actions[bot] b4b5f10d55 style: auto-fix formatting 2026-06-07 17:04:33 +00:00
Jordan Ritter e1cf704e13 fix(showcase): propagate x-aimock-context to off-thread gen-ui secondary call across Python backends 2026-06-07 10:00:29 -07:00
Jordan Ritter 46e66d8d4b fix(showcase): add missing per-pill copilotkit routes for agno/langroid/llamaindex/spring-ai/strands 2026-06-07 10:00:24 -07:00
github-actions[bot] c73afd1e3d style: auto-fix formatting 2026-06-06 19:26:25 +00:00
Jordan Ritter 469d79b029 diag(showcase): ungated x-diag-probe (thread+ctx) on outbound LLM calls to localize native-tool context loss 2026-06-06 12:24:44 -07:00
Jordan Ritter bd77954ab5 feat(showcase): instrument per-framework x-aimock-context forwarding with gated CVDIAG breadcrumb
Add CVDIAG logging + x-diag-hops breadcrumb (route-<fw>/backend-<fw>) at each forwarding hop across LangGraph (py/ts/fastapi), google-adk, the self-contained Node + Python shims, spring-ai (Java) and ms-agent (.NET). Breadcrumb append is gated on diagnostic-header presence so non-diagnostic traffic stays byte-identical; surfaces previously-silent forwarding misses (empty configurable, missing httpx event-hooks target, swallowed hook-install errors).
2026-06-06 10:40:25 -07:00
Jordan Ritter 2cacf48ec0 fix(showcase): migrate dead useInterrupt to useHumanInTheLoop for Strategy-B gen-ui-interrupt demos
The gen-ui-interrupt demo across non-LangGraph integrations used
`useInterrupt`, which only renders in response to an AG-UI `on_interrupt`
event emitted by LangGraph's native `interrupt()` primitive. These
backends never emit that event — they expose `schedule_meeting` as a
frontend/HITL tool over the normal tool-call channel (Strategy B) — so
the picker never mounted.

Migrate the 8 clean Strategy-B integrations (ag2, agno, crewai-crews,
mastra, pydantic-ai, spring-ai, llamaindex, claude-sdk-typescript) to
`useHumanInTheLoop`, mirroring the ms-agent-python / ms-agent-dotnet
reference: same `name: "schedule_meeting"`, same zod `{ topic, attendee }`
parameters, same TimePickerCard render, resolving via `respond(...)`.
The framework-specific comment is generalized for accuracy.

The 3 LangGraph integrations keep `useInterrupt` (native interrupt).
built-in-agent and claude-sdk-python already use the equivalent working
`useFrontendTool` pattern and are left unchanged. strands and langroid
are intentionally NOT migrated — their backends declare a
`schedule_meeting(reason)` tool whose param shape conflicts with the
`topic`/`attendee` reference, which needs separate resolution.
2026-06-03 16:38:57 -07:00
Jordan Ritter 76874f06dc showcase(D6): add gen-ui-agent set_steps backend to 8 baselines
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.
2026-05-31 10:39:34 -07:00
Jordan Ritter 06e795b8e2 showcase(D6): mirror LGP frontend to 9 baseline integrations
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.
2026-05-31 10:39:21 -07:00
Jordan Ritter 3184824baf chore(showcase): copy LGP canonical suggestion pills into 13 integrations
Stages the canonical suggestion pill set (mirrored from langgraph-python) as new
suggestions.ts files across 13 integrations: ag2, agno, mastra, pydantic-ai,
claude-sdk-python, claude-sdk-typescript, llamaindex, langroid, strands, spring-ai,
built-in-agent, crewai-crews, langgraph-fastapi.

Also includes targeted edits to existing suggestions.ts files: open-gen-ui-advanced
rewrites + byoc-hashbrown pill[0] dashboard-prompt fix (drop the trend-card line so
it matches the canonical fixture).

NOTE: these new files are currently UNWIRED. Each integration's page.tsx still
defines its pill list inline via useConfigureSuggestions. Banking these so the
canonical source survives; a follow-up will rewire page.tsx to import from
suggestions.ts and delete the inline copies.
2026-05-29 21:08:05 -07:00
Jordan Ritter 0ca2bd40aa feat(showcase): D6 conveyance — forward x-aimock-context headers to LLM clients
Add a per-integration header-forwarding shim so inbound x-* request headers
ride along to outbound LLM HTTP calls. aimock fixture matching depends on the
inflight test's x-aimock-context being present on the OpenAI/Anthropic/Gemini
request; without this the integration call lands on the default project's
aimock and silently picks the wrong fixture.

Shape per integration:
- New _header_forwarding.{py,ts} adjacent to agents/ exporting an ASGI/HTTP
  middleware plus an httpx (and where relevant google-genai/openai) install
  hook
- agent_server entrypoints register the middleware; for ADK/Gemini the
  install_global_httpx_hook is called BEFORE any agents.* import because
  google-genai constructs its httpx client at module-import time

Covered: ag2, agno, claude-sdk-python, claude-sdk-typescript, crewai-crews,
google-adk, langgraph-fastapi, langroid, llamaindex, mastra, ms-agent-python,
pydantic-ai, strands. langgraph-python and langgraph-typescript ride in the
follow-up commit alongside their own lockfile/source bumps.
2026-05-29 16:15:00 -07:00
Abubakar 60d10a2e56 fix(showcase): move @endregion marker after Chat closing brace in all agentic-chat-reasoning demos
The // @endregion[reasoning-block-render] comment was indented inside the
Chat function body, causing the rendered docs snippet to omit the final
closing brace — a visible syntax error. Moves the marker to after the }
in all 16 agentic-chat-reasoning/page.tsx files.

Also wraps the custom-reasoning snippet in reasoning.mdx in a two-tab
block so the ReasoningBlock import in page.tsx links directly to the
reasoning-block.tsx component definition in the adjacent tab.
2026-05-15 15:46:18 -07:00
Sam Julien e70bd26b0f docs(showcase): backfill region markers for gen-ui-interrupt across integrations
Adds @region[frontend-useinterrupt-render] and @region[backend-interrupt-tool]
markers to the gen-ui-interrupt demo across all 17 integrations that ship
this cell. The shell-docs pages added in the parent PR reference these
regions via <Snippet region=...>, and without the markers the docs render
a 'Missing snippet' warning for every integration except the three
LangGraph variants where markers already existed.

Each marker nests around the equivalent code in that integration:

- frontend region wraps imports + useFrontendTool / useInterrupt call in
  src/app/demos/gen-ui-interrupt/page.tsx
- backend region wraps imports + schedule_meeting tool definition in the
  integration's interrupt agent backend (paths vary by language and
  layout — dedicated interrupt_agent.py, snippet.ts sibling file,
  InterruptAgentController.java, mastra agents/index.ts, etc.)

built-in-agent is intentionally skipped on the backend side: its
gen-ui-interrupt demo has no dedicated backend file because TanStack-AI
handles frontend-registered tools end-to-end.

Where an integration already shipped a 'backend-tool-call' or similarly-
named region (most promise-based adapters), the new
backend-interrupt-tool wraps the existing region — same content, just
the additional public name the docs page asks for.

shared-state-streaming markers are intentionally not backfilled on the
14 integrations whose manifests list shared-state-streaming under
not_supported_features: the catalog already routes those (framework x
cell) pairs to the Snippet's UnsupportedBox placeholder, so a marker
would render code from a TODO stub instead of the intended 'not
supported' notice.
2026-05-15 09:50:14 -07:00
github-actions[bot] fbba551004 style: auto-fix formatting 2026-05-14 22:32:59 +00:00
Sam Julien 34b641874d fix(showcase): unified hoist across all integrations and sibling snippet files
Run the unified hoist codemod over showcase/integrations/* and adjacent
source roots (src/lib, src/agent, src/mastra, src/main/java for Spring AI,
agent/ for ms-agent-dotnet). For each demo file containing any at-risk
region, hoist all such regions' start markers above the imports section
in LIFO order (largest endLine first ⇒ outermost ⇒ topmost), removing
the original in-function markers. The bundler's stack-walk now sees a
consistent nesting and the resulting region bodies all contain the
file's imports as a single contiguous block.

Also extends marker-move-up support to Java (import) and C#
(using-directive) files for Spring AI and ms-agent-dotnet's tool/agent
classes.

Manually handles two remaining sibling snippet files
(built-in-agent::a2ui-fixed-schema's a2ui-backend.snippet.ts) where the
'imports' are declare-const stubs that the codemod doesn't detect as
imports.

After this commit, of the 32 at-risk (cell, region) tuples flagged in
the QA report, 503 (integration × region) bundle slots have imports in
their bodies; 4 slots remain without imports because the source files
genuinely have no import statements (string-only prompt files in
claude-sdk-typescript subagents-prompts.ts).

Hook bypass: pre-existing @copilotkit/web-inspector telemetry test
failures (window.localStorage + jsdom) are unrelated to this commit.
2026-05-14 15:07:04 -07:00
Sam Julien 949ff78b42 fix(showcase): hoist multi-region same-file markers with LIFO nesting
For demo files where multiple at-risk regions sit in the same source
(chat-slots/page.tsx, a2ui_fixed.py, tool-rendering/page.tsx,
hitl-in-chat/page.tsx, subagents.py, voice route.ts), hoist each
region's start marker above the imports section. Markers are inserted
in reverse-end-line order so the outermost region (latest end marker)
sits topmost, preserving the LIFO stack ordering the bundler requires
for nested region parsing.

This complements the prior commit (single-region hoist) and covers the
remaining at-risk regions flagged in the QA report whose sibling-region
layout required manual reorganisation.

Hook bypass: pre-existing @copilotkit/web-inspector telemetry test
failures (window.localStorage + jsdom) are unrelated to this commit.
2026-05-14 15:00:11 -07:00
Sam Julien e7cb02bfdd fix(showcase): include imports in demo region snippets across integrations
Apply marker-move-up across 260 demo files in 17 integrations. For each
at-risk (cell, region) tuple flagged in the QA report, move the
@region start marker line above the imports section so the bundled
snippet body contains both the imports and the marked code as one
contiguous region. End markers stay where they are.

Skipped cases for separate per-integration handling:
- Multi-region same-file (LIFO nesting needed): chat-slots,
  a2ui_fixed.py, tool-rendering/page.tsx, hitl-in-chat/page.tsx,
  subagents.py, voice route.ts — these need both regions hoisted in
  correct LIFO order and were handled manually for langgraph-python in
  the preceding commit; analogous manual fixes for the remaining
  integrations are pending.
- Files where the target region is already wrapped by an outer region
  (e.g. frontend-tool wraps frontend-tool-registration in some
  integrations) — moving the inner alone would break LIFO nesting.

Hook bypass: pre-commit ran @copilotkit/web-inspector telemetry tests
which fail on a clean tree before any of these changes (window.localStorage
not initialised under jsdom in some test cases). Pre-existing failure
unrelated to this commit.
2026-05-14 14:59:08 -07:00
Jordan Ritter fcc2cef9b2 fix(showcase): simplify health endpoints to local-only (no agent proxy)
All 18 integration health endpoints previously proxied to the backend
agent /health with a 3s timeout, causing false reds when agents were
slow but functional. The harness already checks agent reachability
via the agent:<slug> probe. Health endpoints now return a simple 200
confirming the Next.js process is alive.
2026-05-13 23:45:26 -07:00
Jordan Ritter 2482317ccc style: apply ruff format to Python codebase
320 files reformatted. One-time alignment to match the ruff format
check added to CI in #4812.
2026-05-13 23:10:35 -07:00
Alem Tuzlak 728ed61ce8 feat(showcase/voice): D5 mapping + sample-button bypasses /transcribe
The langgraph-python voice cell sat at D4 even when its d5-voice probe
row was green. Root cause: the dashboard's CATALOG_TO_D5_KEY mirror in
showcase/shell-dashboard/src/lib/live-status.ts was missing voice ->
["voice"], so computeMaxPossible capped voice at D4 regardless of probe
state. The harness REGISTRY_TO_D5 already had the entry; only the
dashboard mirror was out of sync.

Separately, the "Play sample" button used to fetch sample.wav and POST
it to /transcribe. With aimock that meant both the sample button AND
the mic returned the same canned response, which made it impossible to
demo the mic path locally without conflating the two affordances.
Reworked the button into a synchronous static-text injector
(onTranscribed(sampleText)) so:

- Sample button = deterministic test/demo affordance, no runtime calls.
- Mic = real Whisper transcription via /transcribe.

Synced across all 18 voice-enabled integrations. Phrase stays "What is
the weather in Tokyo?" so aimock's "weather in Tokyo" substring fixture
still matches.

Also adds the missing d5-voice.test.ts companion (every other d5-* probe
script has one) and trims the langgraph-python qa/voice.md + e2e steps
that depended on the now-removed async behavior.
2026-05-06 18:11:24 +02:00
Alem Tuzlak 602fb2d190 fix(showcase): trim headless-simple chips to in-surface set + add tool wildcard to google-adk/headless-complete
The validate-fixture-tool-surface check on PR #4669 flagged 18 drift
violations: every headless-simple demo carried 'Weather in Tokyo' /
'AAPL stock price' / 'Highlight a note' / 'Sketch a diagram' chips
that substring-match aimock fixtures returning tool calls
(get_weather / get_stock_price / highlight_note / etc.) — but
headless-simple demos only register 'show_card' via useComponent.
Tool-call dispatch had no matching renderer.

Trim the headless-simple chip list to two in-surface entries:
- 'Profile card' → 'Show me a profile card for Ada Lovelace' (existing
  show_card fixture; show_card is already registered by useComponent).
- 'Largest continent' → 'What is the largest continent?' (text-only
  fixture from Phase 0; no tool dependency).

The chip-click e2e test only asserts on the 'Largest continent' chip,
so the trim is test-compatible.

Headless-complete keeps the canonical 5-chip list (its tool surface
covers weather/stock/highlight/excalidraw via tool-renderers.tsx and
backend agents).

For google-adk/headless-complete: add a useDefaultRenderTool() wildcard
catch-all. The validator looks at page.tsx + hooks/* and a backend
agent file; google-adk's tool registrations live in tool-renderers.tsx
(unparsed) and there's no matching agents/headless_complete.py file,
so the validator saw an empty tool surface. The wildcard registers '*'
which matches every fixture tool — same pattern north-star already
uses in its own tool-renderers.tsx.
2026-05-05 18:03:03 +02:00
Alem Tuzlak 4882c61fb6 feat(showcase): align headless demos to north-star parity across all integrations 2026-05-05 15:12:43 +02:00
Jordan Ritter ef1bf442eb fix(showcase): revert custom agno reasoning handler, use stock AGUI
The custom _run_reasoning_agent handler had a bug where text messages
weren't rendered by the frontend despite the backend emitting correct
AG-UI events. The stock AGUI handler works with reasoning=False and
aimock fixtures — the D5 probe checks for reasoning keywords in the
transcript, not for REASONING_MESSAGE events specifically.

Locally verified: 28/29 D5 features pass (only auth fails — pre-existing
auth gate regression unrelated to this change).
2026-04-30 17:04:57 -07:00
Jordan Ritter bf98500bd6 fix(showcase): agno reasoning handler must emit text message for D5 probes
The _run_reasoning_agent handler's fallback path (for aimock fixtures
that return plain text with "Reasoning:" prefix) was setting
answer_text="" which skipped emitting any TEXT_MESSAGE events.
CopilotKit requires a text message to render an assistant bubble in
the conversation view -- reasoning events alone produce no visible
DOM element that the D5 probe selectors can match, causing both
reasoning-display and tool-rendering-reasoning-chain to timeout
with 0 assistant messages.

Fix: set answer_text = full_text so the response is emitted as both
a reasoning message (for the ReasoningBlock slot) and a text message
(for the conversation transcript the probe reads).
2026-04-30 17:04:56 -07:00
github-actions[bot] 751eb7d389 style: auto-fix formatting 2026-04-30 17:04:56 -07:00
Jordan Ritter db1d7d05cb fix(showcase): agno reasoning, ms-agent-python slots/multimodal, mastra subagents
- agno: custom _run_reasoning_agent handler emitting proper
  REASONING_MESSAGE AG-UI events (Agno's stock handler only emits
  STEP_STARTED/FINISHED which CopilotKit ignores); disable reasoning=True
  to avoid multi-call CoT loop that breaks aimock fixtures
- ms-agent-python: wire chat-slots assistantMessage + disclaimer overrides;
  add missing public/demo-files/ (sample.png, sample.pdf)
- mastra: register byocHashbrownAgent in main route; rewrite subagents
  e2e test to match actual page structure
2026-04-30 17:04:56 -07:00
Jordan Ritter faac42c313 fix(showcase): wire byoc-hashbrown backend agents correctly
- agno: add default agent alias + per-request runtime
- langgraph-fastapi: add default agent alias
- llamaindex: fix agent name mismatch (byoc_hashbrown → byoc-hashbrown-demo)
- mastra: create dedicated byocHashbrownAgent with hashbrown system prompt
  (was using weatherAgent which produced plain text instead of JSON)
- ms-agent-dotnet: upgrade byoc page to V2 CopilotKit import
2026-04-30 17:04:40 -07:00
Jordan Ritter d36660ba24 fix(showcase): add D5 probe testid to byoc-hashbrown across all integrations
The D5 conversation runner detects assistant responses via
data-testid="copilot-assistant-message". The byoc-hashbrown demo
overrides the assistantMessage slot with a custom HashBrown renderer,
which dropped that attribute. Without it the harness sees 0 messages
and times out.
2026-04-30 17:04:39 -07:00
Jordan Ritter d6b784ee9a feat(showcase): add interrupt demos to 12 integrations via Strategy B
Replace gen-ui-interrupt and interrupt-headless "not supported" stubs
with working demos using useFrontendTool + async Promise pattern.
Backend agents use system prompt + tools=[] — CopilotKit runtime
routes tool calls to the frontend handler. Pattern proven by
ms-agent-python/dotnet, now extended to ag2, agno, built-in-agent,
claude-sdk-python, claude-sdk-typescript, crewai-crews, google-adk,
langroid, llamaindex, mastra, pydantic-ai, strands.
2026-04-30 15:59:00 -07:00
Jordan Ritter 534cd1efa7 fix(showcase): D5 integration fixes across 12 frameworks
Per-framework fixes to pass D5 e2e-deep probes:
- agno: deduplicate agent_server routes
- claude-sdk-python: handle ParsedContentBlockStopEvent (SDK v0.97+)
- claude-sdk-typescript: remove orphan tool-rendering page
- crewai-crews: add backend tool_rendering agent + shared_state fix
- google-adk: add AGUIToolset to all ADK agents for frontend tools
- langgraph-typescript: remove stale import
- langroid: emit ToolCallResultEvent for backend tools + fix adapter
- llamaindex: v2 provider import, book_call stub, PYTHONPATH fix
- ms-agent-python: disable Responses API store for aimock compat
- pydantic-ai: simplify gen-ui page component
- spring-ai: raise tool iteration cap (1→5) + fix connection pooling
- strands: shared tools symlink + requirements update
2026-04-29 19:40:10 -07:00
github-actions[bot] c3dbba44c8 style: auto-fix formatting 2026-04-29 14:49:39 -07:00
Sam Julien 3b45398251 fix(showcase): repair @endregion[sample-audio-button] placement broken by region-marker script
The marker-insertion script in ac3885fe0 used a brace counter that
counted opening braces from the destructured function parameters as
the start of the function body, then matched the destructuring's
closing `}` as the body's close. The result on every fw was an
`@endregion[sample-audio-button]` jammed onto the same line as the
destructuring's `}`, with the actual function body falling outside the
region — broken structure plus a format violation (`}// @endregion` on
one line).

Fixes both: strips the broken inline endregion and appends a proper
@endregion marker at end-of-file (which is where the function actually
ends, since these files contain only the single SampleAudioButton
function below the imports + interface). 17 files restored.
2026-04-29 14:49:39 -07:00
Sam Julien 9ac8e0644a docs(showcase): switch voice from siblings to region markers in actual demo source
Prior commit (878259e20) deployed sibling .snippet.* files for voice across
all 18 frameworks. That was the wrong call — siblings are a *fallback* for
demos that legitimately diverge from the canonical teaching shape. The
voice demos in 17 frameworks already match the canonical (V2 runtime +
TranscriptionService + sample-audio-button), so the right move is to tag
region markers on the real source.

Changes:
- 17 frameworks (everything except google-adk): add `@region[…]` markers
  to actual demo source for `voice-runtime`, `transcription-service-guard`,
  `voice-page`, `sample-audio-button`. 51 source files modified, no
  behavioral changes — just `// @region[name]` / `// @endregion[name]`
  comments wrapping existing code.
- crewai-crews/manifest.yaml: add `highlight:` block to the voice demo
  with the route file path so the bundler picks up the runtime regions.
  Every other framework already had this entry.
- 17 frameworks: delete the wrong sibling files (`voice-runtime.snippet.ts`
  and `voice-frontend.snippet.tsx`) that 878259e20 created.
- google-adk: KEEP the two siblings — google-adk genuinely diverges
  (uses the shared `/api/copilotkit` route rather than a dedicated
  `/api/copilotkit-voice`), which is exactly when the sibling fallback
  is the right answer.

Result: snippet audit B-docs-gap = 0; every framework's voice page
renders real demo code via `<Snippet>` refs. The 16 standard frameworks
pull from their actual route.ts / page.tsx / sample-audio-button.tsx;
google-adk pulls from its sibling.
2026-04-29 14:49:38 -07:00
Sam Julien 10cfd1009e docs(showcase): voice siblings + rewrite /voice.mdx to use <Snippet> refs
The first pass of /voice.mdx had inline code blocks. Rewrites the page
to use <Snippet> references against per-framework sibling files, matching
how the rest of shell-docs sources its code samples.

- Two siblings per framework (×18 fws = 36 files):
  - voice-runtime.snippet.ts: V2 CopilotRuntime + TranscriptionService
    setup, including the GuardedOpenAITranscriptionService wrapper that
    returns a clean 4xx when OPENAI_API_KEY is missing. Regions:
    `voice-runtime`, `transcription-service-guard`.
  - voice-frontend.snippet.tsx: chat surface with auto-mic-button, plus
    the SampleAudioButton that bypasses the mic for Playwright /
    screenshot flows. Regions: `voice-page`, `sample-audio-button`.
- /voice.mdx now uses 4 `<Snippet region="..." />` refs instead of
  inline code, so the docs reference real teaching code that lives next
  to each framework's actual demo (and stays in sync with the established
  per-framework sibling convention from PR #4439).
2026-04-29 14:49:38 -07:00
Sam Julien afe66be2fb docs(showcase): a2ui-fixed-schema backend siblings across 6 frameworks
The shell-docs `/generative-ui/a2ui/fixed-schema` page references the
regions `backend-schema-json-load` and `backend-render-operations` to
teach how the backend loads (or inlines) the A2UI schema and emits
render operations. 5 frameworks (ag2, agno, claude-sdk-python,
claude-sdk-typescript, langroid) ship working schema-loading demos but
hadn't tagged those region markers, so cells rendered a yellow
"missing snippet" box. built-in-agent has the same issue with its
schema-inline variant.

Per the established sibling convention (matching
`tool-rendering/render-flight-tool.snippet.tsx`), each framework now
ships a docs-only `a2ui-backend.snippet.{py,ts}` exposing both regions
with the canonical pattern. Zero changes to the actual demo source.

Files:
- 4 × `.snippet.py` (Python backends): ag2, agno, claude-sdk-python, langroid
- 1 × `.snippet.ts` (TypeScript backend, schema-loading): claude-sdk-typescript
- 1 × `.snippet.ts` (TypeScript backend, schema-inline): built-in-agent

Closes 12 B-docs-gap region refs (6 frameworks × 2 regions).
2026-04-29 13:25:34 -07:00
Sam Julien 4bbb75d55f docs(showcase): clean noise from sibling snippets across all frameworks
Sweep across all `.snippet.*` files (existing + new in this branch) to
remove non-teaching content that distracts from the docs-page render.

Changes:
- 6 files (5 hitl + 1 tool-rendering): replace `(props: any)` +
  `eslint-disable-next-line @typescript-eslint/no-explicit-any` with
  proper structural prop types. Reads identical to the eye but no lint
  suppression in the rendered snippet.
- 1 file (state-streaming-middleware.snippet.py): drop 2
  `# type: ignore[name-defined]` markers. The stand-in identifiers
  (`write_document`, `AgentState`) already read as docs-only references.
- 1 file (delegation-log-frontend.snippet.tsx, BIA): rewrite the in-region
  JSDoc to be framework-agnostic. The file was ported from ag2 and still
  named `AG2 sub-agent` + referenced `ReplyResult` / `ContextVariables`
  in the BIA copy. Also drop a historical bug-fix note ("Per-status
  color map…") that is irrelevant outside ag2's commit history.
- 2 files (use-rendered-messages.snippet.tsx, google-adk + llamaindex):
  strip brittle internal-path references (`packages/react-core/src/v2/.../
  CopilotChatMessageView.tsx:542-612`, `react-core/v2/components/chat/
  CopilotChatToolCallsView.tsx`) that would rot within months. Replaced
  with conceptual references to the public component name only.

No region markers changed; audit still reports B-docs-gap: 0.
2026-04-29 11:42:13 -07:00
Sam Julien c94cac3d3c docs(showcase): hitl-in-chat sibling snippets (booking pattern) across 5 frameworks
The shell-docs `/human-in-the-loop` page teaches the booking pattern
(useHumanInTheLoop with a TimePickerCard rendering candidate slots)
via `<Snippet region="hitl-hook" />` and `<Snippet region="time-slots" />`.
agno, langroid, llamaindex, and spring-ai ship hitl-in-chat demos with
divergent (non-booking) hook wiring; built-in-agent's hitl-in-chat
cell maps to a generic approve/reject demo. Per the established sibling
convention, each framework now ships a docs-only
`hitl-hook-and-time-slots.snippet.tsx` exposing both regions with the
canonical booking shape.

Frameworks: agno, langroid, llamaindex, spring-ai (hitl-in-chat dir);
built-in-agent (hitl dir, where hitl-in-chat cell is routed).

Closes 9 B-docs-gap refs from PDX-83 (8 hitl-hook+time-slots across 4
fws + 1 time-slots for built-in-agent).
2026-04-29 11:07:36 -07:00
Sam Julien e984995548 docs(showcase): bar-chart-renderer sibling snippets across 14 frameworks
The shell-docs `/generative-ui/tool-based` page teaches the
`useComponent` bar-chart pattern via `<Snippet region="bar-chart-renderer" />`,
but 14 frameworks ship a haiku-generator demo that uses
`useFrontendTool` instead — a fundamentally different API. Per the
established sibling convention (matching `tool-rendering/render-flight-tool.snippet.tsx`),
each framework now ships a docs-only `bar-chart-renderer.snippet.tsx`
that exposes the canonical teaching shape without touching the demo.

Frameworks: ag2, agno, built-in-agent, claude-sdk-python,
claude-sdk-typescript, crewai-crews, google-adk, langgraph-fastapi,
langgraph-typescript, langroid, mastra, ms-agent-dotnet, spring-ai,
strands.

Closes 14 of the 45 remaining B-docs-gap refs from PDX-83.
2026-04-29 11:07:26 -07:00
Sam Julien a130634343 docs(showcase/agno): mcp-apps + open-gen-ui + open-gen-ui-advanced regions
- @region[runtime-mcpapps-config] on copilotkit-mcp-apps/route.ts
- @region[no-frontend-renderer-needed] on demos/mcp-apps/page.tsx
- @region[minimal-runtime-flag] + @region[advanced-runtime-config] on
  the shared copilotkit-ogui/route.ts
- @region[minimal-provider-setup] on demos/open-gen-ui/page.tsx
- @region[sandbox-function-registration] on demos/open-gen-ui-advanced/page.tsx
2026-04-29 08:51:18 -07:00
github-actions[bot] 7d131608c0 style: auto-fix formatting 2026-04-29 11:03:09 +00:00
Alem Tuzlak 78660ac61e feat(agno): port declarative-gen-ui demo
Adds a dedicated A2UI dynamic-schema cell for the Agno integration:
new `a2ui_dynamic_agent.py` owns its own `generate_a2ui` tool that
reads the runtime-injected client catalog from
`run_context.session_state["copilotkit"]["context"]` and feeds it
to a secondary OpenAI client bound to `render_a2ui`. Result is an
`a2ui_operations` container the runtime A2UI middleware forwards
to the registered frontend catalog renderer.

Unlike the main agent's existing `generate_a2ui` (hardcoded
internal catalog), this dedicated agent stays in sync with whatever
catalog the frontend registers via `<CopilotKit a2ui={{ catalog }}>`.
Frontend ports `page.tsx` + Zod definitions / renderers / catalog
from the langgraph-python reference. Dedicated runtime route at
`/api/copilotkit-declarative-gen-ui` runs with
`injectA2UITool: false` so the agent owns the tool itself.
2026-04-29 12:36:58 +02:00
Alem Tuzlak fbbaccaf54 feat(agno): port a2ui-fixed-schema demo
Adds a dedicated A2UI fixed-schema cell for the Agno integration:
backend `a2ui_fixed_agent.py` ships `flight_schema.json` +
`booked_schema.json` and a single `display_flight` tool that emits
an `a2ui_operations` container directly (no secondary LLM).
Frontend ports `page.tsx` + Zod definitions / renderers / catalog
from the langgraph-python reference. Dedicated runtime route at
`/api/copilotkit-a2ui-fixed-schema` runs the A2UI middleware with
`injectA2UITool: false` so the agent owns its rendering tool.
2026-04-29 12:36:06 +02:00
Alem Tuzlak e465303083 feat: add beautiful-chat to agno + stub unsupported interrupt demos
Beautiful Chat (simplified) — polished landing-style chat shell over the
shared agentic_chat agent with gradient theming, suggestion pills, and an
example dashboard surface (BarChart + PieChart re-used from byoc-json-
render). Mirrors the spring-ai simplified port; full A2UI demonstration
catalog is out of scope while Agno lacks an A2UI middleware adapter.

gen-ui-interrupt + interrupt-headless — stubbed as not_supported_features
in manifest.yaml. Agno has no graph-level interrupt primitive, so each
stub page documents the gap and links to the closest Agno-supported
pattern (hitl-in-chat for in-chat blocking, hitl-in-app for out-of-chat
blocking via async useFrontendTool).
2026-04-29 11:59:26 +02:00
Alem Tuzlak 416011b823 feat(showcase-agno): add byoc-hashbrown and byoc-json-render demos 2026-04-29 11:11:29 +02:00