From cd358482b86b7ad3ff781d0fececfb188f572600 Mon Sep 17 00:00:00 2001 From: bradAGI <46579244+bradAGI@users.noreply.github.com> Date: Mon, 24 Aug 2026 14:31:56 -0400 Subject: [PATCH] feat(google_adk): add ADK-112, workflow agent has no description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit adk_sequential_agent, adk_parallel_agent, and adk_langgraph_agent are valid applies_to tokens the engine discovers but no shipped rule used — every ADK agent-scope rule targets adk_llm_agent, except ADK-108 for LoopAgent. This covers the workflow classes for the routing check ADK-101 already makes for LlmAgent. A workflow agent is routed to exactly like an LlmAgent: the parent's model sees only the child's description. It is easier to miss here, because a workflow agent has no instruction= and no model= of its own, so nothing else about its construction reads as model-facing text. What it orchestrates is also invisible from outside — the parent cannot infer "runs these three steps in order" from the class name. Left adk_langgraph_agent out: LanggraphAgent takes a compiled graph rather than an ADK sub_agents tree, so the delegation-routing argument does not transfer without checking how the engine models it. --- google_adk/agent_safety.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/google_adk/agent_safety.yaml b/google_adk/agent_safety.yaml index 8854126..a4ef412 100644 --- a/google_adk/agent_safety.yaml +++ b/google_adk/agent_safety.yaml @@ -282,3 +282,39 @@ rules: Pass a `description` in the `new LlmAgent({...})` options that names this agent's role and the kind of input it handles. One sentence is enough; treat it as documentation the parent agent's model reads to route. + + - id: ADK-112 + title: Workflow agent has no description + severity: medium + confidence: 0.85 + language: python + applies_to: + - adk_sequential_agent + - adk_parallel_agent + - adk_loop_agent + scope: agent + match: + all: + - agent_class: [SequentialAgent, ParallelAgent, LoopAgent] + - agent_kwarg_missing: [description] + explanation: > + Google ADK routes delegation using the description= field on each agent in + a sub_agents tree, and a workflow agent is routed to exactly like an + LlmAgent is: when the parent decides whether to hand off, the model sees + only the child's description. A SequentialAgent, ParallelAgent, or + LoopAgent with no description sits in the tree but gives the parent's model + no signal to pick it, so it is effectively unreachable through delegation + — a silent routing bug, not an error. It is easier to miss on a workflow + agent than on an LlmAgent: a workflow agent has no instruction= and no + model= of its own, so nothing else about its construction reads as + model-facing text and the missing description does not look like an + omission. What the agent orchestrates is also invisible from the outside — + the parent cannot infer "runs these three steps in order" from the class + name alone. + fix: > + Add a description= kwarg naming what the workflow accomplishes and the + kind of input it expects, not its mechanics — the parent's model is + choosing whether this branch is the right one, so "drafts, reviews, and + revises a support reply" routes correctly where "sequential agent" does + not. One sentence is usually enough. Treat it as documentation for the + parent agent's model.