Skip to content

Warn when cousin agents share a name - #7116

Open
gyanu2507 wants to merge 1 commit into
google:mainfrom
gyanu2507:fix/7110-unique-agent-names-across-tree
Open

gyanu2507 wants to merge 1 commit into
google:mainfrom
gyanu2507:fix/7110-unique-agent-names-across-tree

Conversation

@gyanu2507

Copy link
Copy Markdown

Fixes #7110

validate_sub_agents_unique_names only looked at one sub_agents list. Two agents with the same name under different parents produced no warning, and find_agent() / transfer_to_agent then silently resolved the first DFS match.

The validator now walks the whole subtree. The warning text says duplicate agent names, and that find_agent() returns the first DFS match.

Test: tests/unittests/agents/test_base_agent.py::test_validate_sub_agents_unique_names_across_parents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agents under different parents may share a name: no warning, and find_agent() silently resolves to the first

2 participants