Improve AgentBuilder: Avoid modifying original config dict
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 58/100
Research direction
Start in veadk/agent_builder.py at AgentBuilder._build() and trace how sub_agents and tools are extracted from the configuration. Done means repeatedly building with the same configuration leaves the caller’s dictionary unchanged; check for focused tests in the repository or add a regression test for that behavior.
Written by the indexing model from the issue text.
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)
- Dominant language
- Python
- Stars
- 344
- Forks
- 98
- Avg merge
- 8h 17m
- Merged PRs (30d)
- 152
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from volcengine/veadk-python
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
volcengine/veadk-python#1021 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
volcengine/veadk-python#901 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
volcengine/veadk-python#549 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
volcengine/veadk-python#531 ·
All issues in volcengine/veadk-python
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100