In collaborative robotic cells, a human operator and a robot share the\nworkspace in order to execute a common job, consisting of a set of tasks. A\nproper allocation and scheduling of the tasks for the human and for the robot\nis crucial for achieving an efficient human-robot collaboration. In order to\ndeal with the dynamic and unpredictable behavior of the human and for allowing\nthe human and the robot to negotiate about the tasks to be executed, a two\nlayers architecture for solving the task allocation and scheduling problem is\nproposed. The first layer optimally solves the task allocation problem\nconsidering nominal execution times. The second layer, which is reactive,\nadapts online the sequence of tasks to be executed by the robot considering\ndeviations from the nominal behaviors and requests coming from the human and\nfrom robot. The proposed architecture is experimentally validated on a\ncollaborative assembly job.\n