In the new _workflow_class.py Workflow, leaf single_turn LlmAgents now
run through SingleAgentReactNode instead of _SingleLlmAgent. This
enables proper event deduplication via _output_delegated — only the
LlmCallNode content event appears in the stream, not a duplicate
wrapper output event.
The old _workflow.py Workflow retains the original _SingleLlmAgent
path. Runtime detection uses event_queue presence on InvocationContext
to distinguish the two paths.
Also updates the use_as_output sample to use an LLM agent as the
delegated child node, and rewrites wrapper tests per adk-style
guidelines covering both old and new workflow paths.
Change-Id: I96aea3f12fe432d0449268eb75580c900fd047d7
Add node_info.output_for to Event -- a list of node paths whose output
an event represents. For normal nodes it contains just the node own
path. When use_as_output=True delegation is used, it includes the full
ancestor chain (child path + all delegating parent paths).
Also adds a contributing sample demonstrating use_as_output with a
downstream edge in the new Workflow architecture.
Change-Id: I7e11276f894a3a2b396759dd146c221b487d4a7c
Add auth_config field to FunctionNode that pauses for user
authentication before running. The auth gate lives inside
FunctionNode.run(), keeping _node_runner generic.
Utility functions in _workflow_hitl_utils:
- create_auth_request_event: builds adk_request_credential FC event
with user-facing message
- process_auth_resume: stores credentials with plain value fallback
- has_auth_credential: checks if credentials exist in state
Unwrap {"result":...} for auth responses in _process_resumptions,
consistent with request_input handling.
Includes sample agent and tests for auth flow and credential reuse.
Change-Id: Ib81bf9cf63b8282efd7898def17f6e47a95b2d05
When a node raises an exception, emit an Event with error_code and
error_message before propagating the error. This makes failures
visible in the event stream (web UI, CLI) without requiring nodes
to manually yield error messages.
Applies to all node types via _node_runner, covering both unhandled
exceptions and timeouts.
Update retry sample to remove manual error message yield.
Change-Id: I4598cd288f1201416086149f3af44f8c8c10c1a4
Introduces two major capabilities:
- Workflow runtime: graph-based execution engine for composing
deterministic execution flows for agentic apps, with support for
routing, fan-out/fan-in, loops, retry, state management, dynamic
nodes, human-in-the-loop, and nested workflows
- Task API: structured agent-to-agent delegation with multi-turn
task mode, single-turn controlled output, mixed delegation
patterns, human-in-the-loop, and task agents as workflow nodes
Co-Authored-By: Bo Yang <ybo@google.com>
Co-Authored-By: George Weale <gweale@google.com>
Co-Authored-By: Sean Zhou <seanzhougoogle@google.com>
Co-Authored-By: Shangjie Chen <deanchen@google.com>
Co-Authored-By: Swapnil Agarwal <swapnilag@google.com>
Co-Authored-By: Wei Sun <weisun@google.com>
Co-Authored-By: Xuan Yang <xygoogle@google.com>
Co-Authored-By: Yifan Wang <wanyif@google.com>
Change-Id: I35932c50cfe29ff68559e3781713dbb5eb7b3382