Skip to content

SequentialAgent deprecated but replacement (Workflow) cannot fill its role as sub_agent #5872

@deepakbatham572

Description

@deepakbatham572

🔴 Required Information

Describe the Bug:
SequentialAgent carries a deprecation warning saying "Please use Workflow instead."
However, Workflow is not a BaseAgent subclass and cannot be used in Agent.sub_agents,
which requires list[BaseAgent]. This leaves no ADK-native migration path for the
sub_agent composition pattern.

Steps to Reproduce:

  1. Install google-adk==2.1.0
  2. Try to replace a SequentialAgent sub_agent with a Workflow:
from google.adk.workflow import Workflow
from google.adk.agents import Agent

pipeline = Workflow(name="pipeline", edges=[...])

root = Agent(
    name="orchestrator",
    sub_agents=[pipeline],   # TypeError: Workflow is not BaseAgent
)
  1. Observe Workflow is rejected because it is not a BaseAgent.

Expected Behavior:
Either Workflow implements BaseAgent so it can be passed as a sub_agent, or the
deprecation notice documents an explicit migration path for this composition pattern.

Observed Behavior:

from google.adk.workflow import Workflow
from google.adk.agents.base_agent import BaseAgent
issubclass(Workflow, BaseAgent)  # False

from google.adk.agents import SequentialAgent
issubclass(SequentialAgent, BaseAgent)  # True  ← deprecated

Workflow → BaseNode only.
SequentialAgent → BaseAgent → BaseNode (deprecated, will be removed).
After removal, there is no BaseAgent-compatible sequential composition class.

Environment Details:

ADK Library Version: google-adk==2.1.0
Desktop OS: macOS
Python Version: 3.12
Model Information:

Are you using LiteLLM: Yes
Which model is being used: gpt-5.1 (via LiteLLM)

🟡 Optional Information

Regression:
N/A — SequentialAgent worked in prior versions. The deprecation was introduced in 2.x.

Logs:
N/A

Additional Context:
The workbench pattern (root Agent → SequentialAgent sub_agent → [gen_agent, review_agent])
is a common production pattern. Without a BaseAgent-compatible replacement, users must
either keep the deprecated class or abandon the sub_agent composition pattern entirely
and move all routing into a top-level Workflow, which has its own limitations

Metadata

Metadata

Labels

request clarification[Status] The maintainer need clarification or more information from the authorv2Affects only 2.0 versionworkflow[Component] This issue is related to ADKworkflow

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions