Two layer agent for execution of tasks and for communication, coordination