-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
Problem Description
Currently, the AgentBuilder._build() method uses pop() operations which modify the original config dict, potentially causing:
- Side effects: If the caller retains a reference to the config, they'll find it unexpectedly modified
- Reusability issues: The same config object cannot be used multiple times
- Code clarity: The intent of
pop()is not clear
Current Code
# veadk/agent_builder.py, line 46-63
if agent_config.get("sub_agents", None):
for sub_agent_config in agent_config["sub_agents"]:
agent = self._build(sub_agent_config)
sub_agents.append(agent)
agent_config.pop("sub_agents") # ⚠️ Modifies original config
tools = []
if agent_config.get("tools", []):
for tool in agent_config["tools"]:
# ... tool processing
tools.append(func)
agent_config.pop("tools") # ⚠️ Modifies original config
agent = agent_cls(**agent_config, sub_agents=sub_agents, tools=tools)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels