Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkbrnd committed Feb 12, 2025
1 parent b414bf3 commit 7c70ca5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/agno/agno/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,11 @@ def _transfer_task_to_agent(
yield self.team_response_separator

# Give a name to the member agent
agent_name = member_agent.name.replace(" ", "_").lower() if member_agent.name else f"agent_{index}"
agent_name = member_agent.name if member_agent.name else f"agent_{index}"
# Convert non-ascii characters to ascii equivalents and ensure only alphanumeric, underscore and hyphen
agent_name = "".join(c for c in agent_name if c.isalnum() or c in "_- ").strip()
agent_name = agent_name.lower().replace(" ", "_")

if member_agent.name is None:
member_agent.name = agent_name

Expand Down

0 comments on commit 7c70ca5

Please sign in to comment.