Skip to content

Clarification on behavior of output_key in a branch context for ParallelAgent #2633

@nembery

Description

@nembery

Hi, Can someone please clarify the desired behavior when using the ParallelAgent, or other Custom Agents that use a branch invocation context, specifically when using output_keys in the branched context?

Currently, it appears that when a ParallelAgent has multiple sub-agents, i.e. sub_agents in a SequentialAgent that when an LllmAgent sets an output_key, that value is not available in the branched invocation context to subsequent LlmAgents in the sequence. Is this intentional or perhaps a bug?

I have a work-around in a Custom ParallelListAgent that checks the state delta on events generated by sub_agents and manually updates the branch context session state dict, but this feels pretty dirty. I would expect the runner to update either the parent context (which it appears to be doing already) or the branch context as mentioned in the event, or even possibly both.

Metadata

Metadata

Assignees

Labels

bot triaged[Bot] This issue is triaged by ADK botcore[Component] This issue is related to the core interface and implementation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions