Commit 84d90de
authored
feat(showcase/google-adk): port langgraph-python demos to fill dashboard column (CopilotKit#4318)
## Summary
Brings the **Google ADK** column on
https://dashboard.showcase.copilotkit.ai/#coverage from 8 wired cells
(parity_tier `minimal`) up to **35 wired cells** (parity_tier `partial`)
— using `langgraph-python` (38/39) as the reference. All ports use real
Google ADK + Gemini 2.5 Flash agents wired through `ag-ui-adk`; nothing
is stubbed.
### Backend
- `src/agent_server.py` refactored from a single shared `LlmAgent`
mounted at `/` to one `ADKAgent` per demo at `/<agent_name>`, driven by
a new `src/agents/registry.py` source-of-truth (with an `AgentSpec`
dataclass for `predict_state` / `emit_messages_snapshot` kwargs).
- 18 new per-demo agent modules covering reasoning (Gemini thinking
mode), tool-rendering (4 variants), HITL (in-chat + in-app),
shared-state (read-write + per-token streaming via
`PredictStateMapping`), multi-agent supervisor, A2UI dynamic +
fixed-schema, BYOC, open-gen-ui (basic + advanced), agent-config,
readonly-context, multimodal, beautiful-chat, plus the existing
recipe-themed shared-state-read.
### Frontend
- `src/app/api/copilotkit/route.ts` now maps each agent name to its
matching backend path.
- 6 dedicated runtime routes for demos that need bespoke runtime config:
- `copilotkit-auth` — V2 `createCopilotRuntimeHandler` with an
`onRequest` 401 gate
- `copilotkit-declarative-gen-ui` and `copilotkit-a2ui-fixed-schema` —
`a2ui.injectA2UITool: false` because the agents own their own A2UI tools
- `copilotkit-byoc-hashbrown`, `copilotkit-byoc-json-render`,
`copilotkit-ogui` (shared by open-gen-ui + advanced)
- 26 new / replaced demo pages with their helper components.
### Manifest
`showcase/packages/google-adk/manifest.yaml` declares 35 features (was
8). `pnpm generate-registry` validates clean.
### Skipped (intentional)
- `gen-ui-interrupt`, `interrupt-headless` — depend on LangGraph's
`interrupt()` graph primitive; ADK has no direct equivalent. The
high-level `useHumanInTheLoop` case is covered via `hitl-in-chat`.
- `mcp-apps` — `ag_ui_adk` does support `MCPToolset`, but a working
MCP-driven UI demo is a separate chunk; left for follow-up.
## Test plan
- [x] `pnpm generate-registry` validates manifest end-to-end (Catalog:
reference = langgraph-python with 37 wired features; google-adk now at
35/39 wired)
- [x] `npx tsc --noEmit` in `showcase/packages/google-adk` — no new
errors (pre-existing `byoc-json-render/registry.tsx` and
`shared-state-write/page.tsx` errors untouched)
- [x] Python syntax: `ast.parse` over every file in `src/agents/` — all
parse cleanly
- [ ] Local smoke test: `pnpm dev` in `showcase/packages/google-adk`,
hit each new `/demos/*` route, verify L2/L3 health
- [ ] Railway deploy: confirm health probes go green and dashboard
column lights up
## Caveats worth knowing before deploy
1. **Per-token streaming** in `shared-state-streaming` uses
`PredictStateMapping(stream_tool_call=True)`. Per `ag_ui_adk` docs, true
per-token argument streaming requires Gemini 3+ via Vertex AI; on Gemini
2.5 Flash this should still work but at chunk-level granularity.
2. **Subagents** uses direct `genai.Client.models.generate_content`
calls inside each delegation tool, not ADK's native `sub_agents` /
`AgentTool`. Functionally equivalent for the demo; a follow-up could
refactor to ADK-native multi-agent.
3. **A2UI fixed-schema** has an inline `_build_flight_operations` helper
instead of importing `copilotkit.a2ui`. The `copilotkit` Python SDK
isn't in `requirements.txt` for this package — adding it later and
refactoring is straightforward.
4. **`/agents/state` collision**: `ag_ui_adk.add_adk_fastapi_endpoint`
hardcodes `POST /agents/state` regardless of the `path` arg. With N
agents mounted, only the first registered agent's state endpoint is
reachable. Most demos don't use it; `headless-complete` could.
5. **Beautiful-chat** is intentionally minimal vs. the langgraph-python
sibling's richer canvas/layout split.134 files changed
Lines changed: 10312 additions & 291 deletions
File tree
- showcase
- packages/google-adk
- src
- agents
- a2ui_schemas
- app
- api
- copilotkit-a2ui-fixed-schema
- copilotkit-auth
- [[...slug]]
- copilotkit-byoc-hashbrown
- copilotkit-byoc-json-render
- copilotkit-declarative-gen-ui
- copilotkit-ogui
- copilotkit
- demos
- a2ui-fixed-schema
- a2ui
- agent-config
- agentic-chat-reasoning
- auth
- beautiful-chat
- byoc-hashbrown
- charts
- byoc-json-render
- charts
- chat-customization-css
- chat-slots
- declarative-gen-ui
- a2ui
- frontend-tools-async
- frontend-tools
- headless-complete
- headless-simple
- hitl-in-app
- multimodal
- open-gen-ui-advanced
- open-gen-ui
- prebuilt-popup
- prebuilt-sidebar
- readonly-state-agent-context
- reasoning-default-render
- subagents
- tool-rendering-custom-catchall
- tool-rendering-default-catchall
- tool-rendering-reasoning-chain
- voice
- scripts/__tests__
- starters
- crewai-crews
- google-adk
- agent
- a2ui_schemas
- src/app/api/copilotkit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
15 | 55 | | |
16 | 56 | | |
17 | 57 | | |
18 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
19 | 83 | | |
20 | 84 | | |
21 | 85 | | |
22 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
23 | 103 | | |
24 | 104 | | |
25 | 105 | | |
26 | | - | |
| 106 | + | |
27 | 107 | | |
28 | 108 | | |
29 | 109 | | |
30 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
31 | 115 | | |
32 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
33 | 121 | | |
34 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
35 | 143 | | |
36 | 144 | | |
37 | 145 | | |
38 | 146 | | |
39 | | - | |
40 | | - | |
| 147 | + | |
| 148 | + | |
41 | 149 | | |
42 | 150 | | |
43 | 151 | | |
0 commit comments