Repository navigation
feat(AIC-3412): add the Google ADK agents handler - #106
andrewklatzke wants to merge 8 commits into
Conversation
ADK is a wildcard agent runtime, so the handler serves any provider. Gemini is the default transport and Vertex is an explicit opt-in. Co-authored-by: Cursor <cursoragent@cursor.com>
…-google-adk Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # .release-please-manifest.json # .sdk_metadata.json # AGENTS.md # tests/test_cross_handler_parity.py # uv.lock
…nd emit graph:node in the Google ADK adapter Co-authored-by: Cursor <cursoragent@cursor.com>
…span Co-authored-by: Cursor <cursoragent@cursor.com>
| ) | ||
| ], | ||
| **options, | ||
| ) |
There was a problem hiding this comment.
Graph wrapper drops API key
Medium Severity
google_adk_graph forwards Vertex and model options to the handler factory but never takes api_key. A caller who passes api_key sends it to _graph, which only accepts handlers, tool_handlers, registry, and graph_judge, so the call raises TypeError instead of authenticating Gemini.
Reviewed by Cursor Bugbot for commit 0f347aa. Configure here.
| ) | ||
| spanlib.finish_model_span( | ||
| span, self.config, spanlib.span_usage_from_counts(prompt, candidates) | ||
| ) |
There was a problem hiding this comment.
Model spans start after the call
Medium Severity
LaunchDarklyTelemetryPlugin opens and closes the chat span only in after_model_callback. The span never wraps the model call, so durations are near zero and a failed inference produces no chat span at all.
Reviewed by Cursor Bugbot for commit 0f347aa. Configure here.
| def _message(text: str) -> Any: | ||
| return type( | ||
| "Content", (), {"role": "user", "parts": [type("Part", (), {"text": text})()]} | ||
| )() |
There was a problem hiding this comment.
Native graph sends dummy messages
High Severity
_run_agent builds new_message with anonymous type(...) objects instead of the handler’s genai Content/Part helpers. The real ADK runner and Gemini client expect google.genai.types.Content, so to_adk_agents can fail when ADK is actually installed.
Reviewed by Cursor Bugbot for commit 0f347aa. Configure here.
| model=str((config.get("model") or {}).get("name") or ""), | ||
| instruction=parse_template(str(config.get("instructions") or ""), variables), | ||
| tools=tools, | ||
| ) |
There was a problem hiding this comment.
Native graph skips model transport
Medium Severity
to_adk_agents passes the raw model name string into LlmAgent and never uses the handler’s Gemini / Vertex / LiteLLM resolution. Vertex project and location are ignored, and non-Gemini models are not wrapped as provider/model LiteLLM ids.
Reviewed by Cursor Bugbot for commit 0f347aa. Configure here.
…-google-adk Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # .release-please-manifest.json # .sdk_metadata.json # AGENTS.md # tests/test_cross_handler_parity.py
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 5 total unresolved issues (including 4 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e58baa5. Configure here.
| def to_adk_agents(graph_def: Any, **options: Any) -> _AdkAgents: | ||
| """Compiles a LaunchDarkly agent graph into an ADK workflow.""" | ||
| report_usage("google-adk-agents.toAdkAgents", PACKAGE_NAME, __version__) | ||
| return _AdkAgents(graph_def, options) |
There was a problem hiding this comment.
Native adapter ignores graph coroutine
High Severity
to_adk_agents stores its first argument and never awaits it, and it only accepts keyword options. Sibling adapters take (def_coro, opts) from resolve_graph(). That call is a TypeError, and a bare coroutine is treated as a graph with no root.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e58baa5. Configure here.


Summary
launchdarkly-ai-google-adk-agents, a wildcard agent handler for Google ADK. Gemini Developer API is the default. Vertex is an explicit opt-in and never shares an API key with that path.provider/model).google-adkis not a declared dependency: 2.9.2 caps OpenTelemetry below this workspace's exporter pin, so production installs addgoogle-adk[extensions]themselves.google_adk_graphandto_adk_agents. The native adapter runs the root, followstransfer_to_<target>when the model calls it, and emitsld.ai.graphplus$ld:ai:graph:*when a context is present.Test plan
uv run mypy packages/google-adk-agents/srcuv run pytest packages/google-adk-agents/tests tests/test_cross_handler_parity.pyMade with Cursor