Skip to content

Commit 898c36d

Browse files
authored
Preserve agent flow YAML config on registration (#89)
1 parent 85dfca4 commit 898c36d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

agent_r1/agent_flow/agent_flow.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,10 @@ def register(agent_name: str):
456456

457457
def decorator(subclass: type[AgentFlowBase]) -> type[AgentFlowBase]:
458458
fqdn = f"{subclass.__module__}.{subclass.__qualname__}"
459-
_agent_flow_registry[agent_name] = {"_target_": fqdn}
459+
if agent_name in _agent_flow_registry:
460+
_agent_flow_registry[agent_name]["_target_"] = fqdn
461+
else:
462+
_agent_flow_registry[agent_name] = {"_target_": fqdn}
460463
return subclass
461464

462465
return decorator

0 commit comments

Comments
 (0)