diff --git a/samples/python/agents/airbnb_planner_multiagent/host_agent/routing_agent.py b/samples/python/agents/airbnb_planner_multiagent/host_agent/routing_agent.py index 3105aaec6..411658e10 100644 --- a/samples/python/agents/airbnb_planner_multiagent/host_agent/routing_agent.py +++ b/samples/python/agents/airbnb_planner_multiagent/host_agent/routing_agent.py @@ -228,7 +228,7 @@ async def send_message( if not client: raise ValueError(f'Client not available for {agent_name}') - task_id = state['task_id'] if 'task_id' in state else str(uuid.uuid4()) + if 'context_id' in state: context_id = state['context_id'] @@ -253,9 +253,8 @@ async def send_message( 'messageId': message_id, }, } - - if task_id: - payload['message']['taskId'] = task_id + # Don't send taskId to remote agents - let them create their own tasks + # Remote agents should create new tasks, not try to find existing unknown task IDs if context_id: payload['message']['contextId'] = context_id