Skip to content

Commit 84d90de

Browse files
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.
2 parents 409c311 + b7dce5c commit 84d90de

134 files changed

Lines changed: 10312 additions & 291 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

showcase/packages/google-adk/docs-links.json

Lines changed: 122 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,149 @@
33
"features": {
44
"agentic-chat": {
55
"og_docs_url": "https://docs.copilotkit.ai/adk",
6-
"shell_docs_path": "/prebuilt-components"
6+
"shell_docs_path": null
77
},
8-
"hitl-in-chat": {
9-
"og_docs_url": "https://docs.copilotkit.ai/adk/human-in-the-loop",
10-
"shell_docs_path": "/generative-ui/your-components/interactive"
8+
"beautiful-chat": {
9+
"og_docs_url": "https://docs.copilotkit.ai/adk",
10+
"shell_docs_path": null
1111
},
12-
"tool-rendering": {
13-
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/tool-rendering",
14-
"shell_docs_path": "/generative-ui/tool-rendering"
12+
"cli-start": {
13+
"og_docs_url": "https://docs.copilotkit.ai/adk/quickstart",
14+
"shell_docs_path": null
15+
},
16+
"prebuilt-sidebar": {
17+
"og_docs_url": "https://docs.copilotkit.ai/adk",
18+
"shell_docs_path": null
19+
},
20+
"prebuilt-popup": {
21+
"og_docs_url": "https://docs.copilotkit.ai/adk",
22+
"shell_docs_path": null
23+
},
24+
"chat-slots": {
25+
"og_docs_url": "https://docs.copilotkit.ai/adk",
26+
"shell_docs_path": null
27+
},
28+
"chat-customization-css": {
29+
"og_docs_url": null,
30+
"shell_docs_path": null
31+
},
32+
"headless-simple": {
33+
"og_docs_url": "https://docs.copilotkit.ai/adk",
34+
"shell_docs_path": null
35+
},
36+
"headless-complete": {
37+
"og_docs_url": "https://docs.copilotkit.ai/adk",
38+
"shell_docs_path": null
39+
},
40+
"agentic-chat-reasoning": {
41+
"og_docs_url": "https://docs.copilotkit.ai/custom-look-and-feel/reasoning-messages",
42+
"shell_docs_path": null
43+
},
44+
"reasoning-default-render": {
45+
"og_docs_url": "https://docs.copilotkit.ai/custom-look-and-feel/reasoning-messages",
46+
"shell_docs_path": null
47+
},
48+
"frontend-tools": {
49+
"og_docs_url": "https://docs.copilotkit.ai/adk/frontend-tools",
50+
"shell_docs_path": null
51+
},
52+
"frontend-tools-async": {
53+
"og_docs_url": "https://docs.copilotkit.ai/adk/frontend-tools",
54+
"shell_docs_path": null
1555
},
1656
"gen-ui-tool-based": {
1757
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/your-components/display-only",
18-
"shell_docs_path": "/generative-ui/your-components/display-only"
58+
"shell_docs_path": null
59+
},
60+
"hitl-in-chat": {
61+
"og_docs_url": "https://docs.copilotkit.ai/adk/human-in-the-loop",
62+
"shell_docs_path": null
63+
},
64+
"hitl-in-app": {
65+
"og_docs_url": "https://docs.copilotkit.ai/adk/frontend-tools",
66+
"shell_docs_path": null
67+
},
68+
"declarative-gen-ui": {
69+
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/a2ui/dynamic-schema",
70+
"shell_docs_path": null
71+
},
72+
"a2ui-fixed-schema": {
73+
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/a2ui/fixed-schema",
74+
"shell_docs_path": null
75+
},
76+
"open-gen-ui": {
77+
"og_docs_url": "https://docs.copilotkit.ai/generative-ui/open-generative-ui",
78+
"shell_docs_path": null
79+
},
80+
"open-gen-ui-advanced": {
81+
"og_docs_url": "https://docs.copilotkit.ai/generative-ui/open-generative-ui",
82+
"shell_docs_path": null
1983
},
2084
"gen-ui-agent": {
2185
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/state-rendering",
22-
"shell_docs_path": "/generative-ui/state-rendering"
86+
"shell_docs_path": null
87+
},
88+
"tool-rendering-default-catchall": {
89+
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/tool-rendering",
90+
"shell_docs_path": null
91+
},
92+
"tool-rendering-custom-catchall": {
93+
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/tool-rendering",
94+
"shell_docs_path": null
95+
},
96+
"tool-rendering": {
97+
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/tool-rendering",
98+
"shell_docs_path": null
99+
},
100+
"tool-rendering-reasoning-chain": {
101+
"og_docs_url": "https://docs.copilotkit.ai/adk/generative-ui/tool-rendering",
102+
"shell_docs_path": null
23103
},
24104
"shared-state-read-write": {
25105
"og_docs_url": "https://docs.copilotkit.ai/adk/shared-state/in-app-agent-write",
26-
"shell_docs_path": "/shared-state"
106+
"shell_docs_path": null
27107
},
28108
"shared-state-streaming": {
29109
"og_docs_url": "https://docs.copilotkit.ai/adk/shared-state/predictive-state-updates",
30-
"shell_docs_path": "/shared-state"
110+
"shell_docs_path": null
111+
},
112+
"readonly-state-agent-context": {
113+
"og_docs_url": "https://docs.copilotkit.ai/adk/shared-state/in-app-agent-read",
114+
"shell_docs_path": null
31115
},
32116
"subagents": {
117+
"og_docs_url": null,
118+
"shell_docs_path": null
119+
},
120+
"voice": {
33121
"og_docs_url": "https://docs.copilotkit.ai/adk",
34-
"shell_docs_path": "/multi-agent/subagents"
122+
"shell_docs_path": null
123+
},
124+
"multimodal": {
125+
"og_docs_url": null,
126+
"shell_docs_path": null
127+
},
128+
"auth": {
129+
"og_docs_url": "https://docs.copilotkit.ai/adk",
130+
"shell_docs_path": null
131+
},
132+
"agent-config": {
133+
"og_docs_url": null,
134+
"shell_docs_path": null
135+
},
136+
"byoc-hashbrown": {
137+
"og_docs_url": null,
138+
"shell_docs_path": null
139+
},
140+
"byoc-json-render": {
141+
"og_docs_url": null,
142+
"shell_docs_path": null
35143
}
36144
},
37145
"missing": [
38146
{
39-
"feature": "subagents",
40-
"reason": "No /adk/multi-agent or /adk/subagents page on docs.copilotkit.ai (SPA fallback). OG falls back to the adk framework root; shell points at the unified /multi-agent/subagents content."
147+
"feature": "all",
148+
"reason": "4085 shell does not have a google-adk-scoped docs tree. Shell paths set to null rather than linking to framework-agnostic pages that would be misleading under the google-adk URL. OG URLs point at the real /adk/... pages on docs.copilotkit.ai where they exist; null where there's no canonical ADK page (subagents, multimodal, agent-config, byoc-*, chat-customization-css)."
41149
}
42150
]
43151
}

0 commit comments

Comments
 (0)