Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: generating ID for agent removes digits as well #80

Open
mivanick opened this issue Nov 15, 2024 · 0 comments
Open

Bug: generating ID for agent removes digits as well #80

mivanick opened this issue Nov 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mivanick
Copy link

Expected Behaviour

if an agent name includes digits e.g. 'Image2You' a generated agent id should be 'image-2-you' or 'image2you'

Current Behaviour

currently the regex in 'generate_key_from_name' method in 'agents.py' https://github.com/awslabs/multi-agent-orchestrator/blob/main/python/src/multi_agent_orchestrator/agents/agent.py#L52 removes digits as well leaving agent id without digits

agent name 'Image2You' becomes image-text

this can result in incorrect identification of agents because you can have e.g. 'image2you' and 'image4you' agents and they would become image-you and image-you hence orchestrator would say that agent with the same id already exists

Code snippet

agent = BedrockLLMAgent(BedrockLLMAgentOptions(
    name='Image2You',
    description='Some description'
))

orchestrator.add_agent(agent)

all_agents = orchestrator.get_all_agents()

for agent_id, details in all_agents.items():
	agent_name = details['name']
	print(f"Agent ID: {agent_id}, Agent Name: {agent_name}")

Possible Solution

change regex pattern to '[^a-zA-Z0-9\s-]' to include digits in generated agent id

Steps to Reproduce

agent1 = BedrockLLMAgent(BedrockLLMAgentOptions(
name='Image2You',
description='Some description'
))

agent2 = BedrockLLMAgent(BedrockLLMAgentOptions(
name='Image4You',
description='Some description'
))

orchestrator.add_agent(agent1)
orchestrator.add_agent(agent2)

@mivanick mivanick added the bug Something isn't working label Nov 15, 2024
@cornelcroi cornelcroi removed the triage label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants