Add await function call to wait for agent values