Commit Graph

14 Commits

Author SHA1 Message Date
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
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 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
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 416011b823 feat(showcase-agno): add byoc-hashbrown and byoc-json-render demos 2026-04-29 11:11:29 +02:00
Alem Tuzlak 42e8f3cdb4 feat(showcase-agno): add multimodal demo with vision-capable Agno agent 2026-04-29 11:09:35 +02:00
Alem Tuzlak 30a112a940 feat(showcase-agno): add agent-config demo with per-request Agno agent factory 2026-04-29 11:05:55 +02:00
Alem Tuzlak a6bb9afbfa feat(showcase-agno): add open-gen-ui and open-gen-ui-advanced demos 2026-04-29 11:03:47 +02:00
Alem Tuzlak e839f007eb feat(showcase-agno): add mcp-apps demo via runtime mcpApps.servers 2026-04-29 11:01:06 +02:00
Alem Tuzlak 23a3b24a01 feat(showcase/integrations): shared-state-read-write + subagents demos across 15 packages
Adds real working Shared State (Read+Write) and Sub-Agents demos to 15
showcase integrations, mirroring the canonical langgraph-python and
google-adk reference implementations. Fills rows previously empty on
the showcase coverage dashboard.

Packages: ag2, agno, claude-sdk-python, claude-sdk-typescript,
crewai-crews, langgraph-fastapi, langgraph-typescript, langroid,
llamaindex, mastra, ms-agent-dotnet, ms-agent-python, pydantic-ai,
spring-ai, strands. (built-in-agent landed independently on main as
PR #4321 — its variant is canonical; this PR no longer touches it.)

Per-package deliverables: framework-native backend agents
(preferences-injection middleware/callback + set_notes tool;
supervisor + 3 sub-agents wired as tools with running -> completed
/failed delegation log); frontend page.tsx + preferences-card.tsx /
notes-card.tsx for SSRW and delegation-log.tsx for subagents — wired
to useAgent({ updates: [OnStateChanged] }); manifest entries; runtime
route registration + per-package agent server config; real QA
scripts.

Includes targeted hardening fixes from a 7-agent code-review loop:

- Sub-agent failure paths now correctly emit status: "failed"
  (previously hardcoded "completed" or unreachable in
  mastra/strands/langgraph-fastapi/langgraph-typescript/ag2)
- Parallel-tool-call delegation race fixed in langgraph-fastapi
  (Annotated[list, add]) and langgraph-typescript (concat reducer)
- Silent data loss eliminated in
  claude-sdk-python/claude-sdk-typescript/crewai-crews — empty
  JSON.parse catches now log + emit error events
- ms-agent-dotnet set_notes writes to per-thread slot via AsyncLocal
- mastra working-memory writes are deterministic via
  src/mastra/tools/working-memory.ts helper
- spring-ai tool-call envelope ids match supervisor's tc.id() and
  AG-UI event ordering reordered; CopyOnWriteArrayList for
  parallel-call safety
- Stack trace + raw error message leaks scrubbed across 8+ Next.js
  routes — log server-side with errorId + return generic envelope
- Sub-agent calls no longer block event loops in ag2
  (asyncio.to_thread), langroid (llm_response_async), pydantic-ai
  (async run + async tools)
- langroid lru_cache cross-request contamination dropped
- Numerous smaller items: claude-sdk-python invalid model id, Callable
  annotation, /health endpoint exposed; crewai-crews supervisor
  no longer resets delegations every turn; pydantic-ai snapshot uses
  model_dump()

CI fixes folded in:
- crewai-crews test_forwarded_props: extend the stubbed
  ag_ui_crewai.endpoint module to expose
  add_crewai_flow_fastapi_endpoint and add stub
  agents.shared_state_read_write / agents.subagents modules
- generate-catalog test: bump crewai-crews wired-cell expectation
  28 -> 30; replace hardcoded total-wired count with an invariant
  (wired + stub + unshipped = 737) plus a lower-bound floor
- oxfmt run on the qa/shared-state-read-write.md files in mastra +
  spring-ai

Rebased onto latest main (post showcase/packages -> showcase/integrations
rename + post built-in-agent landing). Original blitz history
preserved at the blitz-pre-rebase-snapshot tag.

Known follow-ups (deferred to follow-up PR):
- agno sync sub_agent.run() blocks event loop (perf only)
- ms-agent-python asyncio thread-fallback fragility
- llamaindex initial-state coercion when UI clears state
- Manifest highlight audit (langgraph-typescript headless-complete,
  langgraph-fastapi byoc-* missing route.ts highlights)
- agno hitl-in-chat declared in demos but not features; duplicate
  /demos/hitl-in-chat route
- langgraph-typescript server.mjs graphSpec only registers 3 graphs
  vs 23 in langgraph.json (pre-existing)
- mastra hitl legacy demo missing from features list
- claude-sdk-python agents/agent.py line 474 also has the legacy
  claude-opus-4-5 default
- PARITY_NOTES vs manifest mismatches for hitl-in-app across
  spring-ai/agno/ag2 (pre-existing)
- spring-ai a2ui-fixed-schema missing from generative_ui list
2026-04-28 18:36:13 +02:00
Jordan Ritter dd06dd89d1 refactor(showcase): rename packages/ to integrations/
The showcase framework directories better reflect their role as
integration examples rather than distributable packages.
Renames showcase/packages/ -> showcase/integrations/ and updates
the test docker-compose file reference accordingly.
2026-04-28 07:47:35 -07:00