Replies: 5 comments 4 replies
-
|
I've also found myself wanting to spawn workflows as sub-agents. My use case is a pretty standard SaaS copilot type of agent, able to answer questions about the user's account, and take action on their behalf when instructed conversationally. So far, I'm been using a task-mode agent as the first node in the workflow, which does intent routing to a child workflows. This works quite nicely, but it loses the generality of a chat-mode agent. I notice in the ADK V2 skills (super handy resource btw) that Workflow Cannot Be a Sub-Agent of LlmAgent. So this is clearly by design at this stage, but it would be great to get some guidance from the ADK team if this is a limitation that will be fixed in future, or there's a different pattern that we should consider. (cc @swapydapy - apologies for the direct tag, but I watched the community call, and it seems like you might be the right person to ask 🙏 ) |
Beta Was this translation helpful? Give feedback.
-
|
Will node as a tool solve your use cases? |
Beta Was this translation helpful? Give feedback.
-
|
An Agent can be thought of as an entity which the user can free-form interact with, there's no pre-defined goal. While Workflows are more like Tools. They are designed with a pre-defined goal in mind and when invoked, they follow a defined execution path to achieve that goal. We are in the process of supporting using Node as a Tool. That should allow using Workflows or any other custom node to be used tools in an LlmAgent. |
Beta Was this translation helpful? Give feedback.
-
|
I see the idea, but one issue is that it can be treated strictly as a tool. A major drawback with this specific idea/implementation is production overhead. It is much simpler, easier, and more scalable to use n8n (or build yourself) and define that workflow as a tool instead. As a mental exercise, let's say we did that and now have a workflow acting as a sub-agent. If we want to make it production-grade or integrate it with other parts of adk(which we kind of have to do), for example, adding flags and dynamically adding or subtracting elements. We also have to consider the integration side, especially if we are using an A2A (agent-to-agent/app-to-app) protocol. At the very least, we need to have a conversation about how those workflows would integrate and how to make it as painless yet secure as possible. So while I see the point, I don't think this approach will pass review. There are just too many potential risks and existing solutions. The best case is a Node as a tool. |
Beta Was this translation helpful? Give feedback.
-
|
Any update ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Workflow as Sub-Agent
Target: ADK 2.0 (Beta) — enable
WorkflowinLlmAgent.sub_agentsfor conversation delegation.Problem
ADK 2.0 only supports
Workflow → Agent(viactx.run_node()). The inverse —Agent → Workflow— is not possible. This forces an all-or-nothing adoption: either convert everything to workflows or lose deterministic pipelines.Cost impact: Workflow-root loops generate 7 events/3 LLM calls for data gathering. Sub-agent delegation would reduce to 5 events/2 LLM calls (30% reduction via event compaction on Agent Runtime).
Proposed Solution
Allow
Workflowas a sub-agent via delegation:Benefits:
RequestInput)Representative Examples
1. Guided Form Collection
Main agent identifies required fields; workflow deterministically collects each with validation.
2. Compliance Verification
Main agent prepares submission; workflow runs deterministic checks with human approval gates.
3. Multi-Step Configuration
Agent understands intent; workflow guides through deterministic setup with confirmation steps.
Comparison
bind_tools([graph])LangGraph allows graphs as callables. ADK needs equivalent:
Workflowas delegatable sub-agent.Considerations
Docs: Dynamic Workflows | Graph-based Workflows
Beta Was this translation helpful? Give feedback.
All reactions