Skip to content

sub_agent should allow more than 1 parent #4093

@ashubham

Description

@ashubham

Is your feature request related to a problem? Please describe.
I am trying to create a reusable agent which can be reused by multiple agents (as a sub-agent) in my platform. But, currently ADK imposes a limitation that an agent can have only one parent. Thus, I am unable to make this reusable.

Single Parent Rule: An agent instance can only be added as a sub-agent once. Attempting to assign a second parent will result in a ValueError.

Describe the solution you'd like
Relax the restriction that an agent instance can be added as a sub-agent only once.

Describe alternatives you've considered
Use the sub-agent as an AgentTool. This does not work in cases when the sub-agent needs to share the context from the parent agent during a particular run. As AgentTool is run in a separate context/session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core[Component] This issue is related to the core interface and implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions